/* ==========================================================================
   DESIGN SYSTEM & CONSTANTS
   ========================================================================== */
:root {
    /* UNIFIED EDTECH TRUST & SLEEK APPLE TITANIUM DESIGN SYSTEM */
    --color-primary: #059669;            /* Emerald Grant Funding - Primary Accent */
    --color-primary-hover: #047857;
    --color-navy: #0B2545;               /* Academic Navy - Institutional Trust */
    
    /* Background Canvas & Glass Fills */
    --bg-main: #080B11;                  /* Deep Midnight Charcoal Titanium */
    --bg-card: rgba(18, 24, 36, 0.78);   /* Translucent Slate Titanium Glass */
    --bg-card-solid: #121824;
    --bg-card-hover: rgba(26, 35, 51, 0.88);
    
    /* Typography & Specular Borders */
    --color-text-main: #F0F4F8;          /* Luminous Platinum White */
    --color-text-muted: #94A3B8;         /* Cool Slate Steel */
    --border-color: rgba(224, 235, 255, 0.12); /* Specular Glass Edge */
    --border-color-active: rgba(5, 150, 105, 0.5);
    --color-divider: rgba(224, 235, 255, 0.1);

    /* Accents */
    --color-emerald-funding: #059669;   /* Verified Grant Dollars */
    --color-amber-merit: #D97706;       /* Merit Points & Leaderboards */
    --color-accent: #D97706;
    --color-accent-hover: #B45309;
    --color-secondary: #0B2545;
    --color-success: #059669;
    --color-warning: #D97706;
    --color-danger: #E11D48;

    /* Materials & Elevation */
    --glass-blur: blur(24px) saturate(180%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px 0 rgba(5, 150, 105, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--color-text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Utilities */
.hidden { display: none !important; }
.text-gold { color: #f59e0b !important; }
.text-green { color: var(--color-success) !important; }
.text-red { color: var(--color-danger) !important; }
.text-blue { color: var(--color-secondary) !important; }
.w-full { width: 100% !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.gap-4 { gap: 1rem !important; }
.flex-col { display: flex; flex-direction: column; }
.justify-between { justify-content: space-between; }

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #FFFFFF;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 18px rgba(5, 150, 105, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #065F46 100%);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(5, 150, 105, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #F0F4F8;
    border: 1px solid rgba(224, 235, 255, 0.15);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(5, 150, 105, 0.5);
    color: #FFFFFF;
}

.btn-success {
    background: #059669;
    color: #FFFFFF;
    border: none;
}
.btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(225, 29, 72, 0.1);
    color: #E11D48;
    border: 1px solid rgba(225, 29, 72, 0.25);
}
.btn-danger:hover {
    background: rgba(225, 29, 72, 0.15);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.8rem 1.8rem;
    font-size: 1.05rem;
    border-radius: 10px;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Form inputs */
.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}
.form-input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
}

textarea.form-input {
    resize: none;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}
select option {
    background-color: var(--bg-card-solid);
    color: var(--color-text-main);
}

/* ==========================================================================
   GLASSMORPHISM CARD COMPONENT
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
    transition: border-color var(--transition-normal), background-color var(--transition-normal), transform var(--transition-normal);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 11, 17, 0.82);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: var(--transition-normal);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    letter-spacing: -0.02em;
    color: #F0F4F8;
}
.logo-icon {
    color: #059669;
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 10px rgba(5, 150, 105, 0.4));
}
.logo-accent {
    color: #059669;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}
.nav-link:hover {
    color: var(--color-text-main);
    text-shadow: 0 0 12px rgba(240, 244, 248, 0.3);
}

/* ==========================================================================
   LANDING PAGE VIEW
   ========================================================================== */
#landing-page {
    opacity: 0;
    transition: opacity var(--transition-slow);
    display: none;
}
#landing-page.active {
    opacity: 1;
    display: block;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-container {
    margin-bottom: 1.5rem;
}
.promo-badge {
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.3);
    color: #059669;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 18px rgba(5, 150, 105, 0.15);
}
.promo-badge i {
    width: 16px;
    height: 16px;
    color: #059669;
}

