/* =========================================
   MODERN DASHBOARD HERO (Obsidian Theme)
   ========================================= */

/* Fix: Allow shadows to bleed out naturally */
.main-content {
    overflow: visible !important;
}

.dashboard-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-bottom: 60px;
}

/* --- 1. HERO BANNER --- */
.dash-hero {
    position: relative;
    width: 100%;
    height: 380px; 
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #050505;
    border: 1px solid #333; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    margin-bottom: 2rem;
}

.dash-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/dark-matter.png");
    opacity: 0.4;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(203, 178, 106, 0.08) 0%, rgba(0,0,0,0) 60%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Badge Style */
.hero-badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #cbb26a;
    font-weight: 700;
    margin-bottom: 20px;
    padding: 6px 16px;
    border: 1px solid rgba(203, 178, 106, 0.3);
    background: rgba(203, 178, 106, 0.05);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(203, 178, 106, 0.1);
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    color: #fff;
    margin: 0 0 15px 0;
    line-height: 1.1;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.hero-title .text-gold {
    background: linear-gradient(to bottom, #fff, #cbb26a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    color: #bbb;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 35px;
    text-shadow: 0 2px 4px #000;
    max-width: 550px;
}



/* --- 2. STATS TICKER --- */
.stats-ticker {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

.ticker-item { text-align: center; flex: 1; }
.ticker-item .t-label { display: block; font-size: 10px; text-transform: uppercase; color: #666; letter-spacing: 1.5px; margin-bottom: 5px; font-weight: 700; }
.ticker-item .t-val { font-family: 'Cinzel', serif; font-size: 1.2rem; color: #eee; text-shadow: 0 2px 2px #000; }
.text-rare { color: #bf5af2; text-shadow: 0 0 10px rgba(191, 90, 242, 0.3); }
.ticker-sep { width: 1px; height: 30px; background: #333; }

/* --- 3. DASHBOARD GRID --- */
.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.dash-main { display: flex; flex-direction: column; gap: 25px; }

/* Spotlight Card */
.spotlight-card {
    background: radial-gradient(circle at top right, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid #333; 
    border-top: 3px solid #4facfe;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.spotlight-content { position: relative; z-index: 2; max-width: 80%; }
.tag-new { background: #4facfe; color: #000; font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 2px; letter-spacing: 1px; }
.spotlight-content h3 { margin: 15px 0 10px 0; font-size: 1.6rem; color: #fff; font-family: 'Cinzel', serif; }
.spotlight-content p { color: #ccc; line-height: 1.6; margin: 0; font-size: 14px; }
.visual-circle { width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(79, 172, 254, 0.15), transparent 70%); position: absolute; top: -50px; right: -50px; z-index: 1; filter: blur(20px); }

.dash-section-header h3 { font-size: 14px; color: #888; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 15px 0; border-bottom: 1px solid #222; padding-bottom: 10px; }

/* Activity Feed */
.activity-feed { display: flex; flex-direction: column; gap: 15px; }
.feed-item { display: flex; align-items: flex-start; gap: 15px; padding: 20px; background: #111; border: 1px solid #2a2a2a; border-radius: 6px; transition: transform 0.2s, border-color 0.2s; }
.feed-item:hover { border-color: #555; transform: translateX(5px); }
.feed-icon { font-size: 20px; background: #1a1a1a; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid #333; flex-shrink: 0; }
.feed-body { flex: 1; }
.feed-body strong { display: block; color: #eee; font-size: 14px; margin-bottom: 5px; }
.feed-body p { margin: 0; font-size: 13px; color: #888; line-height: 1.4; }
.feed-date { font-size: 11px; color: #555; white-space: nowrap; font-weight: bold; }

/* --- RIGHT COLUMN (Sidebar) --- */
.dash-sidebar { background: #0f0f0f; border: 1px solid #2a2a2a; border-radius: 8px; padding: 20px; height: fit-content; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #222; padding-bottom: 15px; }
.sidebar-header h3 { margin: 0; font-family: 'Cinzel', serif; font-size: 13px; color: #cbb26a; text-transform: uppercase; letter-spacing: 1px; }
.live-dot { width: 6px; height: 6px; background: #4fa84f; border-radius: 50%; box-shadow: 0 0 5px #4fa84f; animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }

.leaderboard-modern { display: flex; flex-direction: column; gap: 8px; }
.lb-card { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 4px; background: #161616; border: 1px solid #222; transition: transform 0.2s; }
.lb-card:hover { transform: translateX(3px); background: #1a1a1a; border-color: #444; }
.rank-1 { background: linear-gradient(90deg, rgba(203, 178, 106, 0.1), #161616); border: 1px solid rgba(203, 178, 106, 0.3); }
.rank-1 .lb-pos { color: #cbb26a; text-shadow: 0 0 10px rgba(203, 178, 106, 0.5); }
.rank-1 .lb-name { color: #fff; }
.lb-left { display: flex; align-items: center; gap: 12px; }
.lb-pos { font-family: 'Cinzel', serif; font-size: 14px; color: #555; font-weight: bold; width: 20px; text-align: center; }
.lb-details { display: flex; flex-direction: column; }
.lb-name { font-weight: bold; font-size: 13px; color: #bbb; }
.lb-sub { font-size: 10px; color: #666; margin-top: 2px; }
.crown-icon { font-size: 14px; }

/* FIX: VIEW RANKINGS BUTTON (Matches Search Button Style) */
.lb-footer {
    margin-top: 15px;
    text-align: center;
    border-top: 1px solid #222;
    padding-top: 15px;
}

.btn-rankings {
    width: 100%;
    padding: 10px;
    background: linear-gradient(to bottom, #1a1a1a, #0a0a0a); 
    border: 1px solid #cbb26a; /* Gold Border */
    color: #cbb26a;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.btn-rankings:hover {
    background: linear-gradient(to bottom, #2a2a2a, #151515);
    color: #fff;
    box-shadow: 0 4px 15px rgba(203, 178, 106, 0.1);
    transform: translateY(-2px);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    .dash-hero { height: auto; padding: 50px 20px; }
    .hero-title { font-size: 2.5rem; }
    .dash-grid { grid-template-columns: 1fr; } 
    
    /* MOBILE SEARCH FIX: 
       We create two equal-sized blocks.
       The Input gets a background and border to match the button visually.
    */
    .input-artifact { 
        flex-direction: column; 
        height: auto; 
        border: none; /* Remove container border */
        background: transparent; /* Remove container bg */
        box-shadow: none; /* Remove container shadow */
        padding: 0; 
        gap: 12px; /* Distinct gap between the two 'blocks' */
    }
    
    .input-artifact input { 
        width: 100%; 
        text-align: center; 
        height: 55px !important; /* Taller touch target */
        background: #080808; /* Solid background */
        border: 1px solid #333; /* Distinct border */
        border-radius: 8px; /* Rounded corners */
        font-size: 16px;
        padding: 15px;
        color: #fff;
        box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
    }
    
    .input-artifact button { 
        width: 100%; 
        height: 55px !important; /* Exact match to input height */
        border-radius: 8px; 
        font-size: 16px; /* Larger text for mobile button */
    }
    
    .artifact-icon { display: none; }
}

/* HOME/PROFILE ADDITIONS (Might move to its own file)
      /* THE ULTIMATE FOOTER FIX */
        html, body { height: auto !important; min-height: 100% !important; display: block !important; }
        
        .main-content { 
            overflow: hidden;
        }

        .hero-section {
            padding: 40px 20px !important;
            margin: 0 !important;
        }

        /* Prevent hidden panels from existing in the layout flow */
        section[style*="display: none"], section[style*="display:none"] {
            position: absolute !important;
            height: 0 !important;
            overflow: hidden !important;
        }

        .app-footer {
            margin-top: 40px !important;
            padding: 20px;
            background: #000;
            border-top: 1px solid #222;
            position: relative;
        }
    .hero-section {
        position: relative !important;
        background: none !important; 
        overflow: visible !important;
    }

    .hero-section::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100vw; 
        height: 100%;
        background: radial-gradient(circle, rgba(203, 178, 106, 0.08) 0%, rgba(203, 178, 106, 0.02) 30%, rgba(10, 10, 10, 0) 60%) no-repeat !important;
        background-position: center !important;
        z-index: -1; 
        pointer-events: none; 
    }

    .rs-fantasy-row {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap; 
        justify-content: center;
        align-items: stretch;
        gap: 20px;
        max-width: 1100px; 
        margin: 40px auto;
        padding: 0 20px;
        box-sizing: border-box; 
    }

    .rs-fantasy-box {
        background: rgba(12, 12, 12, 0.9);
        background-image: linear-gradient(to bottom, rgba(203, 178, 106, 0.04), transparent);
        border: 1px solid #3d3522; 
        border-radius: 2px;
        padding: 25px;
        flex: 1 1 0px; 
        min-width: 0; 
        position: relative;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        transition: all 0.3s ease;
    }

    .rs-fantasy-box::before {
        content: "";
        position: absolute;
        top: -1px; left: -1px; width: 10px; height: 10px;
        border-top: 2px solid #cbb26a; border-left: 2px solid #cbb26a;
    }

    .rs-fantasy-box::after {
        content: "";
        position: absolute;
        bottom: -1px; right: -1px; width: 10px; height: 10px;
        border-bottom: 2px solid #cbb26a; border-right: 2px solid #cbb26a;
    }

    .rs-fantasy-box:hover {
        border-color: #cbb26a;
        background: rgba(18, 18, 18, 0.95);
        box-shadow: 0 0 20px rgba(203, 178, 106, 0.1);
    }

    .rs-fantasy-title {
        font-family: 'Cinzel', serif;
        color: #f1d592;
        font-size: 0.95rem;
        display: block;
        text-align: center;
        margin-bottom: 15px;
        text-transform: uppercase;
        letter-spacing: 2px;
        border-bottom: 1px solid rgba(203, 178, 106, 0.15);
        padding-bottom: 10px;
    }

    .rs-fantasy-text {
        font-family: 'Lato', sans-serif;
        font-size: 0.85rem;
        color: #b0b0b0;
        line-height: 1.6;
        text-align: center;
        margin: 0;
    }

    @media (max-width: 950px) {
        .rs-fantasy-row { flex-wrap: wrap; }
        .rs-fantasy-box { flex: 1 1 100%; max-width: 500px; }
    }
    
    @keyframes rs-scan { 0% { left: -110%; } 100% { left: 110%; } }
    @keyframes rs-pulse {
        0%, 100% { opacity: 0.9; transform: scale(1); filter: drop-shadow(0 0 5px rgba(203, 178, 106, 0.2)); }
        50% { opacity: 1; transform: scale(1.02); filter: drop-shadow(0 0 20px rgba(203, 178, 106, 0.5)); }
    }

.rarity-text-uncommon { color: #8a8575; }
.rarity-text-rare      { color: #4facfe; text-shadow: 0 0 10px rgba(79, 172, 254, 0.5); }
.rarity-text-epic      { color: #bf5af2; text-shadow: 0 0 10px rgba(191, 90, 242, 0.5); }
.rarity-text-legendary { color: #ff9f0a; text-shadow: 0 0 12px rgba(255, 159, 10, 0.6); font-weight: bold; }

@keyframes titlePop {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

.nested-auth-row { display: flex; align-items: flex-start !important; }
.auth-accent-bar { align-self: stretch !important; height: auto !important; min-height: 40px; }
.auth-text-stack { display: flex; flex-direction: column; justify-content: flex-start !important; margin-top: 2px !important; }

#titlePickerContainer {
    position: static !important;
    top: auto !important;
    left: auto !important;
    display: none; 
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start; 
    gap: 6px !important;
    margin: 0 !important;
    margin-top: 8px !important; 
    padding: 0 !important;
    flex: 1;
    min-width: 0;
    width: 100%;
    overflow-x: auto; 
    white-space: nowrap; 
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

#titlePickerContainer::-webkit-scrollbar { display: none; }

.title-badge {
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0D0D09;
    border: 1px solid #3d3522;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 10px !important;
    color: #8a8575;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
    position: relative;
}

.title-badge.active {
    border-color: #cbb26a;
    background: #0D0D09;
    color: #fff;
    box-shadow: 0 0 10px rgba(203, 178, 106, 0.2);
}

.badge-rare.active { border-color: #4facfe; box-shadow: 0 0 12px rgba(79, 172, 254, 0.4); }
.badge-epic.active { border-color: #bf5af2; box-shadow: 0 0 12px rgba(191, 90, 242, 0.4); }
.badge-legendary.active { border-color: #ff9f0a; box-shadow: 0 0 15px rgba(255, 159, 10, 0.5); }

.title-badge:hover::after {
    content: attr(data-title);
    position: absolute;
    top: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(8, 8, 8, 0.95);
    color: #cbb26a;
    padding: 4px 8px;
    border: 1px solid #3d3522;
    font-size: 10px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}
/* Restores the Onboarding Snackbar UI */
.ob-snackbar { 
    position: fixed; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 90%; 
    max-width: 480px; 
    background: #0a0a0a; 
    border: 1px solid #cbb26a; 
    box-shadow: 0 0 25px rgba(0,0,0,0.9), 0 0 15px rgba(203, 178, 106, 0.15); 
    padding: 12px 20px; 
    border-radius: 6px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    z-index: 999; 
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

.ob-content { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.ob-icon { 
    font-size: 24px; 
    filter: drop-shadow(0 0 5px rgba(203, 178, 106, 0.4)); 
}

.ob-info { 
    display: flex; 
    flex-direction: column; 
    gap: 3px; 
}

.ob-info strong { 
    color: #cbb26a; 
    font-family: 'Cinzel', serif; 
    font-size: 14px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

.ob-info span { 
    color: #bbb; 
    font-size: 12px; 
    font-family: 'Lato', sans-serif; 
    line-height: 1.3; 
}

.ob-action-link { 
    color: #fff; 
    font-weight: bold; 
    text-decoration: none; 
    border-bottom: 1px solid #cbb26a; 
    transition: all 0.2s; 
}

.ob-action-link:hover { 
    color: #cbb26a; 
    text-shadow: 0 0 5px rgba(203, 178, 106, 0.5); 
}

.ob-close-btn { 
    background: none; 
    border: none; 
    color: #666; 
    font-size: 22px; 
    cursor: pointer; 
    padding: 0 0 0 15px; 
    line-height: 1; 
}



/*BUG REPORTING
/* --- Bug Report Floating Button --- */
.bug-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #0D0D09;
    border: 1px solid #cbb26a;
    border-radius: 50%;
    color: #cbb26a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.bug-float-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 20px rgba(203, 178, 106, 0.4);
    background: #1a1a15;
}
/* Owner Controls */
#ownerControls {
    display: flex;
    align-items: center;
    position: absolute;
    right: 0px;
}

/* --- Sleek Skiller Toggle Switch --- */
.skiller-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 20px; /* Spacing from Sync button */
}

.skiller-label-text {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: #666; /* Dim color when off */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.skiller-label-text.active {
    color: #4caf50; /* Green when active */
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

/* The Switch Box */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
}

/* Hide default checkbox */
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

/* The Slider (Background) */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #1a1a1a;
  border: 1px solid #3d3522;
  transition: .4s;
  border-radius: 34px;
}

/* The Knob (Circle) */
.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: #666;
  transition: .4s;
  border-radius: 50%;
}

/* Checked State (ON) */
input:checked + .slider {
  background-color: rgba(76, 175, 80, 0.15);
  border-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(18px);
  background-color: #4caf50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
}

/* Hover Effect */
.switch:hover .slider {
    border-color: #cbb26a;
}
@media (max-width: 768px) {
    .header-flex-container { flex-direction: column; align-items: flex-start; gap: 15px; }
    .header-right-info { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 5px; }
    #refreshBtn.btn-refresh-stone { margin-top: 0 !important; }
    .skiller-label-text { display: none; }
}


/* --- Bug Modal Styling --- */
.bug-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none; 
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bug-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.bug-modal-box {
    background: #0a0a0a;
    border: 1px solid #cbb26a;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.9);
    text-align: center;
}

.bug-modal-title {
    font-family: 'Cinzel', serif;
    color: #cbb26a;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(203, 178, 106, 0.2);
    padding-bottom: 10px;
}

.bug-textarea {
    width: 100%;
    height: 120px;
    background: #111;
    border: 1px solid #333;
    color: #ddd;
    padding: 10px;
    font-family: 'Lato', sans-serif;
    resize: none;
    margin-bottom: 15px;
    border-radius: 2px;
}

.bug-textarea:focus {
    outline: none;
    border-color: #cbb26a;
}

.btn-submit-bug {
    background: linear-gradient(180deg, #cbb26a 0%, #9e8b50 100%);
    color: #000;
    border: none;
    padding: 10px 20px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: filter 0.2s;
}

.btn-submit-bug:hover {
    filter: brightness(1.1);
}

.close-bug-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #666;
    font-size: 24px;
    cursor: pointer;
}
.close-bug-modal:hover { color: #fff; }