.hero-title {
    font-size: 3.4rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: #F0F4F8;
}
.gradient-text {
    background: linear-gradient(135deg, #F0F4F8 30%, #059669 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-preview {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-card {
    width: 100%;
    max-width: 440px;
    z-index: 2;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(5, 150, 105, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.75rem;
}

.preview-card-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.trust-pill {
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.match-badge {
    background: rgba(217, 119, 6, 0.12);
    color: #D97706;
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.preview-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: rgba(5, 150, 105, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
}
.avatar-icon {
    width: 24px;
    height: 24px;
    color: #059669;
}

.user-info {
    flex-grow: 1;
}
.user-name {
    font-size: 1rem;
    color: #F0F4F8;
    font-weight: 700;
}
.user-rank {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.funding-badge {
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    text-align: right;
}
.funding-val {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: #059669;
    font-size: 1.15rem;
    line-height: 1;
}
.funding-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Progress bar style */
.progress-container {
    margin-bottom: 1.2rem;
}
.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #F0F4F8;
    margin-bottom: 0.5rem;
}
.progress-percent {
    color: #059669;
    font-weight: 700;
}
.progress-bar-wrapper {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0B2545 0%, #059669 100%);
    border-radius: 50px;
    transition: width var(--transition-slow);
}

.preview-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.preview-checklist li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
}
.preview-checklist li.checked {
    color: #059669;
}
.preview-checklist li.pending {
    color: var(--color-text-muted);
}
.preview-checklist i {
    width: 16px;
    height: 16px;
}

.mockup-footer-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.82rem;
    font-weight: 600;
}
.merit-badge {
    color: #D97706;
    background: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.days-left {
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Background glows */
.decorator-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 1;
}
.glow-1 {
    background: #E09F3E;
    opacity: 0.18;
    top: -30px;
    left: -30px;
}
.glow-2 {
    background: rgba(245, 242, 235, 0.2);
    opacity: 0.12;
    bottom: -30px;
    right: -30px;
}

/* How It Works Section */
.how-it-works-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem 3rem 2rem;
    border-top: 1px solid var(--border-color);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.step-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    padding: 2.25rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal), border-color var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.step-card:hover {
    border-color: rgba(5, 150, 105, 0.45);
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(5, 150, 105, 0.15);
}

.step-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.step-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    color: #059669;
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    letter-spacing: 0.05em;
}

.step-badge-amber {
    color: #D97706;
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.3);
}

.step-badge-green {
    color: #34D399;
    background: rgba(5, 150, 105, 0.15);
    border-color: rgba(5, 150, 105, 0.35);
}

.step-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(5, 150, 105, 0.28);
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
}

.step-icon-box.f-amber {
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(217, 119, 6, 0.12);
    color: #D97706;
}

.step-icon-box i {
    width: 22px;
    height: 22px;
    color: currentColor;
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #F0F4F8;
    line-height: 1.3;
}

.step-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Features Grid */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem 2rem;
}
.section-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    color: #F0F4F8;
}
.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 3.5rem auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    padding: 2.25rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal), border-color var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
}
.feature-card:hover {
    border-color: rgba(5, 150, 105, 0.45);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(5, 150, 105, 0.15);
}
.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(5, 150, 105, 0.28);
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
}
.feature-icon-wrapper i {
    width: 26px;
    height: 26px;
    color: #059669;
}

.f-blue, .f-green, .f-amber, .f-red, .f-teal {
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.28);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #F0F4F8;
}
.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ================= COMING SOON CARD STYLES ================= */
.coming-soon-card {
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
    background: linear-gradient(145deg, rgba(40, 28, 10, 0.45), rgba(15, 23, 42, 0.75)) !important;
    overflow: hidden;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal) !important;
}
.coming-soon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.2), transparent);
    transform: skewX(-25deg);
    transition: left 0.75s ease;
}
.coming-soon-card:hover::before {
    left: 140%;
}
.coming-soon-card:hover {
    transform: translateY(-6px) scale(1.01) !important;
    border-color: rgba(245, 158, 11, 0.85) !important;
    box-shadow: 0 14px 35px rgba(245, 158, 11, 0.35), 0 0 25px rgba(245, 158, 11, 0.25) !important;
}
.coming-soon-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}
.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}
.coming-soon-quarter {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.coming-soon-arrow {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    color: #fbbf24;
    transition: transform 0.2s ease;
}
.coming-soon-card:hover .coming-soon-arrow {
    transform: translate(3px, -3px);
}
.coming-soon-footer-link {
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.coming-soon-footer-link span {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fbbf24;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}
.coming-soon-card:hover .coming-soon-footer-link span {
    color: #fef08a;
}

.footer {
    border-top: 1px solid #1E293B;
    background: #0B2545;
    padding: 4rem 2rem 3rem 2rem;
    color: #94A3B8;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.logo-sm {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFFFFF;
}

.logo-icon-sm {
    width: 22px;
    height: 22px;
    color: #059669;
}

.footer-tagline {
    font-size: 0.9rem;
    color: #94A3B8;
    max-width: 500px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.88rem;
}

.footer-link {
    color: #CBD5E1;
    text-decoration: none;
    transition: var(--transition-fast);
}
.footer-link:hover {
    color: #FFFFFF;
}

.footer-dot {
    color: #334155;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #34D399;
    font-weight: 500;
    font-size: 0.85rem;
    background: rgba(5, 150, 105, 0.2);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    border: 1px solid rgba(5, 150, 105, 0.35);
}
.footer-status i {
    width: 12px;
    height: 12px;
}

.footer-bottom {
    border-top: 1px solid #1E293B;
    padding-top: 1.5rem;
    width: 100%;
    font-size: 0.82rem;
    color: #64748B;
}

/* ==========================================================================
   DASHBOARD MODE LAYOUT
   ========================================================================== */
#dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--transition-slow);
}
#dashboard:not(.hidden) {
    opacity: 1;
}

/* Sidebar styling */
.sidebar {
    width: 260px;
    background: var(--bg-main);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.sidebar-logo:hover {
    opacity: 0.85;
}
.sidebar-logo i {
    color: var(--color-primary);
    width: 24px;
    height: 24px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}
.sidebar-link i {
    width: 18px;
    height: 18px;
}
.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.03);
}
.sidebar-link.active {
    color: white;
    background: rgba(5, 150, 105, 0.15);
    border: 1px solid rgba(5, 150, 105, 0.3);
}

.badge {
    position: absolute;
    right: 0.85rem;
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
}
.badge-pulse {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
    animation: pulse-ring 1.5s infinite;
}

.sidebar-user {
    border-top: 1px solid var(--border-color);
    padding-top: 1.2rem;
}
.user-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}
.profile-tier {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.points-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.points-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: #f59e0b;
    font-size: 1.15rem;
}
.points-summary .points-label {
    font-size: 0.7rem;
    font-weight: 700;
}

/* Main content structure */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(5, 150, 105, 0.05), transparent 60%);
}

.content-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.content-header h2 {
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.streak-pill {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.streak-pill:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.02);
}
.streak-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.score-pill {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.4rem 0.95rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.score-icon {
    width: 16px;
    height: 16px;
}

.scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Tab Panels */
.tab-panel {
    display: none;
    animation: fade-in 0.3s ease;
}
.tab-panel.active {
    display: block;
}

/* ==========================================================================
   TAB: OVERVIEW CONTENT
   ========================================================================== */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon-wrapper i {
    width: 22px;
    height: 22px;
}

.bg-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.bg-green { background: rgba(5, 150, 105, 0.15); color: #059669; }
.bg-amber { background: rgba(217, 119, 6, 0.15); color: #d97706; }

.stat-num {
    display: block;
    font-size: 1.6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.tier-progress-card {
    border-left: 4px solid var(--color-primary);
}
.tier-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tier-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #f59e0b;
}
.tier-badge i {
    width: 20px;
    height: 20px;
}
.next-tier-info {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
#points-needed {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}

.card-title {
    font-size: 1.15rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.activity-item {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.75rem;
}
.activity-item:last-child {
    border: none;
    padding: 0;
}
.activity-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 0.4rem;
    flex-shrink: 0;
}
.activity-meta {
    flex-grow: 1;
}
.activity-time {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}

.quest-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.quest-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
}
.quest-reward {
    color: var(--color-success);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==========================================================================
   TAB: SEARCH DATABASE
   ========================================================================== */
.search-bar-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}
.search-input-wrapper {
    position: relative;
    width: 100%;
}
.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 18px;
    height: 18px;
}
.search-input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}
.search-input-wrapper input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
}

.filters-row {
    display: flex;
    gap: 1rem;
}
.filter-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    color: white;
    outline: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.db-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    padding: 0 0.5rem;
}
.db-matches {
    color: var(--color-text-muted);
    font-weight: 500;
}
.db-profile-info {
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.db-profile-info b {
    color: white;
}

.scholarship-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 1.5rem;
}

.scholarship-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.sc-title {
    font-size: 1.15rem;
    line-height: 1.3;
    max-width: 75%;
}
.sc-provider {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: block;
    margin-top: 0.15rem;
}
.sc-amount {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--color-success);
}

.sc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.c-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
}
.badge-low { background: rgba(16, 185, 129, 0.1); color: #34d399; }
.badge-medium { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.badge-high { background: rgba(239, 68, 68, 0.1); color: #f87171; }

.sc-criteria {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.2rem;
}
.criteria-item {
    display: flex;
    justify-content: space-between;
}
.criteria-val {
    color: var(--color-text-muted);
    font-weight: 500;
}

.sc-odds-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.odds-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.odds-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.odds-number {
    font-weight: 700;
    font-size: 0.95rem;
}
.odds-high { color: var(--color-success); }
.odds-medium { color: var(--color-warning); }
.odds-low { color: var(--color-danger); }

.sc-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-icon:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}
.btn-icon-danger:hover {
    color: white;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   TAB: MY TRACKER PIPELINE
   ========================================================================== */
.tracker-pipeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: flex-start;
}

.pipeline-column {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 70vh;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}
.column-header h3 {
    font-size: 1.05rem;
}
.column-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}
.badge-blue { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }
.badge-amber { background: rgba(217, 119, 6, 0.1); color: #d97706; }
.badge-green { background: rgba(5, 150, 105, 0.1); color: #059669; }

.column-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 60vh;
}

.tracker-card {
    background: #151c2e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    transition: var(--transition-fast);
}
.tracker-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.tc-title {
    font-size: 0.95rem;
    font-weight: 600;
}
.tc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0.75rem 0;
}

.tracker-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
}
.tracker-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.tracker-checklist input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: var(--color-primary);
}
.tracker-checklist li.checked-label {
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.tc-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

/* ==========================================================================
   TAB: SCHOLAR DUELS
   ========================================================================== */
.duels-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
}

.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}
.leaderboard-row.current-user {
    background: rgba(5, 150, 105, 0.1);
    border-color: var(--border-color-active);
}
.l-rank {
    width: 32px;
    font-weight: 700;
    color: var(--color-text-muted);
}
.leaderboard-row.current-user .l-rank {
    color: white;
}
.l-avatar-wrapper {
    position: relative;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    flex-shrink: 0;
    margin-right: 0.6rem;
}
.l-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}
.l-name {
    flex-grow: 1;
    font-weight: 500;
}
.l-points {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #fbbf24;
}

.card-description {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.active-duels-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.active-duel-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
}
.active-duel-card.active-state {
    border-style: solid;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.02);
}
.duel-vs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.85rem;
}
.duel-score-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0.35rem 0;
}
.duel-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   TAB: FRIENDS
   ========================================================================== */
.friends-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
}

/* Friend Code Display */
.friend-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid transparent;
    border-radius: 12px;
    background-image: linear-gradient(rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.9)),
                      linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-secondary));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    text-align: center;
}

.friend-code-value {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--color-text-main);
    user-select: all;
}

.copy-code-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}
.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}
.copy-code-btn.copied {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Add Friend Form */
.add-friend-form {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.add-friend-form .form-input {
    flex: 1;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.05em;
}

/* Pending Request Card */
.pending-request-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
}
.pending-request-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}
.pending-request-card .l-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.pending-request-info {
    flex: 1;
    min-width: 0;
}
.pending-request-info .l-name {
    font-size: 0.9rem;
    font-weight: 600;
}
.pending-request-info .pending-request-time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.pending-request-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Friend List Row */
.friend-list-row {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    gap: 0.75rem;
}
.friend-list-row:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

/* Friend Status Dot */
.friend-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-text-muted);
    transition: background-color var(--transition-fast);
}
.friend-status-dot.online {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}
.friend-status-dot.offline {
    background: rgba(156, 163, 175, 0.5);
}

/* Friend Action Buttons */
.btn-accept {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    transition: var(--transition-fast);
}
.btn-accept:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.btn-decline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    transition: var(--transition-fast);
}
.btn-decline:hover {
    background: rgba(239, 68, 68, 0.22);
    transform: translateY(-1px);
}

.btn-remove-friend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: rgba(248, 113, 113, 0.7);
    margin-left: auto;
    transition: var(--transition-fast);
}
.btn-remove-friend:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

/* ==========================================================================
   DUEL HISTORY
   ========================================================================== */
.duel-history-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.duel-history-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
    border-left: 3px solid var(--border-color);
    transition: var(--transition-fast);
}
.duel-history-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}
.duel-history-card.won {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.03);
}
.duel-history-card.won:hover {
    background: rgba(16, 185, 129, 0.06);
}
.duel-history-card.lost {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.03);
}
.duel-history-card.lost:hover {
    background: rgba(239, 68, 68, 0.06);
}
.duel-history-card.draw {
    border-left-color: rgba(156, 163, 175, 0.5);
}

.duel-outcome-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.55rem;
    border-radius: 50px;
    text-transform: uppercase;
}
.duel-outcome-badge.badge-win {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}
.duel-outcome-badge.badge-loss {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}
.duel-outcome-badge.badge-draw {
    background: rgba(156, 163, 175, 0.12);
    color: #9ca3af;
}

.duel-history-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.duel-history-score {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   DUEL COUNT BADGE
   ========================================================================== */
.duel-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    background: rgba(5, 150, 105, 0.12);
    color: #a5b4fc;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.duel-count-badge.at-limit {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

/* ==========================================================================
   TAB: PROFILE VAULT
   ========================================================================== */
.vault-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.section-divider-title {
    font-size: 1rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
}

.file-upload-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.file-upload-preview i {
    width: 24px;
    height: 24px;
}
.file-details {
    display: flex;
    flex-direction: column;
}
.file-name {
    font-size: 0.85rem;
    font-weight: 500;
}
.file-size {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Mock browser simulator */
.mock-browser-window {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.mock-browser-header {
    background: #1e293b;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.browser-dots {
    display: flex;
    gap: 0.25rem;
}
.browser-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.browser-address {
    flex-grow: 1;
    background: #0f172a;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    padding: 0.2rem 0.75rem;
    border-radius: 4px;
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mock-browser-body {
    padding: 1rem;
    min-height: 150px;
}
.sim-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.sim-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.sim-field label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 0.2rem;
}
.sim-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: #e2e8f0;
    font-size: 0.8rem;
    outline: none;
    transition: background-color 0.5s ease;
}
.sim-input.highlight-fill {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: white;
}

/* ==========================================================================
   TAB: CALENDAR SYNC
   ========================================================================== */
.calendar-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
}

.calendar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.calendar-month-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cal-nav-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}
.cal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}
.cal-nav-btn i {
    width: 14px;
    height: 14px;
}
.calendar-month-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}
.cal-day-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    padding-bottom: 0.4rem;
}
.cal-day {
    aspect-ratio: 1.2;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cal-day.empty {
    border: none;
    background: transparent;
}
.cal-day.has-deadline {
    background: rgba(5, 150, 105, 0.05);
    border-color: rgba(5, 150, 105, 0.3);
}
.day-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    align-self: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.day-dot:hover {
    transform: scale(1.6);
    box-shadow: 0 0 8px currentColor;
}
.bg-blue { background: #3b82f6; }
.bg-amber { background: #d97706; }
.bg-green { background: #059669; }
.bg-red { background: #ef4444; }
.bg-muted { background: rgba(148, 163, 184, 0.4); }

.day-num {
    font-weight: 600;
}

.cal-day.is-today {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
    font-weight: 700;
}

.tracked-deadlines-summary h4 {
    font-size: 0.9rem;
    font-weight: 600;
}
.summary-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.summary-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}
.summary-list .dl-date {
    color: var(--color-warning);
    font-weight: 600;
}

.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    justify-content: center;
    width: 100%;
}
.sync-status i {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   MODALS & TOAST NOTIFICATION OVERLAYS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}
.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
}
.modal-header i {
    width: 20px;
    height: 20px;
}
.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}
.modal-close-btn:hover {
    color: white;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Level Up / Congratulations modal specific styling */
.congrats-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}
.congrats-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.congrats-card {
    max-width: 380px;
    text-align: center;
    background: #0f1322;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 40px 0 rgba(168, 85, 247, 0.2);
}

.congrats-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(168, 85, 247, 0.15);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}
.congrats-icon {
    width: 32px;
    height: 32px;
}

.congrats-title {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #059669 0%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.congrats-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.tier-reveal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
}
.old-tier {
    color: var(--color-text-muted);
    text-decoration: line-through;
}
.new-tier {
    color: #f59e0b;
}

/* Toast styling */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
}
.toast {
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem 1.2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 360px;
    animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s ease;
}
.toast.toast-success {
    border-left: 4px solid var(--color-success);
}
.toast.toast-info {
    border-left: 4px solid var(--color-secondary);
}
.toast.toast-warning {
    border-left: 4px solid var(--color-warning);
}
.toast-message {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: float 5s ease-in-out infinite;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.animate-scale {
    animation: scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* ==========================================================================
   MEDIA QUERIES (MOBILE RESPONSIVENESS)
   ========================================================================== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 6rem;
        gap: 2rem;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .navbar .nav-links a:not(.btn) {
        display: none;
    }
    
    #dashboard {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        align-items: center;
        padding: 0.75rem 1rem;
    }
    .sidebar-nav {
        flex-direction: row;
        margin: 0;
        gap: 0.2rem;
        overflow-x: auto;
    }
    .sidebar-link span, .sidebar-user, .sidebar-logo span {
        display: none;
    }
    .sidebar-logo {
        border-bottom: none;
        padding: 0;
    }
    .sidebar-link {
        padding: 0.5rem;
    }
    .badge {
        position: static;
        margin-left: 0.25rem;
    }
    .scroll-container {
        padding: 1rem;
    }
    .duels-grid, .friends-grid, .vault-container, .calendar-layout, .overview-grid, .funding-tier-grid {
        grid-template-columns: 1fr;
    }
    .tracker-pipeline {
        grid-template-columns: 1fr;
    }
    .pipeline-column {
        min-height: auto;
    }
}

/* =========================================================
   EXPIRED DEADLINE NOTIFICATION BANNERS
========================================================= */
.expired-notifications-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.expired-notif-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 12px 18px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-size: 0.875rem;
    animation: fadeIn 0.3s ease-out;
}

.expired-notif-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.expired-notif-icon {
    color: #ef4444;
    flex-shrink: 0;
}

.expired-notif-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.expired-notif-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* ================= AVATAR & BANNER CUSTOMIZATION ================= */

/* Sidebar banner strip behind user panel */
.sidebar-user {
    position: relative;
    overflow: hidden;
}

.sidebar-banner-bg {
    position: absolute;
    top: 0;
    left: -16px;
    right: -16px;
    height: 72px;
    background-size: cover;
    background-position: center;
    border-radius: 12px 12px 0 0;
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.sidebar-user:hover .sidebar-banner-bg {
    opacity: 0.55;
}

.sidebar-user .user-summary {
    position: relative;
    z-index: 2;
}

.sidebar-user .points-summary {
    position: relative;
    z-index: 2;
}

/* Avatar image override (replaces letter) */
.user-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-letter.has-avatar-img {
    display: none;
}

/* Customize button on sidebar */
.btn-customize-profile {
    position: relative;
    z-index: 2;
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.3);
    color: var(--color-text-main);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    margin-top: 8px;
    transition: all 0.25s ease;
}

.btn-customize-profile:hover {
    background: rgba(5, 150, 105, 0.22);
    border-color: rgba(5, 150, 105, 0.5);
    transform: translateY(-1px);
}

/* ================= AVATAR/BANNER PICKER MODAL ================= */

.avatar-banner-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease;
}

.avatar-banner-modal-overlay.show {
    display: flex;
}

.avatar-banner-modal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease;
}

.avatar-banner-modal-header {
    padding: 20px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.avatar-banner-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-banner-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.avatar-banner-modal-close:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
}

.avatar-banner-modal-body {
    padding: 16px 24px 24px;
}

/* Preview Card */
.profile-preview-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    height: 100px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.preview-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.preview-avatar-container {
    position: absolute;
    bottom: 10px;
    left: 16px;
    z-index: 2;
}

.preview-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: var(--card-bg);
}

.preview-user-info {
    position: absolute;
    bottom: 14px;
    left: 92px;
    z-index: 2;
}

.preview-user-info .preview-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.preview-user-info .preview-tier {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Section headings */
.picker-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Avatar Grid */
.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.avatar-pick-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.avatar-pick-item:hover {
    border-color: rgba(5, 150, 105, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.15);
}

.avatar-pick-item.selected {
    border-color: var(--accent);
    background: rgba(5, 150, 105, 0.1);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.avatar-pick-item.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    color: #fff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.avatar-pick-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.avatar-pick-name {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    padding: 2px 4px;
    border-radius: 0 0 10px 10px;
}

/* Banner Grid */
.banner-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.banner-pick-item {
    position: relative;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    overflow: hidden;
    height: 56px;
    transition: all 0.2s ease;
}

.banner-pick-item:hover {
    border-color: rgba(5, 150, 105, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.15);
}

.banner-pick-item.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.banner-pick-item.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 2;
}

.banner-pick-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-pick-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    padding: 4px;
}

/* Save button */
.avatar-banner-modal-footer {
    padding: 0 24px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Header brand corner widget */
.header-brand-corner {
    position: relative;
    width: 160px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.header-brand-corner:hover {
    border-color: rgba(5, 150, 105, 0.4);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.15);
    transform: translateY(-1px);
}

.header-brand-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.header-brand-avatar {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
    z-index: 2;
    background: var(--card-bg);
}

.header-brand-name {
    position: absolute;
    left: 42px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

@media (max-width: 768px) {
    .avatar-picker-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .banner-picker-grid {
        grid-template-columns: 1fr;
    }
    .header-brand-corner {
        display: none;
    }
}

/* ==========================================================================
   ADA & WCAG 2.1 AA ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Skip to main content link for keyboard & screen reader navigation */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--color-primary);
    color: #ffffff !important;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10000;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: top 0.2s ease-in-out;
}
.skip-link:focus {
    top: 1rem;
    outline: 3px solid #ffffff !important;
}

/* Accessible visible focus ring for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--color-primary) !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}

/* Screen reader only utility class */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Respect user's motion preferences (vestibular safety) */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   ERROR BOUNDARY & ASYNC STATE SYSTEM (LOADING SKELETON, EMPTY, ERROR)
   ========================================================================== */

/* --- Error Boundary Overlay & Modal --- */
.error-boundary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 11, 20, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.error-boundary-card {
    max-width: 580px;
    width: 100%;
    background: var(--bg-card-solid, #111827);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(239, 68, 68, 0.15);
}

.error-boundary-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.error-boundary-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    flex-shrink: 0;
}

.error-boundary-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f3f4f6;
    margin-bottom: 0.25rem;
}

.error-boundary-subtitle {
    font-size: 0.9rem;
    color: #9ca3af;
}

.error-boundary-body {
    margin-bottom: 1.5rem;
}

.error-boundary-msg {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #ef4444;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.92rem;
    color: #fca5a5;
    font-family: monospace;
    word-break: break-word;
    margin-bottom: 1rem;
}

.error-details-summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #9ca3af;
    user-select: none;
    padding: 0.3rem 0;
    transition: color 0.2s;
}
.error-details-summary:hover {
    color: #e5e7eb;
}

.error-stack-trace {
    margin-top: 0.5rem;
    background: #0b0f19;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #d1d5db;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.error-boundary-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* --- Skeleton Shimmer Loader --- */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-box {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.10) 37%,
        rgba(255, 255, 255, 0.04) 63%
    );
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 6px;
}

.skeleton-card {
    padding: 1.5rem;
    border-radius: 14px;
    background: var(--bg-card, rgba(17, 24, 39, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1rem;
}

.skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-badge {
    width: 90px;
    height: 24px;
    border-radius: 12px;
}

.skeleton-title {
    width: 65%;
    height: 24px;
}

.skeleton-text {
    width: 100%;
    height: 14px;
}

.skeleton-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.skeleton-btn {
    width: 100px;
    height: 36px;
    border-radius: 8px;
}

.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-card, rgba(17, 24, 39, 0.7));
    margin-bottom: 0.75rem;
}

.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
}

.skeleton-content {
    flex-grow: 1;
}

.skeleton-stat {
    height: 70px;
    border-radius: 10px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.skeleton-bar {
    width: 100%;
    height: 38px;
    border-radius: 8px;
}

/* --- Empty State Container --- */
.empty-state-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 16px;
    background: var(--bg-card, rgba(17, 24, 39, 0.7));
    border: 1px dashed rgba(255, 255, 255, 0.12);
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: var(--color-primary, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main, #f3f4f6);
    margin-bottom: 0.5rem;
}

.empty-state-message {
    font-size: 0.92rem;
    color: var(--color-text-muted, #9ca3af);
    max-width: 420px;
    line-height: 1.5;
}

/* --- Async Error State Container --- */
.async-error-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.async-error-icon {
    color: #ef4444;
    margin-bottom: 1rem;
}

.async-error-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f3f4f6;
    margin-bottom: 0.4rem;
}

.async-error-message {
    font-size: 0.9rem;
    color: #fca5a5;
    max-width: 400px;
}

/* ==========================================================================
   FRIEND PROFILE MODAL & AVATAR / BANNER STYLES
   ========================================================================== */
.friend-profile-modal-card {
    max-width: 520px;
    padding: 0 !important;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #0f172a;
}

.friend-profile-modal-card .modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.friend-profile-modal-card .modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
}

.friend-card-banner {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.friend-card-header {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    padding: 0 1.5rem;
    margin-top: -45px;
}

.friend-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #0f172a;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.friend-modal-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.friend-avatar-wrapper .avatar-letter {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
}

.friend-avatar-wrapper .avatar-ring {
    width: 86px !important;
    height: 86px !important;
    top: -3px !important;
    left: -3px !important;
}

.friend-modal-meta {
    padding-bottom: 6px;
}
.friend-modal-meta h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.friend-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0 1.5rem;
}

.friend-stat-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}
.friend-stat-box .stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--color-text-muted, #9ca3af);
    letter-spacing: 0.5px;
}
.friend-stat-box .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 4px;
}

.friend-bio-box {
    padding: 0 1.5rem;
}
.friend-bio-box .bio-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}
.friend-bio-box .bio-text {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.friend-profile-modal-card .modal-footer {
    padding: 1rem 1.5rem 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

/* Avatar Image in Leaderboard & Friend Lists */
.l-avatar-img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

.l-avatar-wrapper .avatar-ring {
    width: 34px !important;
    height: 34px !important;
    top: -3px !important;
    left: -3px !important;
}

/* Compact Duel Avatars */
.duel-avatar-mini {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    flex-shrink: 0;
}

.leaderboard-row, .friend-list-row {
    cursor: pointer;
    padding: 0.45rem 0.75rem;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.leaderboard-row:hover, .friend-list-row:hover {
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}


