/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --color-bg-primary: #050810;
    --color-bg-secondary: #0a0f1a;
    --color-bg-card: rgba(12, 18, 30, 0.85);

    --color-accent-cyan: #00eaff;
    --color-accent-blue: #0077ff;
    --color-accent-purple: #8a2be2;
    --color-accent-green: #27ca40;
    --color-accent-red: #ff5f56;
    --color-accent-yellow: #ffbd2e;

    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-muted: rgba(255, 255, 255, 0.5);

    --color-border: rgba(0, 234, 255, 0.2);
    --color-border-hover: rgba(0, 234, 255, 0.5);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00eaff 0%, #0077ff 100%);
    --gradient-accent: linear-gradient(135deg, #00eaff 0%, #0077ff 50%, #8a2be2 100%);

    /* Shadows */
    --shadow-glow-sm: 0 0 20px rgba(0, 234, 255, 0.3);
    --shadow-glow-md: 0 0 40px rgba(0, 234, 255, 0.25);
    --shadow-glow-lg: 0 4px 30px rgba(0, 234, 255, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --header-height: 80px;
    --container-max: 1400px;
    --container-padding: clamp(1rem, 5vw, 5rem);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}



.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(0, 140, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 60%),
        var(--color-bg-primary);
    z-index: -2;
}

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 234, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 234, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
}


.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(5, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.site-header.scrolled {
    background: rgba(5, 8, 16, 0.95);
    box-shadow: var(--shadow-glow-sm);
}

.header-container {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo */
.logo-box {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1001;
}

.logo-img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(0, 234, 255, 0.4));
    transition: transform var(--transition-normal);
}

.logo-box:hover .logo-img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-text-primary);
}

.logo-accent {
    color: var(--color-accent-cyan);
}

.logo-domain {
    color: var(--color-accent-blue);
    font-weight: 600;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 234, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
}

.lang-switcher:hover {
    border-color: var(--color-accent-cyan);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.1);
}

.lang-btn {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-text-muted);
    padding: 2px 4px;
    transition: all var(--transition-fast);
    border-radius: 4px;
}

.lang-btn:hover {
    color: var(--color-text-primary);
}

.lang-btn.active {
    color: var(--color-bg-primary);
    background: var(--color-accent-cyan);
    box-shadow: 0 0 8px rgba(0, 234, 255, 0.4);
}

.lang-divider {
    width: 1px;
    height: 12px;
    background: var(--color-border);
}

/* Theme Toggle Button (Day / Night Mode) */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
}

.theme-toggle-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 4px;
    background: rgba(0, 234, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.theme-toggle-pill:hover {
    border-color: var(--color-accent-cyan);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
}

.theme-toggle-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: var(--color-text-muted);
    transition: color var(--transition-normal), transform var(--transition-normal);
}

.theme-toggle-icon svg {
    width: 14px;
    height: 14px;
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-accent-cyan);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
}

.theme-toggle-pill .moon-icon {
    color: var(--color-bg-primary);
}

.theme-toggle-pill .sun-icon {
    color: var(--color-text-muted);
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 2rem;
    min-width: 0;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    text-align: center;
    white-space: nowrap;
    transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
    color: var(--color-text-primary);
    background: rgba(0, 234, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 234, 255, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: calc(100% - 20px);
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.6);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    opacity: 0;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* Active nav link (current page) */
.nav-link.active {
    color: var(--color-accent-cyan);
    background: rgba(0, 234, 255, 0.08);
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
    box-shadow: 0 0 10px var(--color-accent-cyan);
}

/* Home icon in nav */
.nav-home-icon {
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
    fill: currentColor;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.nav-link:hover .nav-home-icon {
    transform: scale(1.1);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.btn-nav-secondary {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-nav-secondary:hover {
    color: var(--color-accent-cyan);
    background: rgba(0, 234, 255, 0.06);
    border-color: rgba(0, 234, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.15);
}

.btn-nav-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-bg-primary);
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-glow-sm);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.btn-nav-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    padding-top: var(--header-height);
}

/* ========================================
   HOMEPAGE - HERO SECTION
   ======================================== */

.hero-section {
    min-height: calc(100vh - var(--header-height));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(3rem, 8vh, 6rem) var(--container-padding);
    max-width: var(--container-max);
    margin: 0 auto;
    position: relative;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 234, 255, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(0, 119, 255, 0.12) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 234, 255, 0.08);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent-cyan);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.badge-icon {
    font-size: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.25vw, 1.25rem);
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: var(--color-bg-primary);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow-lg);
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(0, 234, 255, 0.5);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--color-border-hover);
    color: var(--color-accent-cyan);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background: rgba(0, 234, 255, 0.1);
    border-color: var(--color-accent-cyan);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* ========================================
   HERO - TERMINAL
   ======================================== */

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease-out 0.4s both;
}

.cyber-terminal {
    width: 100%;
    max-width: 480px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-glow-md), var(--shadow-card);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--color-border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: var(--color-accent-red);
}

.terminal-dot.yellow {
    background: var(--color-accent-yellow);
}

.terminal-dot.green {
    background: var(--color-accent-green);
}

.terminal-title {
    margin-left: 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-family: 'Consolas', 'Monaco', monospace;
}

.terminal-body {
    padding: 1.25rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
}

.terminal-line {
    color: var(--color-text-secondary);
}

.terminal-line .prompt {
    color: var(--color-accent-cyan);
    margin-right: 0.5rem;
}

.terminal-line.output {
    color: var(--color-text-muted);
    padding-left: 1.25rem;
}

.terminal-line.output.success {
    color: var(--color-accent-green);
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--color-accent-cyan);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   FEATURES SECTION
   ======================================== */

.features-section {
    padding: clamp(4rem, 10vh, 6rem) var(--container-padding);
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--color-accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    position: relative;
    padding: 2rem 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-glow-md);
}

.feature-card .feature-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.feature-card:hover .feature-glow {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-accent-cyan);
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
    padding: clamp(3rem, 8vh, 5rem) var(--container-padding);
    max-width: var(--container-max);
    margin: 0 auto;
}

.cta-card {
    padding: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.08) 0%, rgba(0, 119, 255, 0.08) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.08) 0%, transparent 50%);
    animation: rotateBg 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateBg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.cta-card h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 900;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-card p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-primary);
    color: var(--color-bg-primary);
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow-lg);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 50px rgba(0, 234, 255, 0.5);
}

/* Operative Mission Station (Authenticated CTA) */
.cta-operative-card {
    background: linear-gradient(180deg, rgba(16, 26, 46, 0.95) 0%, rgba(10, 17, 32, 0.98) 100%);
    border: 1px solid rgba(0, 234, 255, 0.25);
    box-shadow: 0 10px 40px -10px rgba(0, 234, 255, 0.15), inset 0 1px 0 rgba(0, 234, 255, 0.2);
}

.cta-operative-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(0, 234, 255, 0.08);
    border: 1px solid rgba(0, 234, 255, 0.25);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-primary);
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.operative-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: operativePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes operativePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

.cta-user-name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.cta-operative-desc {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.cta-operative-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.cta-operative-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.cta-operative-actions svg {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.cta-operative-actions .btn-primary {
    background: var(--gradient-primary);
    color: #020817;
    box-shadow: 0 4px 20px rgba(0, 234, 255, 0.35);
}

.cta-operative-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 234, 255, 0.55);
}

.cta-operative-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.cta-operative-actions .btn-secondary:hover {
    background: rgba(0, 234, 255, 0.1);
    border-color: rgba(0, 234, 255, 0.4);
    color: var(--color-accent-primary);
    transform: translateY(-2px);
}



/* Dropdown Menu */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle-group {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-glow-sm);
    transition: all var(--transition-normal);
    background: var(--gradient-primary);
}

.dropdown-toggle-group:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
}

.dropdown-toggle-group.active {
    box-shadow: var(--shadow-glow-md);
}

.dropdown-toggle-group.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.dropdown-account-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-bg-primary);
    background: transparent;
    text-decoration: none;
    transition: background var(--transition-fast);
}

.dropdown-account-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 0.75rem;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--color-bg-primary);
    transition: transform 0.3s ease;
}

.user-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    margin-top: 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1002;
    overflow: hidden;
}

.user-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(0, 234, 255, 0.08);
    color: var(--color-text-primary);
    padding-left: 1.5rem;
}

.dropdown-item.danger:hover {
    background: rgba(255, 95, 86, 0.15);
    color: var(--color-accent-red);
}

.dropdown-logout-form {
    margin: 0;
    padding: 0;
}

.dropdown-icon {
    font-size: 1.1em;
}

.site-footer {
    padding: 3rem var(--container-padding) 1.5rem;
    border-top: 1px solid var(--color-border);
    background: rgba(5, 8, 16, 0.6);
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.footer-logo span {
    color: var(--color-accent-blue);
}

.footer-brand p {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    transition: color var(--transition-normal);
}

.footer-links a:hover {
    color: var(--color-accent-cyan);
}

.footer-bottom {
    max-width: var(--container-max);
    margin: 0 auto;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* ========================================
   AUTH FORMS
   ======================================== */

.auth-card {
    max-width: 440px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-glow-md), var(--shadow-card);
    backdrop-filter: blur(10px);
}

/* Login card — compact to fit on one screen */
.login-card {
    margin: 1.5rem auto;
    padding: 1.75rem 2rem;
}

.login-card .login-header {
    margin-bottom: 1rem;
    text-align: center;
}

.login-card .login-header .lock-icon {
    font-size: 1.6rem;
}

.login-card .login-header .system-status {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.25rem;
}

.login-card .login-header .login-title {
    font-size: 1.6rem;
    margin: 0 0 0.25rem;
}

.login-card .input-group {
    margin-bottom: 1rem;
}

.login-card .auth-btn {
    margin-top: 1rem;
}

.login-card .footer-bottom {
    margin-top: 1rem !important;
}

/* Register card — compact to fit on one screen */
.register-card {
    margin: 1.5rem auto;
    padding: 1.75rem 2rem;
}

.register-card .auth-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.register-card .input-group {
    margin-bottom: 1rem;
}

.register-card .auth-btn {
    margin-top: 1rem;
}

.register-card .footer-bottom {
    margin-top: 1rem !important;
}

.auth-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--color-accent-cyan);
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.input-group label {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.input-group select,
.input-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-normal);
}

.input-group select:focus,
.input-group input:focus {
    outline: none;
    border-color: var(--color-accent-cyan);
}

.input-group select option {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

/* Fix browser autofill overriding dark background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--color-text-primary) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--color-bg-secondary) inset !important;
    box-shadow: 0 0 0px 1000px var(--color-bg-secondary) inset !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--color-text-primary);
}

.pass-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    padding-right: 3rem;
}

.eye-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--color-accent-cyan);
    z-index: 10;
    transition: color 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
}

.eye-btn:hover {
    color: var(--color-text-primary);
    opacity: 0.85;
}

.eye-btn svg {
    pointer-events: none;
    display: block;
}

.auth-btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--gradient-primary);
    color: var(--color-bg-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00eaff 0%, #0077ff 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.auth-btn:hover::before {
    opacity: 1;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Compact Desktop Navigation */
@media (max-width: 1100px) and (min-width: 969px) {
    .main-nav {
        margin-left: 1rem;
    }
    .nav-link {
        padding: 0.45rem 0.65rem;
        font-size: 0.875rem;
        gap: 0.25rem;
    }
    .nav-actions {
        gap: 0.5rem;
    }
    .btn-nav-primary,
    .btn-nav-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .cyber-terminal {
        max-width: 400px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: rgba(5, 8, 16, 0.98);
        backdrop-filter: blur(20px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        margin: 0;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-link {
        font-size: 1.25rem;
        padding: 0.75rem 1.5rem;
    }

    .nav-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-nav-primary,
    .btn-nav-secondary {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

    .cyber-terminal {
        max-width: 100%;
    }

    .terminal-body {
        font-size: 0.75rem;
        padding: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
    }

    .input-group input {
        font-size: 16px;
        /* Prevent IOS zoom */
    }
}

/* Utility Classes */
.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.25s ease-in;
}

.flag.selected {
    filter: drop-shadow(0 0 10px var(--color-accent-cyan));
    transform: scale(1.05);
}

.lang-glow {
    animation: glowPulse 0.6s ease-out;
}

@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 0px var(--color-accent-cyan));
    }

    50% {
        filter: drop-shadow(0 0 14px var(--color-accent-cyan));
    }

    100% {
        filter: drop-shadow(0 0 4px var(--color-accent-cyan));
    }
}

/* ========================================
   CURSOR TRAIL EFFECT
   ======================================== */

#cursorTrail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   FLOATING PARTICLES
   ======================================== */

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent-cyan);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 20s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.particle:nth-child(3) {
    left: 35%;
    animation-delay: 4s;
    animation-duration: 28s;
}

.particle:nth-child(4) {
    left: 50%;
    animation-delay: 1s;
    animation-duration: 22s;
}

.particle:nth-child(5) {
    left: 65%;
    animation-delay: 3s;
    animation-duration: 26s;
}

.particle:nth-child(6) {
    left: 75%;
    animation-delay: 5s;
    animation-duration: 24s;
}

.particle:nth-child(7) {
    left: 85%;
    animation-delay: 2.5s;
    animation-duration: 21s;
}

.particle:nth-child(8) {
    left: 92%;
    animation-delay: 1.5s;
    animation-duration: 27s;
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
        transform: translateY(90vh) scale(1);
    }

    90% {
        opacity: 0.3;
        transform: translateY(10vh) scale(0.8);
    }

    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* ========================================
   CIRCULAR LOGO WITH ANIMATED RINGS
   ======================================== */

.logo-circle {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-circle .logo-img {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.2);
    z-index: 2;
    background: var(--color-bg-primary);
    padding: 2px;
}

.logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border: 2px solid var(--color-accent-cyan);
    border-radius: 50%;
    opacity: 0.8;
    animation: ringPulse 3s infinite ease-in-out;
}

.logo-ring-2 {
    width: 64px;
    height: 64px;
    border-color: var(--color-accent-blue);
    opacity: 0.5;
    animation-delay: 1.5s;
}

@keyframes ringPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.4;
    }
}

.logo-box:hover .logo-ring {
    border-color: var(--color-accent-cyan);
    box-shadow: 0 0 16px rgba(0, 234, 255, 0.6);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.logo-box:hover .logo-ring-2 {
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 16px rgba(0, 119, 255, 0.5);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text-container .logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* ========================================
   HACKER-STYLE BADGE
   ======================================== */

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.1) 0%, rgba(0, 119, 255, 0.05) 100%);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 234, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--color-accent-green);
    border-radius: 50%;
    animation: pulseDot 2s infinite;
    box-shadow: 0 0 10px var(--color-accent-green);
}

@keyframes pulseDot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.badge-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-weight: 500;
}

.badge-code {
    color: var(--color-accent-cyan);
    font-weight: 700;
}

/* ========================================
   ENHANCED REGISTRATION BUTTON
   ======================================== */

.btn-nav-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -120%;
    width: 70%;
    height: 200%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 80%
    );
    transform: rotate(25deg);
    pointer-events: none;
    opacity: 0;
    transition: left 0.75s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.btn-nav-primary:hover .btn-glow {
    left: 140%;
    opacity: 1;
}

/* ========================================
   ACTIVE NAV LINK
   ======================================== */

.nav-link.active {
    color: var(--color-accent-cyan);
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* ========================================
   LOGIN PAGE UNIQUE STYLES
   ======================================== */

.login-card {
    border-color: var(--color-accent-green);
    box-shadow: 0 0 30px rgba(39, 202, 64, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.system-status {
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-accent-green);
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
}

.login-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: -1px;
    display: inline-block;
}

.cursor {
    display: inline-block;
    width: 12px;
    height: 24px;
    background: var(--color-accent-green);
    animation: blinkCursor 1s infinite;
    vertical-align: middle;
    margin-left: 5px;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.lock-icon {
    font-size: 3rem;
    color: var(--color-accent-green);
    margin-bottom: 1rem;
    display: block;
    animation: pulseLock 3s infinite;
}

@keyframes pulseLock {
    0% {
        text-shadow: 0 0 10px rgba(39, 202, 64, 0.4);
    }

    50% {
        text-shadow: 0 0 25px rgba(39, 202, 64, 0.8);
    }

    100% {
        text-shadow: 0 0 10px rgba(39, 202, 64, 0.4);
    }
}

/* Hacker Theme Utilities */
.hacker-font {
    font-family: 'JetBrains Mono', monospace;
}

.text-accent {
    color: var(--color-accent-green);
}

.btn-hacker {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
}

.btn-hacker::before {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
}

.link-hacker {
    color: var(--color-accent-green);
    font-weight: 700;
    text-decoration: underline;
}

.link-hacker:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--color-accent-green);
}

/* Dropdown Menu */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-bg-primary);
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow-sm);
    transition: all var(--transition-normal);
}

.dropdown-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    margin-top: 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1002;
    overflow: hidden;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(0, 234, 255, 0.08);
    color: var(--color-text-primary);
    padding-left: 1.5rem;
}

.dropdown-item.danger:hover {
    background: rgba(255, 95, 86, 0.15);
    color: var(--color-accent-red);
}

.dropdown-icon {
    font-size: 1.1em;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash-alert {
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease-out forwards;
    min-width: 300px;
}

.flash-success {
    border-color: var(--color-accent-green);
    box-shadow: 0 0 10px rgba(39, 202, 64, 0.2);
}

.flash-danger {
    border-color: var(--color-accent-red);
    box-shadow: 0 0 10px rgba(255, 95, 86, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Challenges Page - CTFd Style */
.challenges-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header .glitch-text {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.page-header .subtitle {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

/* Filters - CTFd Style */
.filters-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn {
    padding: 8px 18px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
}

.filter-btn:hover {
    background: rgba(0, 234, 255, 0.1);
    color: var(--color-accent-cyan);
    border-color: var(--color-accent-cyan);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--color-bg-primary);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.4);
    font-weight: 700;
}

/* Challenges Grid - CTFd Style */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Challenges Grid - Premium Hacking Style */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.challenge-card {
    position: relative;
    background: rgba(12, 18, 30, 0.7);
    border: 1px solid rgba(0, 234, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Premium Gradient Border Effect */
.challenge-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.1), rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.4s ease;
}

.challenge-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 234, 255, 0.1);
    background: rgba(12, 18, 30, 0.85);
}

.challenge-card:hover::before {
    background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue));
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.2);
}

/* Card Glow Animation */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 234, 255, 0.08) 0%, transparent 60%);
    opacity: 0;
    transform: translate(0, 0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.challenge-card:hover .card-glow {
    opacity: 1;
    transform: translate(10px, 10px);
}

/* Header: Level & Difficulty */
.challenge-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lbl-level {
    font-weight: 600;
    color: var(--color-text-secondary);
}

.difficulty-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Difficulty Colors */
.difficulty-badge[data-diff="beginner"] {
    color: #27ca40;
    background: rgba(39, 202, 64, 0.1);
    border: 1px solid rgba(39, 202, 64, 0.2);
    box-shadow: 0 0 10px rgba(39, 202, 64, 0.05);
}

.difficulty-badge[data-diff="intermediate"] {
    color: #ffbd2e;
    background: rgba(255, 189, 46, 0.1);
    border: 1px solid rgba(255, 189, 46, 0.2);
    box-shadow: 0 0 10px rgba(255, 189, 46, 0.05);
}

.difficulty-badge[data-diff="advanced"] {
    color: #ff5f56;
    background: rgba(255, 95, 86, 0.1);
    border: 1px solid rgba(255, 95, 86, 0.2);
    box-shadow: 0 0 10px rgba(255, 95, 86, 0.05);
}

/* Title Styling */
.challenge-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: auto;
    /* Pushes footer down */
    line-height: 1.3;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.challenge-card:hover .challenge-title {
    background: linear-gradient(to right, #fff, #c0fbff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 234, 255, 0.3);
}

/* Footer: Points & Status */
.challenge-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.challenge-points {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent-cyan);
    text-shadow: 0 0 15px rgba(0, 234, 255, 0.4);
    transition: transform 0.3s ease;
}

.challenge-card:hover .challenge-points {
    transform: scale(1.1) translateX(5px);
}

.lbl-points-text {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 500;
}

/* Solved Status */
.challenge-status.solved {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(39, 202, 64, 0.2), rgba(39, 202, 64, 0.1));
    border: 1px solid rgba(39, 202, 64, 0.4);
    border-radius: 50px;
    color: #27ca40;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(39, 202, 64, 0.2);
}

/* ── Solved Flag Image Overlay ──────────────────────────── */
.challenge-card[data-status="solved"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    width: 200px;
    height: 200px;
    background: url("/static/solved_flag.png?v=4") no-repeat center center;
    background-size: contain;
    opacity: 0.45;
    pointer-events: none;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
    filter: drop-shadow(0 0 8px rgba(0, 234, 255, 0.2));
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    box-shadow: 0 0 10px var(--color-accent-cyan);
    opacity: 1;
}

.nav-link.active {
    color: var(--color-accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .challenges-container {
        padding: 40px 15px;
    }

    .filters-bar {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }

    .filter-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .challenges-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   404 ERROR PAGE
   ======================================== */

.error-page-container {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.error-card {
    max-width: 600px;
    width: 100%;
    background: rgba(10, 15, 26, 0.95);
    border: 1px solid var(--color-accent-red);
    box-shadow: 0 0 30px rgba(255, 95, 86, 0.15);
}

.error-content {
    padding: 3rem 2rem;
    text-align: center;
}

.error-code {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900;
    line-height: 1;
    color: var(--color-accent-red);
    margin-bottom: 0.5rem;
    position: relative;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 2px 2px 0px var(--color-accent-cyan), -2px -2px 0px var(--color-accent-purple);
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 26, 0.95);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #00eaff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #ff5f56;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(11px, 9999px, 87px, 0);
    }

    5% {
        clip: rect(93px, 9999px, 11px, 0);
    }

    10% {
        clip: rect(16px, 9999px, 3px, 0);
    }

    15% {
        clip: rect(4px, 9999px, 11px, 0);
    }

    20% {
        clip: rect(67px, 9999px, 98px, 0);
    }

    25% {
        clip: rect(100px, 9999px, 11px, 0);
    }

    30% {
        clip: rect(23px, 9999px, 86px, 0);
    }

    35% {
        clip: rect(86px, 9999px, 18px, 0);
    }

    40% {
        clip: rect(38px, 9999px, 62px, 0);
    }

    45% {
        clip: rect(12px, 9999px, 97px, 0);
    }

    50% {
        clip: rect(54px, 9999px, 45px, 0);
    }

    55% {
        clip: rect(32px, 9999px, 78px, 0);
    }

    60% {
        clip: rect(21px, 9999px, 12px, 0);
    }

    65% {
        clip: rect(89px, 9999px, 34px, 0);
    }

    70% {
        clip: rect(6px, 9999px, 56px, 0);
    }

    75% {
        clip: rect(56px, 9999px, 89px, 0);
    }

    80% {
        clip: rect(34px, 9999px, 12px, 0);
    }

    85% {
        clip: rect(12px, 9999px, 34px, 0);
    }

    90% {
        clip: rect(78px, 9999px, 56px, 0);
    }

    95% {
        clip: rect(45px, 9999px, 78px, 0);
    }

    100% {
        clip: rect(12px, 9999px, 90px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    5% {
        clip: rect(52px, 9999px, 74px, 0);
    }

    10% {
        clip: rect(79px, 9999px, 85px, 0);
    }

    15% {
        clip: rect(75px, 9999px, 5px, 0);
    }

    20% {
        clip: rect(67px, 9999px, 61px, 0);
    }

    25% {
        clip: rect(14px, 9999px, 79px, 0);
    }

    30% {
        clip: rect(1px, 9999px, 66px, 0);
    }

    35% {
        clip: rect(86px, 9999px, 30px, 0);
    }

    40% {
        clip: rect(23px, 9999px, 98px, 0);
    }

    45% {
        clip: rect(85px, 9999px, 72px, 0);
    }

    50% {
        clip: rect(71px, 9999px, 75px, 0);
    }

    55% {
        clip: rect(2px, 9999px, 48px, 0);
    }

    60% {
        clip: rect(30px, 9999px, 16px, 0);
    }

    65% {
        clip: rect(59px, 9999px, 50px, 0);
    }

    70% {
        clip: rect(41px, 9999px, 62px, 0);
    }

    75% {
        clip: rect(2px, 9999px, 82px, 0);
    }

    80% {
        clip: rect(47px, 9999px, 73px, 0);
    }

    85% {
        clip: rect(3px, 9999px, 27px, 0);
    }

    90% {
        clip: rect(26px, 9999px, 55px, 0);
    }

    95% {
        clip: rect(42px, 9999px, 97px, 0);
    }

    100% {
        clip: rect(38px, 9999px, 49px, 0);
    }
}

.error-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.terminal-msg {
    text-align: left;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: 2.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.terminal-line.output.error {
    color: var(--color-accent-red);
}

.prompt.root {
    color: var(--color-accent-red);
    font-weight: bold;
}

.error-actions {
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   FAKE ADMIN HONEYPOT
   ======================================== */

.honeypot-body {
    background-color: #050a10;
    font-family: 'JetBrains Mono', monospace;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
}

.honeypot-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-window {
    background: rgba(10, 15, 26, 0.98);
    border: 1px solid var(--color-accent-red);
    box-shadow: 0 0 50px rgba(255, 95, 86, 0.1);
}

.sys-alert {
    color: var(--color-accent-red);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    font-weight: 800;
}

.sys-msg {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    border-left: 2px solid var(--color-accent-red);
    padding-left: 10px;
    margin-bottom: 2rem;
}

.sys-msg .prefix {
    color: var(--color-accent-red);
    font-weight: bold;
}

/* Fake Disabled Form */
.fake-form {
    opacity: 0.6;
    pointer-events: none;
    /* Crucial: Prevent interaction */
}

.input-group.disabled {
    margin-bottom: 1.2rem;
}

.input-group.disabled label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 5px;
    color: #64748b;
    letter-spacing: 1px;
}

.input-group.disabled input {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    padding: 10px;
    color: #475569;
    font-family: inherit;
    cursor: not-allowed;
}

.terminal-loader {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--color-accent-red);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: 1px dashed var(--color-accent-red);
    padding: 10px;
    background: rgba(255, 95, 86, 0.05);
}

.honey-footer {
    margin-top: 2rem;
    font-size: 0.7rem;
    color: #334155;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}

.trace-ip,
.trace-id {
    color: #475569;
}

/* ========================================
   RATING PAGE STYLES
   ======================================== */

.rating-container {
    max-width: 1100px;
    margin: 2.5rem auto 3.5rem;
    padding: 0 1.5rem;
}

.rating-header-block {
    text-align: center;
    margin-bottom: 2rem;
}

.rating-header-block .rating-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-accent-cyan);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(0, 234, 255, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.rating-header-block .rating-trophy {
    display: inline-flex;
    color: #ffd700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.45));
}

.rating-header-block .rating-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0;
    letter-spacing: 0.2px;
}

.rating-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 234, 255, 0.16);
    background: rgba(12, 18, 30, 0.88);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 234, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 2.5rem;
}

.rating-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin: 0;
}

.rating-table th {
    background: rgba(0, 234, 255, 0.04);
    color: var(--color-accent-cyan);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 234, 255, 0.12);
    white-space: nowrap;
}

.rating-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    transition: background 0.15s ease;
}

.rating-table tbody tr:last-child td {
    border-bottom: none;
}

.rating-table tbody tr:hover td {
    background: rgba(0, 234, 255, 0.035);
}

/* Rank column */
.rating-table .th-rank,
.rating-table .rank-cell {
    width: 90px;
    text-align: center;
}

.rank-cell {
    white-space: nowrap;
}

.rank-number,
.rank-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.rank-badge svg {
    width: 1.25rem;
    height: 1.25rem;
}

.gold-medal {
    color: #ffd700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.silver-medal {
    color: #c0c0c0;
    filter: drop-shadow(0 0 8px rgba(192, 192, 192, 0.5));
}

.bronze-medal {
    color: #cd7f32;
    filter: drop-shadow(0 0 8px rgba(205, 127, 50, 0.5));
}

/* Top 3 row accents */
.gold-row td:first-child {
    border-left: 3px solid #ffd700;
}
.gold-row {
    background: rgba(255, 215, 0, 0.035);
}

.silver-row td:first-child {
    border-left: 3px solid #c0c0c0;
}
.silver-row {
    background: rgba(192, 192, 192, 0.025);
}

.bronze-row td:first-child {
    border-left: 3px solid #cd7f32;
}
.bronze-row {
    background: rgba(205, 127, 50, 0.025);
}

/* User identity */
.user-cell-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.rating-avatar-img,
.rating-avatar-placeholder {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rating-avatar-img {
    object-fit: cover;
    border: 1px solid rgba(0, 234, 255, 0.25);
}

.rating-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.2), rgba(138, 43, 226, 0.3));
    border: 1px solid rgba(0, 234, 255, 0.3);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
}

.user-identity {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.user-primary-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-display-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-primary);
}

.user-handle {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.user-level-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.user-level-tag.level-beginner {
    border-color: rgba(39, 202, 64, 0.3);
    color: #27ca40;
    background: rgba(39, 202, 64, 0.08);
}

.user-level-tag.level-intermediate {
    border-color: rgba(0, 119, 255, 0.3);
    color: #0077ff;
    background: rgba(0, 119, 255, 0.08);
}

.user-level-tag.level-advanced {
    border-color: rgba(255, 75, 75, 0.3);
    color: #ff4b4b;
    background: rgba(255, 75, 75, 0.08);
}

/* Scores */
.score-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
}

.th-ctf, .th-academy, .th-total,
.score-cell {
    text-align: right;
}

.score-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.score-badge.ctf-badge {
    background: rgba(0, 234, 255, 0.08);
    color: #00eaff;
    border: 1px solid rgba(0, 234, 255, 0.2);
}

.score-badge.academy-badge {
    background: rgba(138, 43, 226, 0.1);
    color: #bf7fff;
    border: 1px solid rgba(138, 43, 226, 0.22);
}

.score-total-val {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
    padding-right: 0.25rem;
}

/* Range Switcher in Chart Header */
.chart-range-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 234, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 3px;
}

.chart-range-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-range-btn:hover {
    color: var(--color-text-primary);
}

.chart-range-btn.active {
    background: rgba(0, 234, 255, 0.15);
    color: var(--color-accent-cyan);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.15);
}

@media (max-width: 768px) {
    .rating-container {
        padding: 0 0.75rem;
        margin: 1.5rem auto 2.5rem;
    }

    .rating-header-block .rating-title {
        font-size: 1.6rem;
    }

    .rating-table th,
    .rating-table td {
        padding: 0.75rem 0.65rem;
        font-size: 0.85rem;
    }

    .rating-avatar-img,
    .rating-avatar-placeholder {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */

@media (max-width: 968px) {

    /* Header layout changes */
    .header-container {
        padding: 0 20px;
    }

    /* Show Mobile Menu Button */
    .mobile-menu-btn {
        display: flex;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background: rgba(0, 234, 255, 0.05);
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:hover,
    .mobile-menu-btn:active {
        background: rgba(0, 234, 255, 0.1);
        border-color: var(--color-accent-cyan);
    }

    /* Main Nav Drawer */
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: rgba(5, 8, 16, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 40px 20px;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-top: 1px solid var(--color-border);
        overflow-y: auto;
        z-index: 999;
    }

    .main-nav.active {
        transform: translateX(0);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    /* Navigation List */
    .nav-list {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        margin: 0;
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .main-nav.active .nav-list li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered animation for nav items */
    .main-nav.active .nav-list li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .main-nav.active .nav-list li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .main-nav.active .nav-list li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .main-nav.active .nav-list li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .main-nav.active .nav-list li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-link {
        display: block;
        width: 100%;
        text-align: center;
        padding: 1.25rem;
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:hover {
        background: rgba(0, 234, 255, 0.05);
    }

    .nav-link::after {
        display: none;
        /* Disable desktop underline effect */
    }

    /* Actions Area */
    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 20px;
        margin-top: 10px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease 0.5s;
    }

    .main-nav.active .nav-actions {
        opacity: 1;
        transform: translateY(0);
    }

    /* Language Switcher */
    .lang-switcher {
        margin: 0;
        justify-content: center;
        width: 100%;
        padding: 10px;
        background: rgba(255, 255, 255, 0.03);
    }

    .theme-toggle-btn {
        margin: 0;
        justify-content: center;
        width: 100%;
        padding: 6px 0;
    }

    .lang-btn {
        padding: 8px 16px;
        font-size: 1rem;
    }

    /* Buttons */
    .btn-nav-secondary,
    .btn-nav-primary {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 1rem;
        font-size: 1rem;
    }

    /* User Dropdown adaptation */
    .user-dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.05);
        color: #ffffff;
        /* Explicitly set white color for mobile visibility */
        border: 1px solid var(--color-border);
    }

    /* Show dropdown content in mobile when expanding nav */
    .dropdown-menu {
        position: static;
        width: 100%;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        box-shadow: none;
        margin-top: 10px;
        padding-left: 20px;
    }

    .dropdown-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1rem;
    }
}

/* ========================================
   EDIT PROFILE PAGE - PRODUCTION DESIGN
   ======================================== */

.profile-page {
    min-height: calc(100vh - var(--header-height));
    padding: clamp(1.5rem, 4vh, 3rem) var(--container-padding);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Sidebar ---- */
.profile-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
}

.user-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.user-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.25rem;
}

.user-avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-bg-secondary);
    box-shadow: 0 0 0 3px var(--color-accent-cyan), 0 0 30px rgba(0, 234, 255, 0.2);
}

.user-avatar-placeholder-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-cyan) 0%, var(--color-accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-bg-primary);
    box-shadow: 0 0 0 3px var(--color-bg-secondary), 0 0 30px rgba(0, 234, 255, 0.2);
}

.avatar-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--color-bg-card);
}

.avatar-status.online {
    background: var(--color-accent-green);
    box-shadow: 0 0 8px var(--color-accent-green);
}

.user-display-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.user-handle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1.25rem;
}

.user-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.stat-item-mini {
    text-align: center;
}

.stat-value-mini {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-accent-cyan);
}

.stat-label-mini {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider-mini {
    width: 1px;
    height: 28px;
    background: var(--color-border);
}

/* Sidebar Navigation */
.profile-nav {
    margin-top: 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.profile-nav-item:last-child {
    border-bottom: none;
}

.profile-nav-item:hover {
    background: rgba(0, 234, 255, 0.05);
    color: var(--color-text-primary);
}

.profile-nav-item.active {
    background: rgba(0, 234, 255, 0.08);
    color: var(--color-accent-cyan);
    border-left: 3px solid var(--color-accent-cyan);
}

.nav-icon {
    font-size: 1.1rem;
}

/* ---- Main Content ---- */
.profile-main {
    min-width: 0;
}

.profile-page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

/* ---- Settings Cards ---- */
.settings-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: border-color var(--transition-normal);
}

.settings-card:hover {
    border-color: var(--color-border-hover);
}

.settings-card-warning {
    border-color: rgba(255, 149, 0, 0.3);
}

.settings-card-warning:hover {
    border-color: rgba(255, 149, 0, 0.5);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.2);
}

.card-title-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.card-description {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin: 0;
}

.settings-form {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ---- Form Grid ---- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.field-input,
.field-select,
.field-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    outline: none;
    border-color: var(--color-accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 234, 255, 0.1);
}

.field-input::placeholder,
.field-textarea::placeholder {
    color: var(--color-text-muted);
}

.field-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.field-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

.field-select {
    appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    color: var(--color-text-muted);
    pointer-events: none;
}

/* Password Field */
.password-field {
    position: relative;
}

.password-field .field-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.password-toggle:hover {
    opacity: 1;
}

.eye-icon {
    font-size: 1.1rem;
}

/* Password Requirements */
.password-requirements {
    background: rgba(255, 149, 0, 0.08);
    border: 1px solid rgba(255, 149, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
}

.requirements-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-accent-yellow);
    margin-bottom: 0.5rem;
}

.requirements-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    list-style: none;
}

.requirements-list li {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    padding-left: 1.25rem;
    position: relative;
}

.requirements-list li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: var(--color-text-muted);
}

/* ---- Avatar Editor ---- */
.avatar-editor {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.avatar-preview-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.avatar-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-border);
    transition: border-color var(--transition-fast);
}

.avatar-preview-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-cyan) 0%, var(--color-accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-bg-primary);
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    opacity: 0;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.avatar-preview-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-preview-container:hover .avatar-preview {
    border-color: var(--color-accent-cyan);
}

.avatar-edit-icon {
    font-size: 1.5rem;
}

.avatar-edit-text {
    font-size: 0.75rem;
    color: #fff;
    font-weight: 600;
}

.avatar-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.avatar-requirements {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
}

.file-input {
    display: none;
}

.btn-upload-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-upload-file:hover {
    border-color: var(--color-accent-cyan);
    background: rgba(0, 234, 255, 0.08);
    color: var(--color-accent-cyan);
}

.btn-upload-file .btn-icon {
    font-size: 1rem;
}

.selected-file-name {
    font-size: 0.8125rem;
    color: var(--color-accent-cyan);
    font-family: 'JetBrains Mono', monospace;
    min-height: 1.2em;
}


/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--color-bg-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 234, 255, 0.1);
    color: var(--color-accent-cyan);
    font-size: 0.9375rem;
    font-weight: 600;
    border: 1px solid var(--color-accent-cyan);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background: rgba(0, 234, 255, 0.2);
}

.btn-secondary-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-secondary-outline:hover {
    border-color: var(--color-accent-cyan);
    color: var(--color-accent-cyan);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff9500 0%, #ff5f56 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 95, 86, 0.4);
}

.btn-icon {
    font-size: 1rem;
}

/* ---- Messages ---- */
.message-container {
    margin-bottom: 1rem;
}

.message-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: rgba(39, 202, 64, 0.12);
    border: 1px solid rgba(39, 202, 64, 0.3);
    color: var(--color-accent-green);
}

.message-error {
    background: rgba(255, 95, 86, 0.12);
    border: 1px solid rgba(255, 95, 86, 0.3);
    color: var(--color-accent-red);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .profile-page {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .user-card {
        grid-column: 1;
    }

    .profile-nav {
        grid-column: 2;
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .profile-sidebar {
        grid-template-columns: 1fr;
    }

    .profile-nav {
        grid-column: 1;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .avatar-editor {
        flex-direction: column;
        align-items: flex-start;
    }

    .requirements-list {
        grid-template-columns: 1fr;
    }

    .card-header,
    .settings-form,
    .card-footer {
        padding: 1rem;
    }
}


/* ========================================================================
   ACTIVITY CHART — /rating page
   ======================================================================== */

.activity-chart-card {
    max-width: 1100px;
    margin: 3rem auto 2rem;
    background: rgba(12, 18, 30, 0.85);
    border: 1px solid rgba(0, 234, 255, 0.18);
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 0 1px rgba(0, 234, 255, 0.04),
        0 8px 40px rgba(0, 0, 0, 0.45),
        0 0 60px rgba(0, 234, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem 1.75rem 1rem;
    border-bottom: 1px solid rgba(0, 234, 255, 0.1);
    background: rgba(0, 234, 255, 0.03);
}

.chart-title-group {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.chart-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.3px;
    margin: 0;
}

.chart-subtitle {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.2px;
}

.chart-body {
    padding: 1.5rem 1.75rem 1.75rem;
    position: relative;
}

/* Canvas wrapper — fixed height that adapts on mobile */
.chart-canvas-wrap {
    position: relative;
    height: 300px;
    width: 100%;
}

@media (max-width: 600px) {
    .chart-canvas-wrap {
        height: 220px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.25rem 0.75rem;
    }

    .chart-body {
        padding: 1rem 1rem 1.25rem;
    }

    .activity-chart-card {
        margin: 2rem 0.75rem;
    }
}

.chart-no-data {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    padding: 2.5rem 0;
    margin: 0;
}

/* ========================================
   ICON ALIGNMENT (icon task only)
   ======================================== */
.ui-icon {
    vertical-align: -0.125em;
    flex: 0 0 auto;
}

/* =============================================================================
   DAY MODE / LIGHT THEME (ДНЕВНОЙ РЕЖИМ — БЕЛЫЙ ФОН ДЛЯ БЛОКОВ)
   ============================================================================= */

html[data-theme="light"],
body.light-theme {
    /* Color Palette — Refined Cool Slate & High-Contrast Ink */
    --color-bg-primary: #edf2f7;
    --color-bg-secondary: #e2e8f0;
    --color-bg-card: #ffffff;

    --color-accent-cyan: #0284c7;
    --color-accent-blue: #0062e3;
    --color-accent-purple: #7c3aed;
    --color-accent-green: #059669;
    --color-accent-red: #dc2626;
    --color-accent-yellow: #d97706;

    --color-text-primary: #090d16;
    --color-text-secondary: #27364b;
    --color-text-muted: #4b5d75;

    --color-border: #d3dce6;
    --color-border-hover: #0062e3;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0062e3 0%, #0284c7 100%);
    --gradient-accent: linear-gradient(135deg, #0062e3 0%, #0284c7 50%, #7c3aed 100%);

    /* Shadows — Multi-layered Tactile Elevation */
    --shadow-glow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    --shadow-glow-md: 0 4px 14px 0 rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.05);
    --shadow-glow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
    --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);

    /* Academy compatibility */
    --ac-bg: #edf2f7;
    --ac-surface: #ffffff;
    --ac-surface-hover: #f8fafc;
    --ac-card: #ffffff;
    --ac-card-elevated: #ffffff;
    --ac-border: #d3dce6;
    --ac-border-hover: #0062e3;
    --ac-text-1: #090d16;
    --ac-text-2: #27364b;
    --ac-text-3: #4b5d75;
    --ac-text-muted: #64748b;
    --ac-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
    --ac-shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.12);
}

/* Base Body & Background in Light Theme */
html[data-theme="light"] body {
    background: #edf2f7;
    color: #090d16;
}

html[data-theme="light"] .cyber-bg {
    background:
        radial-gradient(ellipse at 15% 25%, rgba(0, 98, 227, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 75%, rgba(2, 132, 199, 0.07) 0%, transparent 45%),
        #edf2f7;
}

html[data-theme="light"] .cyber-grid {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

html[data-theme="light"] .form-bg {
    background: #edf2f7;
}

html[data-theme="light"] .floating-particles .particle {
    background: rgba(0, 98, 227, 0.25);
    box-shadow: 0 0 8px rgba(0, 98, 227, 0.3);
}

/* Header in Light Theme */
html[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #d3dce6;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #c5d2e0;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.09);
}

html[data-theme="light"] .nav-link {
    color: #334155;
    font-weight: 600;
}

html[data-theme="light"] .nav-link:hover {
    color: #0062e3;
    background: #eff6ff;
}

html[data-theme="light"] .nav-link.active {
    color: #0062e3;
    background: #eff6ff;
    font-weight: 700;
    text-shadow: none;
}

html[data-theme="light"] .nav-link::after {
    background: linear-gradient(135deg, #0062e3 0%, #0284c7 100%);
}

html[data-theme="light"] .nav-link.active::after,
html[data-theme="light"] .nav-link:hover::after {
    box-shadow: 0 0 8px rgba(0, 98, 227, 0.35);
}

html[data-theme="light"] .btn-nav-secondary {
    color: #334155;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

html[data-theme="light"] .btn-nav-secondary:hover {
    color: #0062e3;
    background: #f8fafc;
    border-color: #0062e3;
}

html[data-theme="light"] .btn-nav-primary {
    background: linear-gradient(135deg, #0062e3 0%, #0284c7 100%);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 98, 227, 0.25);
}

html[data-theme="light"] .logo-text-container .logo-text {
    background: linear-gradient(135deg, #090d16 0%, #0062e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .logo-circle .logo-img {
    background: #ffffff;
}

html[data-theme="light"] .lang-switcher {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .lang-btn {
    color: #475569;
}

html[data-theme="light"] .lang-btn:hover {
    color: #090d16;
}

html[data-theme="light"] .lang-btn.active {
    color: #ffffff;
    background: #0062e3;
    box-shadow: 0 1px 4px rgba(0, 98, 227, 0.3);
}

html[data-theme="light"] .lang-divider {
    background: #e2e8f0;
}

/* Theme Toggle Button active state in Light Mode */
html[data-theme="light"] .theme-toggle-pill {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .theme-toggle-pill:hover {
    border-color: #0062e3;
    box-shadow: 0 0 10px rgba(0, 98, 227, 0.15);
}

html[data-theme="light"] .theme-toggle-slider {
    transform: translateX(25px);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.4);
}

html[data-theme="light"] .theme-toggle-pill .moon-icon {
    color: #64748b;
}

html[data-theme="light"] .theme-toggle-pill .sun-icon {
    color: #ffffff;
}

/* User dropdown in Light Theme */
html[data-theme="light"] .dropdown-menu {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .dropdown-item {
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

html[data-theme="light"] .dropdown-item:hover {
    background: #f8fafc;
    color: #0062e3;
}

/* Buttons in Light Mode */
html[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #0062e3 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(0, 98, 227, 0.25) !important;
}

html[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 98, 227, 0.35) !important;
    transform: translateY(-2px);
}

html[data-theme="light"] .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #090d16 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #0062e3 !important;
    color: #0062e3 !important;
    transform: translateY(-2px);
}

/* =============================================================================
   WHITE BLOCKS & HERO (ИНДЕКС И КАРТОЧКИ)
   ============================================================================= */

/* 1. Hero, Feature Cards & CTA Card (Index Page) */
html[data-theme="light"] .hero-title {
    color: #090d16 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .hero-subtitle {
    color: #334155 !important;
    font-weight: 450 !important;
}

html[data-theme="light"] .hero-badge.specimen-badge {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #090d16 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html[data-theme="light"] .badge-code {
    color: #0062e3 !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .atelier-sub-motif {
    color: #0062e3 !important;
}

html[data-theme="light"] .stat-number {
    color: #0062e3 !important;
    background: linear-gradient(135deg, #0062e3 0%, #0284c7 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

html[data-theme="light"] .stat-label {
    color: #475569 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .stat-divider {
    background: #e2e8f0 !important;
}

/* Authentic light terminal window in light theme */
html[data-theme="light"] .cyber-terminal,
html.light-theme .cyber-terminal,
.light-theme .cyber-terminal {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

html[data-theme="light"] .terminal-header,
html.light-theme .terminal-header,
.light-theme .terminal-header {
    background: #f1f5f9 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .terminal-title,
html.light-theme .terminal-title,
.light-theme .terminal-title {
    color: #475569 !important;
}

html[data-theme="light"] .terminal-body,
html.light-theme .terminal-body,
.light-theme .terminal-body {
    background: #f8fafc !important;
}

html[data-theme="light"] .terminal-line,
html.light-theme .terminal-line,
.light-theme .terminal-line {
    color: #0f172a !important;
}

html[data-theme="light"] .terminal-line .prompt,
html.light-theme .terminal-line .prompt,
.light-theme .terminal-line .prompt {
    color: #0284c7 !important;
}

html[data-theme="light"] .terminal-line .typing-text,
html.light-theme .terminal-line .typing-text,
.light-theme .terminal-line .typing-text {
    color: #0f172a !important;
}

html[data-theme="light"] .terminal-line.output,
html.light-theme .terminal-line.output,
.light-theme .terminal-line.output {
    color: #475569 !important;
}

html[data-theme="light"] .terminal-line.output.success,
html.light-theme .terminal-line.output.success,
.light-theme .terminal-line.output.success {
    color: #16a34a !important;
}

html[data-theme="light"] .terminal-line .cursor-blink,
html[data-theme="light"] .terminal-line .cursor,
html.light-theme .terminal-line .cursor-blink,
html.light-theme .terminal-line .cursor,
.light-theme .terminal-line .cursor-blink,
.light-theme .terminal-line .cursor {
    color: #0284c7 !important;
}

html[data-theme="light"] .feature-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
    color: #090d16 !important;
}

html[data-theme="light"] .feature-card:hover {
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06) !important;
    border-color: #0062e3 !important;
}

html[data-theme="light"] .feature-card h3 {
    color: #0062e3 !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .feature-card p {
    color: #334155 !important;
}

html[data-theme="light"] .section-title {
    background: linear-gradient(135deg, #090d16 0%, #0062e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .cta-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%) !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .cta-card h2 {
    color: #090d16 !important;
}

html[data-theme="light"] .cta-card p {
    color: #334155 !important;
}

html[data-theme="light"] .cta-operative-card {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%) !important;
    border: 1px solid #b9d5fc !important;
    box-shadow: 0 10px 30px rgba(0, 98, 227, 0.1) !important;
}

html[data-theme="light"] .cta-operative-badge {
    background: rgba(0, 98, 227, 0.08) !important;
    border-color: rgba(0, 98, 227, 0.25) !important;
    color: #0056b3 !important;
}

html[data-theme="light"] .cta-user-name {
    background: linear-gradient(135deg, #0052cc 0%, #00a3bf 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

html[data-theme="light"] .cta-operative-actions .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}

html[data-theme="light"] .cta-operative-actions .btn-secondary:hover {
    background: #eff6ff !important;
    border-color: #0062e3 !important;
    color: #0062e3 !important;
}


/* 2. Challenge Cards & Filters (CTF Challenges Page) */
html[data-theme="light"] .filters-bar {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .filter-group label {
    color: #090d16 !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .filter-btn {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}

html[data-theme="light"] .filter-btn:hover {
    background: #eff6ff;
    color: #0062e3;
    border-color: #0062e3;
}

html[data-theme="light"] .filter-btn.active {
    background: #0062e3 !important;
    color: #ffffff !important;
    border-color: #0062e3 !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .cat-dropdown-toggle {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #090d16 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .cat-dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1) !important;
}

html[data-theme="light"] .cat-dropdown-item {
    color: #334155;
}

html[data-theme="light"] .cat-dropdown-item:hover {
    background: #eff6ff;
    color: #0062e3;
}

html[data-theme="light"] .challenge-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
    color: #090d16 !important;
}

html[data-theme="light"] .challenge-card::before {
    display: none;
}

html[data-theme="light"] .challenge-card:hover {
    background: #ffffff !important;
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12) !important;
    border-color: #0062e3 !important;
}

html[data-theme="light"] .challenge-title {
    color: #090d16 !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .challenge-header {
    color: #475569 !important;
}

html[data-theme="light"] .category-badge {
    background: #eff6ff !important;
    color: #0062e3 !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .challenge-points {
    color: #0062e3 !important;
    font-weight: 800 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .empty-state {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #090d16 !important;
}

/* 3. Challenge Detail Page */
html[data-theme="light"] .challenge-hero,
html[data-theme="light"] .description-card,
html[data-theme="light"] .submission-card,
html[data-theme="light"] .attachment-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .hero-title {
    color: #090d16 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .hero-bg-glow {
    opacity: 0.05;
}

html[data-theme="light"] .description-text {
    color: #334155 !important;
}

html[data-theme="light"] .section-label {
    color: #475569 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .stat-badge {
    background: #f1f5f9 !important;
    border: 1px solid #d3dce6 !important;
    color: #090d16 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .flag-input {
    background: #ffffff !important;
    color: #090d16 !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .flag-input:focus {
    background: #ffffff !important;
    border-color: #0062e3 !important;
    box-shadow: 0 0 0 3px rgba(0, 98, 227, 0.15) !important;
}

/* 4. Rating & Activity Chart */
html[data-theme="light"] .rating-header-block .rating-title {
    color: #090d16 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .rating-header-block .rating-subtitle {
    color: #475569 !important;
    font-weight: 500 !important;
}

html[data-theme="light"] .rating-table-wrapper {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .rating-table {
    background: #ffffff !important;
}

html[data-theme="light"] .rating-table th {
    background: #f1f5f9 !important;
    color: #27364b !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #d3dce6 !important;
}

html[data-theme="light"] .rating-table td {
    color: #090d16 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .rating-table tbody tr:hover td {
    background: #f8fafc !important;
}

html[data-theme="light"] .user-display-name {
    color: #090d16 !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .user-handle {
    color: #0062e3 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .rank-number,
html[data-theme="light"] .rank-num {
    color: #090d16 !important;
    font-weight: 800 !important;
}

html[data-theme="light"] .score-total-val {
    color: #b45309 !important;
    font-weight: 800 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .score-badge.ctf-badge {
    background: #eff6ff !important;
    color: #0284c7 !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .score-badge.academy-badge {
    background: #f3e8ff !important;
    color: #7e22ce !important;
    border: 1px solid #e9d5ff !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .gold-row {
    background: #fefce8 !important;
}
html[data-theme="light"] .silver-row {
    background: #f8fafc !important;
}
html[data-theme="light"] .bronze-row {
    background: #fff7ed !important;
}

html[data-theme="light"] .activity-chart-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .chart-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #d3dce6 !important;
}

html[data-theme="light"] .chart-title {
    color: #090d16 !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .chart-subtitle {
    color: #475569 !important;
}

html[data-theme="light"] .chart-range-switcher {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .chart-range-btn {
    color: #475569 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .chart-range-btn:hover {
    color: #090d16 !important;
}

html[data-theme="light"] .chart-range-btn.active {
    background: #ffffff !important;
    color: #0062e3 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1) !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .chart-no-data {
    color: #475569 !important;
}

html[data-theme="light"] .terminal-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08) !important;
}

/* 5. Auth Cards (Login & Register) */
html[data-theme="light"] .auth-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.12) !important;
    color: #090d16 !important;
}

html[data-theme="light"] .login-title,
html[data-theme="light"] .register-title,
html[data-theme="light"] .auth-title {
    color: #090d16 !important;
}

html[data-theme="light"] .system-status {
    color: #0062e3 !important;
}

html[data-theme="light"] .auth-card label {
    color: #334155 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] .auth-card input {
    background: #ffffff !important;
    color: #090d16 !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .auth-card input:focus {
    background: #ffffff !important;
    border-color: #0062e3 !important;
    box-shadow: 0 0 0 3px rgba(0, 98, 227, 0.15) !important;
}

html[data-theme="light"] .auth-card .footer-bottom {
    border-top-color: #e2e8f0 !important;
    color: #475569 !important;
}

/* 6. Dashboard & Profile Blocks */
html[data-theme="light"] .dashboard-header.auth-card,
html[data-theme="light"] .stats-grid .auth-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .profile-container .auth-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08) !important;
    color: #090d16 !important;
}

html[data-theme="light"] .stats-grid .auth-card h3 {
    color: #475569 !important;
    font-weight: 600 !important;
}

html[data-theme="light"] #stat-lessons {
    color: #090d16 !important;
    font-weight: 800 !important;
}

html[data-theme="light"] #stat-practices {
    color: #0062e3 !important;
    font-weight: 800 !important;
}

html[data-theme="light"] #stat-points {
    color: #7c3aed !important;
    font-weight: 800 !important;
}

html[data-theme="light"] .stats-grid svg path:first-child {
    stroke: #e2e8f0 !important;
}

/* Profile & Account Settings in Light Theme */
html[data-theme="light"] .user-card,
html[data-theme="light"] .profile-nav,
html[data-theme="light"] .settings-card {
    background: #ffffff !important;
    border: 1px solid #d3dce6 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08) !important;
    color: #090d16 !important;
}

html[data-theme="light"] .user-display-name,
html[data-theme="light"] .page-title,
html[data-theme="light"] .card-title {
    color: #090d16 !important;
}

html[data-theme="light"] .user-handle,
html[data-theme="light"] .page-description,
html[data-theme="light"] .card-description,
html[data-theme="light"] .field-hint,
html[data-theme="light"] .char-counter,
html[data-theme="light"] .stat-label-mini {
    color: #475569 !important;
}

html[data-theme="light"] .user-stats,
html[data-theme="light"] .stat-divider-mini {
    border-color: #e2e8f0 !important;
    background-color: #e2e8f0 !important;
}

html[data-theme="light"] .stat-value-mini {
    color: #0062e3 !important;
}

html[data-theme="light"] .profile-nav-item {
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

html[data-theme="light"] .profile-nav-item:hover {
    background: #eff6ff !important;
    color: #0062e3 !important;
}

html[data-theme="light"] .profile-nav-item.active {
    background: #eff6ff !important;
    color: #0062e3 !important;
    border-left: 3px solid #0062e3 !important;
}

html[data-theme="light"] .card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .card-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .field-label {
    color: #334155 !important;
}

html[data-theme="light"] .field-input,
html[data-theme="light"] .field-select,
html[data-theme="light"] .field-textarea {
    background: #ffffff !important;
    color: #090d16 !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .field-input:focus,
html[data-theme="light"] .field-select:focus,
html[data-theme="light"] .field-textarea:focus {
    background: #ffffff !important;
    border-color: #0062e3 !important;
    box-shadow: 0 0 0 3px rgba(0, 98, 227, 0.15) !important;
}

html[data-theme="light"] .field-input::placeholder,
html[data-theme="light"] .field-textarea::placeholder {
    color: #64748b !important;
}

html[data-theme="light"] .password-requirements {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
}

html[data-theme="light"] .requirements-title {
    color: #b45309 !important;
}

html[data-theme="light"] .requirements-list li {
    color: #78350f !important;
}

html[data-theme="light"] .avatar-upload-area {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .avatar-preview {
    border-color: #cbd5e1 !important;
}

html[data-theme="light"] .settings-card-warning {
    border-color: rgba(239, 68, 68, 0.3) !important;
}

html[data-theme="light"] .settings-card-warning .card-header {
    background: #fef2f2 !important;
    border-bottom-color: rgba(239, 68, 68, 0.2) !important;
}

/* SVG Rank & Badge alignment */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 6px;
}
.rank-badge svg {
    width: 1.25rem;
    height: 1.25rem;
}
.footer-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    vertical-align: middle;
}
.footer-icon svg {
    width: 1rem;
    height: 1rem;
}
.stat-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    vertical-align: middle;
}
.stat-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* 7. Academy Blocks */
html[data-theme="light"] .acad-wrapper {
    color: #334155;
}

html[data-theme="light"] .acad-card,
html[data-theme="light"] .acad-room-card,
html[data-theme="light"] .acad-path-card,
html[data-theme="light"] .acad-workbench,
html[data-theme="light"] .acad-task-card,
html[data-theme="light"] .acad-hero,
html[data-theme="light"] .acad-stage-card,
html[data-theme="light"] .acad-stat-card,
html[data-theme="light"] .acad-stage,
html[data-theme="light"] .acad-stage-body {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
    color: #090d16 !important;
}

html[data-theme="light"] .acad-card h1,
html[data-theme="light"] .acad-card h2,
html[data-theme="light"] .acad-card h3,
html[data-theme="light"] .acad-room-card h3,
html[data-theme="light"] .acad-path-card h3 {
    color: #090d16 !important;
}

html[data-theme="light"] .acad-room-card:hover,
html[data-theme="light"] .acad-path-card:hover {
    border-color: rgba(0, 98, 227, 0.35) !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08) !important;
}

/* 8. Footer */
html[data-theme="light"] .site-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .footer-brand .footer-logo {
    color: #090d16 !important;
}

html[data-theme="light"] .footer-brand p {
    color: #475569 !important;
}

html[data-theme="light"] .footer-links a {
    color: #475569 !important;
}

html[data-theme="light"] .footer-links a:hover {
    color: #0062e3 !important;
}

html[data-theme="light"] .footer-bottom {
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

/* =============================================================================
   CYBER DOSSIER 2.0 STYLESHEET
   ============================================================================= */

.dossier-wrapper {
    max-width: 1200px;
    margin: 1.5rem auto 4rem;
    padding: 0 clamp(1rem, 3vw, 2rem);
    position: relative;
    z-index: 2;
}

/* 1. HUD Status Bar */
.dossier-hud-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 15, 26, 0.75);
    border: 1px solid rgba(0, 234, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 0.65rem 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-secondary);
}

.hud-blink-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent-green);
    box-shadow: 0 0 10px var(--color-accent-green);
    animation: pulseBlink 2s infinite ease-in-out;
}

@keyframes pulseBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-divider {
    color: rgba(255, 255, 255, 0.2);
}

.hud-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-dossier-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-share-hud {
    background: rgba(0, 234, 255, 0.1);
    color: var(--color-accent-cyan);
    border: 1px solid rgba(0, 234, 255, 0.3);
}

.btn-share-hud:hover {
    background: rgba(0, 234, 255, 0.2);
    box-shadow: 0 0 14px rgba(0, 234, 255, 0.4);
    transform: translateY(-1px);
}

.btn-edit-hud {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-edit-hud:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-text-primary);
    transform: translateY(-1px);
}

/* 2. Holographic Operative Card (3D Parallax) */
.cyber-holo-card {
    position: relative;
    background: linear-gradient(135deg, rgba(13, 20, 36, 0.9) 0%, rgba(8, 12, 22, 0.95) 100%);
    border: 1px solid rgba(0, 234, 255, 0.35);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 234, 255, 0.15);
    margin-bottom: 2rem;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    backdrop-filter: blur(16px);
}

.holo-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    transition: background 0.1s ease;
}

.holo-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    opacity: 0.6;
    z-index: 1;
}

.holo-inner {
    position: relative;
    z-index: 3;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

/* Holographic Avatar Block */
.holo-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.holo-avatar-frame {
    position: relative;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue));
    box-shadow: 0 0 25px rgba(0, 234, 255, 0.35);
}

.holo-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-bg-card);
}

.holo-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}

/* Tier Colors System */
.tier-s { --tier-color: #eab308; --tier-bg: rgba(234, 179, 8, 0.15); }
.tier-a { --tier-color: #a855f7; --tier-bg: rgba(168, 85, 247, 0.15); }
.tier-b { --tier-color: #00eaff; --tier-bg: rgba(0, 234, 255, 0.15); }
.tier-c { --tier-color: #22c55e; --tier-bg: rgba(34, 197, 94, 0.15); }
.tier-d { --tier-color: #94a3b8; --tier-bg: rgba(148, 163, 184, 0.15); }

.holo-rank-badge-corner {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #090d16;
    border: 2px solid var(--tier-color, var(--color-accent-cyan));
    color: var(--tier-color, var(--color-accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    font-size: 0.875rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.holo-rank-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--tier-color, var(--color-accent-cyan));
    background: var(--tier-bg, rgba(0, 234, 255, 0.1));
    color: var(--tier-color, var(--color-accent-cyan));
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.holo-rank-tag .rank-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tier-color, var(--color-accent-cyan));
}

/* Holographic Details Block */
.holo-details-block {
    min-width: 0;
}

.holo-header-line {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.holo-display-name {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.holo-handle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--color-accent-cyan);
    opacity: 0.9;
}

.badge-banned {
    padding: 0.2rem 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
}

.holo-status-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.terminal-prefix {
    color: var(--color-accent-cyan);
    font-weight: bold;
}

.status-quote {
    color: var(--color-text-secondary);
    font-style: italic;
}

.holo-bio {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin: 0 0 1rem 0;
    max-width: 600px;
}

.holo-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-chip:hover {
    background: rgba(0, 234, 255, 0.12);
    border-color: var(--color-accent-cyan);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

.chip-date {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
}

/* Holographic KPI Block */
.holo-kpi-block {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 1rem;
    background: rgba(5, 8, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
}

.kpi-box {
    text-align: center;
}

.kpi-label {
    display: block;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
}

.kpi-num {
    font-size: 1.625rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text-primary);
}

.kpi-num.glow-cyan {
    color: var(--color-accent-cyan);
    text-shadow: 0 0 12px rgba(0, 234, 255, 0.4);
}

.kpi-unit {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.trophy-color {
    color: #eab308;
}

.streak-flame {
    font-size: 1.1rem;
}

/* Rank Progress Strip */
.holo-progress-strip {
    background: rgba(5, 8, 16, 0.75);
    border-top: 1px solid rgba(0, 234, 255, 0.15);
    padding: 0.85rem clamp(1.5rem, 3vw, 2.25rem);
}

.progress-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.4rem;
    color: var(--color-text-secondary);
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(90deg, var(--color-accent-cyan), var(--tier-color, #00eaff));
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.5);
}

/* 3. Main Grid Layout (Radar & Heatmap) */
.dossier-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dossier-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    backdrop-filter: blur(14px);
    transition: border-color var(--transition-normal);
}

.dossier-card:hover {
    border-color: rgba(0, 234, 255, 0.3);
}

.dossier-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title-icon {
    font-size: 1.35rem;
    color: var(--color-accent-cyan);
}

.card-h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.card-sub {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text-muted);
}

.telemetry-badge {
    padding: 0.2rem 0.5rem;
    background: rgba(0, 234, 255, 0.08);
    border: 1px solid rgba(0, 234, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--color-accent-cyan);
    font-size: 0.6875rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

.streak-pill {
    padding: 0.25rem 0.65rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #f87171;
}

/* Radar Content */
.radar-content-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: center;
}

.radar-svg-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.radar-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.radar-grid-ring {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.radar-axis-line {
    stroke: rgba(255, 255, 255, 0.09);
    stroke-width: 1;
    stroke-dasharray: 2 2;
}

.radar-data-polygon {
    fill: rgba(0, 234, 255, 0.22);
    stroke: var(--color-accent-cyan);
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(0, 234, 255, 0.5));
    transition: all 0.5s ease;
}

.radar-vertex {
    fill: #00eaff;
    stroke: #ffffff;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 4px #00eaff);
}

.radar-axis-label {
    fill: var(--color-text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 600;
}

.radar-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.radar-stat-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.stat-name-col {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 130px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-cyan);
}

.stat-bar-col {
    flex: 1;
}

.stat-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-blue), var(--color-accent-cyan));
    border-radius: 9999px;
    box-shadow: 0 0 6px rgba(0, 234, 255, 0.4);
}

.stat-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    min-width: 50px;
    text-align: right;
}

/* Heatmap Grid */
.heatmap-scroll-container {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 13px);
    grid-auto-flow: column;
    grid-auto-columns: 13px;
    gap: 3.5px;
    width: max-content;
}

.heatmap-cell {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.heatmap-cell:hover {
    transform: scale(1.4);
    z-index: 5;
    position: relative;
}

.heatmap-cell.lvl-0 { background: rgba(255, 255, 255, 0.05); }
.heatmap-cell.lvl-1 { background: rgba(0, 234, 255, 0.35); }
.heatmap-cell.lvl-2 { background: rgba(0, 234, 255, 0.6); }
.heatmap-cell.lvl-3 { background: rgba(0, 234, 255, 0.85); box-shadow: 0 0 6px rgba(0, 234, 255, 0.4); }
.heatmap-cell.lvl-4 { background: #00eaff; box-shadow: 0 0 10px #00eaff; }

.heatmap-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}
.legend-box.lvl-0 { background: rgba(255, 255, 255, 0.05); }
.legend-box.lvl-1 { background: rgba(0, 234, 255, 0.35); }
.legend-box.lvl-2 { background: rgba(0, 234, 255, 0.6); }
.legend-box.lvl-3 { background: rgba(0, 234, 255, 0.85); }
.legend-box.lvl-4 { background: #00eaff; }

/* 4. Badges Section */
.dossier-section {
    margin-bottom: 2.5rem;
}

.section-header-row {
    margin-bottom: 1.25rem;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.section-h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-h2 .title-icon {
    color: var(--color-accent-cyan);
}

.section-count-tag {
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--color-accent-cyan);
}

.section-sub {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.badge-card {
    display: flex;
    gap: 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
}

.badge-unlocked {
    border-color: rgba(0, 234, 255, 0.35);
    background: linear-gradient(135deg, rgba(10, 18, 32, 0.8) 0%, rgba(6, 11, 20, 0.9) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 234, 255, 0.1);
}

.badge-unlocked:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent-cyan);
    box-shadow: 0 8px 30px rgba(0, 234, 255, 0.2);
}

.badge-locked {
    opacity: 0.55;
    filter: grayscale(0.85);
}

.badge-icon-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.badge-icon-wrap.icon-cyan { background: rgba(0, 234, 255, 0.15); color: #00eaff; border: 1px solid rgba(0, 234, 255, 0.3); }
.badge-icon-wrap.icon-blue { background: rgba(0, 119, 255, 0.15); color: #0077ff; border: 1px solid rgba(0, 119, 255, 0.3); }
.badge-icon-wrap.icon-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-icon-wrap.icon-emerald { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-icon-wrap.icon-amber { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-icon-wrap.icon-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.badge-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-text-muted);
}

.badge-info {
    min-width: 0;
}

.badge-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 0.25rem 0;
}

.badge-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
}

.badge-status-row {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
}

.badge-status-unlocked {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-accent-green);
    font-weight: 700;
}

.dot-green {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-green);
    box-shadow: 0 0 6px var(--color-accent-green);
}

.badge-status-locked {
    color: var(--color-text-muted);
}

.dot-locked {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-text-muted);
    margin-right: 0.3rem;
}

/* 5. Solves History Table */
.dossier-table-wrapper {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow-x: auto;
    backdrop-filter: blur(12px);
}

.dossier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.dossier-table thead th {
    background: rgba(5, 8, 16, 0.5);
    padding: 0.9rem 1.25rem;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-border);
}

.dossier-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.dossier-table tbody tr:hover {
    background: rgba(0, 234, 255, 0.03);
}

.dossier-table td {
    padding: 0.9rem 1.25rem;
    vertical-align: middle;
}

.chip-type {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.chip-ctf {
    background: rgba(0, 234, 255, 0.12);
    border: 1px solid rgba(0, 234, 255, 0.3);
    color: var(--color-accent-cyan);
}

.chip-academy {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
}

.mission-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.mission-link:hover {
    color: var(--color-accent-cyan);
}

.cat-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.diff-pill {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
}

.diff-beginner { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.diff-intermediate { background: rgba(234, 179, 8, 0.12); color: #fde047; }
.diff-advanced { background: rgba(239, 68, 68, 0.12); color: #f87171; }

.pts-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-accent-cyan);
}

.timestamp-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.dossier-empty-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem 1rem;
    text-align: center;
}

.empty-text {
    color: var(--color-text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin: 0;
}

/* 6. Settings Modal */
.dossier-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.dossier-modal-box {
    background: #0d1424;
    border: 1px solid rgba(0, 234, 255, 0.35);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 620px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 234, 255, 0.2);
    overflow: hidden;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 8, 16, 0.5);
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-icon {
    font-size: 1.25rem;
    color: var(--color-accent-cyan);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.modal-sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--color-text-primary);
}

.modal-feedback {
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
    display: none;
}

.modal-feedback.error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.dossier-modal-form {
    padding: 1.5rem;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.modal-field.full-width {
    grid-column: span 2;
}

.modal-lbl {
    display: block;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--color-text-secondary);
    margin-bottom: 0.4rem;
}

.modal-input, .modal-textarea {
    width: 100%;
    background: rgba(5, 8, 16, 0.7);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    color: var(--color-text-primary);
    font-size: 0.875rem;
    transition: border-color var(--transition-fast);
}

.modal-input:focus, .modal-textarea:focus {
    outline: none;
    border-color: var(--color-accent-cyan);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
}

.btn-link-advanced {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.btn-link-advanced:hover {
    color: var(--color-accent-cyan);
}

/* 7. Floating Toast */
.dossier-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(10, 18, 32, 0.95);
    border: 1px solid var(--color-accent-cyan);
    color: var(--color-text-primary);
    padding: 0.85rem 1.35rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 234, 255, 0.4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    z-index: 2000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dossier-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* 8. Rating Link Styling */
.user-cell-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.user-cell-link:hover .user-display-name {
    color: var(--color-accent-cyan) !important;
    text-shadow: 0 0 8px rgba(0, 234, 255, 0.4);
}

.user-cell-link:hover .rating-avatar-img,
.user-cell-link:hover .rating-avatar-placeholder {
    box-shadow: 0 0 12px rgba(0, 234, 255, 0.6);
    transform: scale(1.05);
}

/* 9. Responsive Adjustments */
@media (max-width: 960px) {
    .holo-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .holo-header-line {
        justify-content: center;
    }
    
    .holo-status-line {
        justify-content: center;
    }
    
    .holo-bio {
        margin: 0 auto 1rem auto;
    }
    
    .holo-social-links {
        justify-content: center;
    }

    .dossier-main-grid {
        grid-template-columns: 1fr;
    }

    .radar-content-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dossier-hud-bar {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .hud-actions {
        width: 100%;
        justify-content: space-between;
    }

    .holo-kpi-block {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-field.full-width {
        grid-column: span 1;
    }
}

/* =============================================================================
   CYBER DOSSIER 2.0 — DAY MODE / LIGHT THEME ADAPTATION
   ============================================================================= */

/* 1. HUD Navigation & Status Bar */
html[data-theme="light"] .dossier-hud-bar,
html.light-theme .dossier-hud-bar,
.light-theme .dossier-hud-bar {
    background: rgba(255, 255, 255, 0.95);
    border-color: #e2e8f0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    color: #334155;
}

html[data-theme="light"] .hud-blink-dot,
html.light-theme .hud-blink-dot,
.light-theme .hud-blink-dot {
    background: #059669;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
}

html[data-theme="light"] .hud-status-text,
html.light-theme .hud-status-text,
.light-theme .hud-status-text,
html[data-theme="light"] .hud-security-level,
html.light-theme .hud-security-level,
.light-theme .hud-security-level {
    color: #475569;
    font-weight: 500;
}

html[data-theme="light"] .hud-status-text strong,
html.light-theme .hud-status-text strong,
.light-theme .hud-status-text strong,
html[data-theme="light"] .hud-security-level strong,
html.light-theme .hud-security-level strong,
.light-theme .hud-security-level strong {
    color: #090d16;
    font-weight: 700;
}

html[data-theme="light"] .hud-divider,
html.light-theme .hud-divider,
.light-theme .hud-divider {
    color: #cbd5e1;
}

html[data-theme="light"] .btn-share-hud,
html.light-theme .btn-share-hud,
.light-theme .btn-share-hud {
    background: #eff6ff;
    color: #0062e3;
    border-color: #bfdbfe;
    font-weight: 600;
}

html[data-theme="light"] .btn-share-hud:hover,
html.light-theme .btn-share-hud:hover,
.light-theme .btn-share-hud:hover {
    background: #dbeafe;
    border-color: #0062e3;
    color: #0052be;
    box-shadow: 0 2px 6px rgba(0, 98, 227, 0.15);
}

html[data-theme="light"] .btn-edit-hud,
html.light-theme .btn-edit-hud,
.light-theme .btn-edit-hud {
    background: #ffffff;
    color: #090d16;
    border-color: #cbd5e1;
    font-weight: 600;
}

html[data-theme="light"] .btn-edit-hud:hover,
html.light-theme .btn-edit-hud:hover,
.light-theme .btn-edit-hud:hover {
    background: #f8fafc;
    border-color: #0062e3;
    color: #0062e3;
}

/* 2. 3D Holographic Card & Identity */
html[data-theme="light"] .cyber-holo-card,
html.light-theme .cyber-holo-card,
.light-theme .cyber-holo-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
}

html[data-theme="light"] .holo-scanlines,
html.light-theme .holo-scanlines,
.light-theme .holo-scanlines {
    opacity: 0.02;
}

html[data-theme="light"] .holo-avatar-frame,
html.light-theme .holo-avatar-frame,
.light-theme .holo-avatar-frame {
    box-shadow: 0 0 0 3px #ffffff, 0 4px 12px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .holo-avatar-placeholder,
html.light-theme .holo-avatar-placeholder,
.light-theme .holo-avatar-placeholder {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #0062e3;
}

/* Light Mode Tier Overrides */
html[data-theme="light"] .tier-s, html.light-theme .tier-s, .light-theme .tier-s { --tier-color: #b45309; --tier-bg: #fef3c7; }
html[data-theme="light"] .tier-a, html.light-theme .tier-a, .light-theme .tier-a { --tier-color: #7e22ce; --tier-bg: #f3e8ff; }
html[data-theme="light"] .tier-b, html.light-theme .tier-b, .light-theme .tier-b { --tier-color: #0284c7; --tier-bg: #e0f2fe; }
html[data-theme="light"] .tier-c, html.light-theme .tier-c, .light-theme .tier-c { --tier-color: #15803d; --tier-bg: #dcfce7; }
html[data-theme="light"] .tier-d, html.light-theme .tier-d, .light-theme .tier-d { --tier-color: #475569; --tier-bg: #f1f5f9; }

html[data-theme="light"] .holo-rank-badge-corner,
html.light-theme .holo-rank-badge-corner,
.light-theme .holo-rank-badge-corner {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .holo-rank-tag,
html.light-theme .holo-rank-tag,
.light-theme .holo-rank-tag {
    font-weight: 700;
}

html[data-theme="light"] .holo-display-name,
html.light-theme .holo-display-name,
.light-theme .holo-display-name {
    color: #090d16;
}

html[data-theme="light"] .holo-handle,
html.light-theme .holo-handle,
.light-theme .holo-handle {
    color: #0062e3;
}

html[data-theme="light"] .terminal-prefix,
html.light-theme .terminal-prefix,
.light-theme .terminal-prefix {
    color: #0062e3;
}

html[data-theme="light"] .status-quote,
html.light-theme .status-quote,
.light-theme .status-quote {
    color: #475569;
}

html[data-theme="light"] .holo-bio,
html.light-theme .holo-bio,
.light-theme .holo-bio {
    color: #334155;
}

html[data-theme="light"] .social-chip,
html.light-theme .social-chip,
.light-theme .social-chip {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
    font-weight: 500;
}

html[data-theme="light"] .social-chip:hover,
html.light-theme .social-chip:hover,
.light-theme .social-chip:hover {
    background: #eff6ff;
    border-color: #0062e3;
    color: #0062e3;
}

html[data-theme="light"] .chip-date,
html.light-theme .chip-date,
.light-theme .chip-date {
    background: transparent;
    border-color: transparent;
    color: #64748b;
}

html[data-theme="light"] .holo-kpi-block,
html.light-theme .holo-kpi-block,
.light-theme .holo-kpi-block {
    background: #f8fafc;
    border-color: #e2e8f0;
}

html[data-theme="light"] .kpi-num,
html.light-theme .kpi-num,
.light-theme .kpi-num {
    color: #090d16;
}

html[data-theme="light"] .kpi-num.glow-cyan,
html.light-theme .kpi-num.glow-cyan,
.light-theme .kpi-num.glow-cyan {
    color: #0062e3;
    text-shadow: none;
}

html[data-theme="light"] .kpi-label,
html[data-theme="light"] .kpi-unit,
html.light-theme .kpi-label,
html.light-theme .kpi-unit,
.light-theme .kpi-label,
.light-theme .kpi-unit {
    color: #475569;
    font-weight: 500;
}

html[data-theme="light"] .holo-progress-strip,
html.light-theme .holo-progress-strip,
.light-theme .holo-progress-strip {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

html[data-theme="light"] .progress-info-row,
html.light-theme .progress-info-row,
.light-theme .progress-info-row {
    color: #475569;
}

html[data-theme="light"] .progress-info-row strong,
html.light-theme .progress-info-row strong,
.light-theme .progress-info-row strong {
    color: #090d16;
}

html[data-theme="light"] .progress-track,
html.light-theme .progress-track,
.light-theme .progress-track {
    background: #e2e8f0;
}

html[data-theme="light"] .progress-fill,
html.light-theme .progress-fill,
.light-theme .progress-fill {
    box-shadow: 0 0 8px rgba(0, 98, 227, 0.25);
    background: linear-gradient(90deg, #0284c7, #0062e3);
}

/* 3. Dossier Cards Base (Radar & Heatmap) */
html[data-theme="light"] .dossier-card,
html.light-theme .dossier-card,
.light-theme .dossier-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .dossier-card:hover,
html.light-theme .dossier-card:hover,
.light-theme .dossier-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .dossier-card-header,
html.light-theme .dossier-card-header,
.light-theme .dossier-card-header {
    border-bottom: 1px solid #f1f5f9;
}

html[data-theme="light"] .card-h2,
html.light-theme .card-h2,
.light-theme .card-h2 {
    color: #090d16;
}

html[data-theme="light"] .card-sub,
html.light-theme .card-sub,
.light-theme .card-sub {
    color: #475569;
}

html[data-theme="light"] .telemetry-badge,
html.light-theme .telemetry-badge,
.light-theme .telemetry-badge {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #0062e3;
    font-weight: 600;
}

/* Radar SVG in Light Theme */
html[data-theme="light"] .radar-grid-ring,
html.light-theme .radar-grid-ring,
.light-theme .radar-grid-ring {
    stroke: #e2e8f0;
    stroke-width: 1.2;
}

html[data-theme="light"] .radar-axis-line,
html.light-theme .radar-axis-line,
.light-theme .radar-axis-line {
    stroke: #cbd5e1;
    stroke-width: 1;
}

html[data-theme="light"] .radar-data-polygon,
html.light-theme .radar-data-polygon,
.light-theme .radar-data-polygon {
    fill: rgba(0, 98, 227, 0.14);
    stroke: #0062e3;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 6px rgba(0, 98, 227, 0.25));
}

html[data-theme="light"] .radar-vertex,
html.light-theme .radar-vertex,
.light-theme .radar-vertex {
    fill: #0062e3;
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 1px 3px rgba(0, 98, 227, 0.3));
}

html[data-theme="light"] .radar-axis-label,
html.light-theme .radar-axis-label,
.light-theme .radar-axis-label {
    fill: #090d16;
    font-weight: 800;
    font-size: 8.5px;
}

html[data-theme="light"] .stat-name-col,
html.light-theme .stat-name-col,
.light-theme .stat-name-col,
html[data-theme="light"] .stat-name,
html.light-theme .stat-name,
.light-theme .stat-name {
    color: #090d16;
    font-weight: 600;
}

html[data-theme="light"] .stat-dot,
html.light-theme .stat-dot,
.light-theme .stat-dot {
    background: #0062e3;
}

html[data-theme="light"] .stat-bar-track,
html.light-theme .stat-bar-track,
.light-theme .stat-bar-track {
    background: #e2e8f0;
}

html[data-theme="light"] .stat-bar-fill,
html.light-theme .stat-bar-fill,
.light-theme .stat-bar-fill {
    background: linear-gradient(90deg, #0284c7, #0062e3);
    box-shadow: none;
}

html[data-theme="light"] .stat-pct,
html.light-theme .stat-pct,
.light-theme .stat-pct {
    color: #090d16;
    font-weight: 700;
}

/* Heatmap in Light Theme */
html[data-theme="light"] .streak-pill,
html.light-theme .streak-pill,
.light-theme .streak-pill {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    font-weight: 600;
}

html[data-theme="light"] .heatmap-cell.lvl-0,
html.light-theme .heatmap-cell.lvl-0,
.light-theme .heatmap-cell.lvl-0 {
    background: #e2e8f0;
}

html[data-theme="light"] .heatmap-cell.lvl-1,
html.light-theme .heatmap-cell.lvl-1,
.light-theme .heatmap-cell.lvl-1 {
    background: #bae6fd;
}

html[data-theme="light"] .heatmap-cell.lvl-2,
html.light-theme .heatmap-cell.lvl-2,
.light-theme .heatmap-cell.lvl-2 {
    background: #7dd3fc;
}

html[data-theme="light"] .heatmap-cell.lvl-3,
html.light-theme .heatmap-cell.lvl-3,
.light-theme .heatmap-cell.lvl-3 {
    background: #38bdf8;
    box-shadow: 0 0 4px rgba(56, 189, 248, 0.4);
}

html[data-theme="light"] .heatmap-cell.lvl-4,
html.light-theme .heatmap-cell.lvl-4,
.light-theme .heatmap-cell.lvl-4 {
    background: #0284c7;
    box-shadow: 0 0 6px rgba(2, 132, 199, 0.5);
}

html[data-theme="light"] .legend-box.lvl-0, html.light-theme .legend-box.lvl-0, .light-theme .legend-box.lvl-0 { background: #e2e8f0; }
html[data-theme="light"] .legend-box.lvl-1, html.light-theme .legend-box.lvl-1, .light-theme .legend-box.lvl-1 { background: #bae6fd; }
html[data-theme="light"] .legend-box.lvl-2, html.light-theme .legend-box.lvl-2, .light-theme .legend-box.lvl-2 { background: #7dd3fc; }
html[data-theme="light"] .legend-box.lvl-3, html.light-theme .legend-box.lvl-3, .light-theme .legend-box.lvl-3 { background: #38bdf8; }
html[data-theme="light"] .legend-box.lvl-4, html.light-theme .legend-box.lvl-4, .light-theme .legend-box.lvl-4 { background: #0284c7; }

html[data-theme="light"] .heatmap-footer,
html[data-theme="light"] .heatmap-period-info,
html[data-theme="light"] .legend-lbl,
html.light-theme .heatmap-footer,
html.light-theme .heatmap-period-info,
html.light-theme .legend-lbl,
.light-theme .heatmap-footer,
.light-theme .heatmap-period-info,
.light-theme .legend-lbl {
    color: #475569;
}

/* 4. Badges Section in Light Theme */
html[data-theme="light"] .section-h2,
html.light-theme .section-h2,
.light-theme .section-h2 {
    color: #090d16;
}

html[data-theme="light"] .section-h2 .title-icon,
html.light-theme .section-h2 .title-icon,
.light-theme .section-h2 .title-icon {
    color: #0062e3;
}

html[data-theme="light"] .section-count-tag,
html.light-theme .section-count-tag,
.light-theme .section-count-tag {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #0062e3;
    font-weight: 700;
}

html[data-theme="light"] .section-sub,
html.light-theme .section-sub,
.light-theme .section-sub {
    color: #475569;
}

html[data-theme="light"] .badge-card,
html.light-theme .badge-card,
.light-theme .badge-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

html[data-theme="light"] .badge-unlocked,
html.light-theme .badge-unlocked,
.light-theme .badge-unlocked {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .badge-unlocked:hover,
html.light-theme .badge-unlocked:hover,
.light-theme .badge-unlocked:hover {
    border-color: #0062e3;
    box-shadow: 0 8px 24px rgba(0, 98, 227, 0.12);
    transform: translateY(-2px);
}

html[data-theme="light"] .badge-locked,
html.light-theme .badge-locked,
.light-theme .badge-locked {
    background: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.65;
}

html[data-theme="light"] .badge-lock-overlay,
html.light-theme .badge-lock-overlay,
.light-theme .badge-lock-overlay {
    background: rgba(241, 245, 249, 0.85);
    color: #64748b;
}

html[data-theme="light"] .badge-title,
html.light-theme .badge-title,
.light-theme .badge-title {
    color: #090d16;
}

html[data-theme="light"] .badge-desc,
html.light-theme .badge-desc,
.light-theme .badge-desc {
    color: #475569;
}

/* Badge Icon Color Themes in Light Mode */
html[data-theme="light"] .badge-icon-wrap.icon-cyan,
html.light-theme .badge-icon-wrap.icon-cyan,
.light-theme .badge-icon-wrap.icon-cyan {
    background: #e0f2fe;
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.3);
}

html[data-theme="light"] .badge-icon-wrap.icon-blue,
html.light-theme .badge-icon-wrap.icon-blue,
.light-theme .badge-icon-wrap.icon-blue {
    background: #eff6ff;
    color: #0062e3;
    border-color: rgba(0, 98, 227, 0.3);
}

html[data-theme="light"] .badge-icon-wrap.icon-purple,
html.light-theme .badge-icon-wrap.icon-purple,
.light-theme .badge-icon-wrap.icon-purple {
    background: #f3e8ff;
    color: #7e22ce;
    border-color: rgba(126, 34, 206, 0.3);
}

html[data-theme="light"] .badge-icon-wrap.icon-emerald,
html.light-theme .badge-icon-wrap.icon-emerald,
.light-theme .badge-icon-wrap.icon-emerald {
    background: #dcfce7;
    color: #059669;
    border-color: rgba(5, 150, 105, 0.3);
}

html[data-theme="light"] .badge-icon-wrap.icon-amber,
html.light-theme .badge-icon-wrap.icon-amber,
.light-theme .badge-icon-wrap.icon-amber {
    background: #fef3c7;
    color: #b45309;
    border-color: rgba(180, 83, 9, 0.3);
}

html[data-theme="light"] .badge-icon-wrap.icon-red,
html.light-theme .badge-icon-wrap.icon-red,
.light-theme .badge-icon-wrap.icon-red {
    background: #fee2e2;
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.3);
}

/* 5. Mission Log Table in Light Theme */
html[data-theme="light"] .dossier-table-wrapper,
html.light-theme .dossier-table-wrapper,
.light-theme .dossier-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

html[data-theme="light"] .dossier-table thead th,
html.light-theme .dossier-table thead th,
.light-theme .dossier-table thead th {
    background: #f8fafc;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
}

html[data-theme="light"] .dossier-table tbody tr,
html.light-theme .dossier-table tbody tr,
.light-theme .dossier-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

html[data-theme="light"] .dossier-table tbody tr:hover,
html.light-theme .dossier-table tbody tr:hover,
.light-theme .dossier-table tbody tr:hover {
    background: #f8fafc;
}

html[data-theme="light"] .mission-link,
html.light-theme .mission-link,
.light-theme .mission-link,
html[data-theme="light"] .mission-title-plain,
html.light-theme .mission-title-plain,
.light-theme .mission-title-plain {
    color: #090d16;
    font-weight: 600;
}

html[data-theme="light"] .mission-link:hover,
html.light-theme .mission-link:hover,
.light-theme .mission-link:hover {
    color: #0062e3;
}

html[data-theme="light"] .cat-pill,
html.light-theme .cat-pill,
.light-theme .cat-pill {
    color: #334155;
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

html[data-theme="light"] .chip-ctf,
html.light-theme .chip-ctf,
.light-theme .chip-ctf {
    background: #eff6ff;
    color: #0062e3;
    border: 1px solid #bfdbfe;
}

html[data-theme="light"] .chip-academy,
html.light-theme .chip-academy,
.light-theme .chip-academy {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

html[data-theme="light"] .diff-beginner,
html.light-theme .diff-beginner,
.light-theme .diff-beginner {
    background: #dcfce7;
    color: #059669;
    border: 1px solid #bbf7d0;
}

html[data-theme="light"] .diff-intermediate,
html.light-theme .diff-intermediate,
.light-theme .diff-intermediate {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

html[data-theme="light"] .diff-advanced,
html.light-theme .diff-advanced,
.light-theme .diff-advanced {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

html[data-theme="light"] .pts-text,
html.light-theme .pts-text,
.light-theme .pts-text {
    color: #0062e3;
    font-weight: 700;
}

html[data-theme="light"] .timestamp-text,
html.light-theme .timestamp-text,
.light-theme .timestamp-text {
    color: #475569;
}

html[data-theme="light"] .dossier-empty-card,
html.light-theme .dossier-empty-card,
.light-theme .dossier-empty-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

/* 6. Edit Dossier Modal in Light Theme */
html[data-theme="light"] .dossier-modal-backdrop,
html.light-theme .dossier-modal-backdrop,
.light-theme .dossier-modal-backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
}

html[data-theme="light"] .dossier-modal-box,
html.light-theme .dossier-modal-box,
.light-theme .dossier-modal-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .modal-header,
html.light-theme .modal-header,
.light-theme .modal-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

html[data-theme="light"] .modal-icon,
html.light-theme .modal-icon,
.light-theme .modal-icon {
    color: #0062e3;
}

html[data-theme="light"] .modal-title,
html.light-theme .modal-title,
.light-theme .modal-title {
    color: #090d16;
}

html[data-theme="light"] .modal-sub,
html.light-theme .modal-sub,
.light-theme .modal-sub {
    color: #475569;
}

html[data-theme="light"] .modal-close-btn,
html.light-theme .modal-close-btn,
.light-theme .modal-close-btn {
    color: #475569;
}

html[data-theme="light"] .modal-close-btn:hover,
html.light-theme .modal-close-btn:hover,
.light-theme .modal-close-btn:hover {
    color: #090d16;
}

html[data-theme="light"] .modal-lbl,
html.light-theme .modal-lbl,
.light-theme .modal-lbl {
    color: #090d16;
    font-weight: 600;
}

html[data-theme="light"] .modal-input,
html[data-theme="light"] .modal-textarea,
html.light-theme .modal-input,
html.light-theme .modal-textarea,
.light-theme .modal-input,
.light-theme .modal-textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #090d16;
}

html[data-theme="light"] .modal-input:focus,
html[data-theme="light"] .modal-textarea:focus,
html.light-theme .modal-input:focus,
html.light-theme .modal-textarea:focus,
.light-theme .modal-input:focus,
.light-theme .modal-textarea:focus {
    background: #ffffff;
    border-color: #0062e3;
    box-shadow: 0 0 0 3px rgba(0, 98, 227, 0.15);
}

html[data-theme="light"] .modal-footer,
html.light-theme .modal-footer,
.light-theme .modal-footer {
    border-top: 1px solid #e2e8f0;
}

html[data-theme="light"] .btn-link-advanced,
html.light-theme .btn-link-advanced,
.light-theme .btn-link-advanced {
    color: #475569;
}

html[data-theme="light"] .btn-link-advanced:hover,
html.light-theme .btn-link-advanced:hover,
.light-theme .btn-link-advanced:hover {
    color: #0062e3;
}

html[data-theme="light"] .modal-feedback.error,
html.light-theme .modal-feedback.error,
.light-theme .modal-feedback.error {
    background: #fee2e2;
    border-bottom: 1px solid #fecaca;
    color: #b91c1c;
}

html[data-theme="light"] .dossier-toast,
html.light-theme .dossier-toast,
.light-theme .dossier-toast {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #090d16;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}




/* ============================================================================
   MINIMALIST PRO PROFILE, RARE TITLES & ACADEMIC DIPLOMA REGISTRY (2026)
   ============================================================================ */

/* Rare Prestige Title Pill (Profile Header & Leaderboard) */
.user-rare-title-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    white-space: nowrap;
}

.user-rare-title-pill .ui-icon {
    width: 13px;
    height: 13px;
}

.user-rare-title-pill.rarity-rare {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
}

.user-rare-title-pill.rarity-epic {
    border-color: rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.14);
    color: #c084fc;
}

.user-rare-title-pill.rarity-legendary {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

.user-rare-title-pill.rarity-mythic {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
}

/* Pro Profile Container */
.pro-profile-wrapper {
    max-width: 1080px;
    margin: 2rem auto 4rem;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pro-profile-card,
.pro-kpi-card,
.pro-section-card,
.pro-accordion {
    background: rgba(15, 22, 36, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.pro-profile-card {
    padding: 1.75rem;
}

.pro-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.pro-identity-main {
    display: flex;
    align-items: flex-start;
    gap: 1.35rem;
    min-width: 0;
}

.pro-avatar-wrap {
    position: relative;
    width: 84px;
    height: 84px;
    flex-shrink: 0;
}

.pro-avatar-img,
.pro-avatar-fallback {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.pro-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.pro-tier-badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: #1e293b;
    color: #f8fafc;
    border: 2px solid #0f1624;
}

.pro-tier-badge.tier-c { background: #0284c7; }
.pro-tier-badge.tier-b { background: #2563eb; }
.pro-tier-badge.tier-a { background: #7c3aed; }
.pro-tier-badge.tier-s { background: #059669; }

.pro-identity-text {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.pro-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pro-display-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.2;
}

.pro-handle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: #94a3b8;
}

.pro-status-tagline {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: #cbd5e1;
}

.pro-bio {
    margin: 0.15rem 0 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #94a3b8;
    max-width: 640px;
}

.pro-meta-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.pro-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 0.78rem;
    color: #94a3b8;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.pro-meta-chip.is-link:hover {
    border-color: rgba(56, 189, 248, 0.45);
    color: #f8fafc;
}

.pro-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.pro-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    font-family: inherit;
}

.pro-btn-primary {
    background: #0ea5e9;
    color: #08101d;
    border-color: #38bdf8;
    font-weight: 700;
}

.pro-btn-primary:hover {
    background: #38bdf8;
}

.pro-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.22);
}

.pro-btn-secondary:hover {
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

/* Rank Progress Strip */
.pro-rank-progress {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.pro-rank-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.79rem;
    color: #94a3b8;
    margin-bottom: 0.45rem;
}

.pro-rank-cur {
    font-weight: 700;
    color: #e2e8f0;
}

.pro-rank-bar-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
}

.pro-rank-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    transition: width 0.35s ease;
}

/* 4 KPI Cards Grid */
.pro-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.pro-kpi-card {
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.pro-kpi-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}

.pro-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pro-kpi-label {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.pro-kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.pro-kpi-icon.is-cyan {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.pro-kpi-icon.is-yellow {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.pro-kpi-icon.is-green {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.pro-kpi-icon.is-orange {
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.25);
    color: #fb923c;
}

.pro-kpi-val {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    font-family: 'JetBrains Mono', monospace;
}

.pro-kpi-accent {
    color: #38bdf8;
}

.pro-kpi-sub {
    font-size: 0.76rem;
    font-weight: 500;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

.ach-unlocked-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #34d399;
    font-weight: 700;
}

.ach-unlocked-pill svg {
    width: 0.85em;
    height: 0.85em;
    stroke-width: 2.8;
}

/* Collapsible Accordions Stack */
.pro-accordions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pro-accordion {
    overflow: hidden;
}

.pro-accordion-summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.18s ease;
}

.pro-accordion-summary::-webkit-details-marker {
    display: none;
}

.pro-accordion-summary:hover {
    background: rgba(255, 255, 255, 0.025);
}

.pro-acc-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.pro-acc-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.pro-acc-icon.is-gold { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.pro-acc-icon.is-cyan { background: rgba(56, 189, 248, 0.14); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.pro-acc-icon.is-emerald { background: rgba(16, 185, 129, 0.14); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.pro-acc-icon.is-slate { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.24); }

.pro-acc-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
}

.pro-acc-desc {
    display: block;
    font-size: 0.79rem;
    color: #94a3b8;
    margin-top: 2px;
}

.pro-acc-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.pro-acc-count {
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.pro-acc-chevron {
    color: #94a3b8;
    transition: transform 0.22s ease;
    display: inline-flex;
}

.pro-accordion[open] .pro-acc-chevron {
    transform: rotate(180deg);
}

.pro-accordion-body {
    padding: 0.25rem 1.4rem 1.4rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* Rare Titles Grid inside Accordion 1 */
.pro-titles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
    margin-top: 1rem;
}

.pro-title-card {
    padding: 1.05rem 1.15rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.7rem;
    transition: border-color 0.2s ease;
}

.pro-title-card.is-locked {
    opacity: 0.68;
}

.pro-title-card.is-unlocked {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(14, 165, 233, 0.05);
}

.pro-title-card.is-equipped {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.06);
}

.pro-title-top {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pro-title-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
}

.pro-title-card.is-unlocked .pro-title-icon-box {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

.pro-title-pills {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 3px;
}

.pro-rarity-tag {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
}

.pro-rarity-tag.rarity-epic { background: rgba(168, 85, 247, 0.16); color: #c084fc; }
.pro-rarity-tag.rarity-legendary { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.pro-rarity-tag.rarity-mythic { background: rgba(16, 185, 129, 0.16); color: #34d399; }

.pro-equipped-tag {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

.pro-title-name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
}

.pro-title-desc {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #94a3b8;
}

.pro-title-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.pro-title-prog-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
}

.pro-mini-bar {
    flex: 1;
    max-width: 110px;
    height: 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.pro-mini-fill {
    height: 100%;
    border-radius: 999px;
    background: #38bdf8;
}

.pro-title-card.is-unlocked .pro-mini-fill {
    background: #10b981;
}

.pro-title-prog-txt {
    font-size: 0.74rem;
    font-family: 'JetBrains Mono', monospace;
    color: #94a3b8;
}

.pro-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.7rem;
    border-radius: 7px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    font-family: inherit;
    transition: all 0.16s ease;
}

.pro-btn-accent {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.pro-btn-accent:hover {
    background: #0ea5e9;
    color: #08101d;
}

.pro-btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

.pro-btn-ghost:hover {
    border-color: rgba(148, 163, 184, 0.45);
    color: #ffffff;
}

/* Achievements Grid inside Accordion 2 */
.pro-achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
}

.pro-ach-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(148, 163, 184, 0.13);
}

.pro-ach-card.is-locked {
    opacity: 0.56;
}

.pro-ach-card.is-unlocked {
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.04);
}

.pro-ach-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #38bdf8;
}

.pro-ach-card.is-locked .pro-ach-icon {
    color: #64748b;
}

.pro-ach-info {
    flex: 1;
    min-width: 0;
}

.pro-ach-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: #64748b;
    margin-bottom: 3px;
}

.pro-ach-card.is-unlocked .pro-ach-status {
    color: #34d399;
    font-weight: 600;
}

.pro-ach-name {
    margin: 0 0 3px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
}

.pro-ach-name a {
    color: inherit;
    text-decoration: none;
}

.pro-ach-name a:hover {
    color: #38bdf8;
}

.pro-ach-desc {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: #94a3b8;
}

/* Official Certificates inside Accordion 3 */
.pro-claimable-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pro-claim-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    border-radius: 11px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.pro-claim-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #f8fafc;
    font-size: 0.9rem;
}

.pro-claim-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #34d399;
}

.pro-certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.pro-cert-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(184, 150, 76, 0.4);
    background: rgba(15, 23, 42, 0.9);
}

.pro-cert-ivory-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 1rem;
    background: #faf8f2;
    border-bottom: 2px solid #b8964c;
    color: #0f1e36;
}

.pro-cert-org {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.pro-cert-serial {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f1e36;
}

.pro-cert-main {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pro-cert-course {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #f8fafc;
}

.pro-cert-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.pro-cert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.pro-empty-box {
    margin-top: 1rem;
    padding: 1.25rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(148, 163, 184, 0.2);
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.pro-empty-box p {
    margin: 0;
}

.pro-field-note {
    font-size: 0.75rem;
    color: #94a3b8;
}

.cert-warning-notice {
    margin: 0 1.5rem;
    padding: 0.8rem 1rem;
    border-radius: 9px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* ============================================================================
   PUBLIC CERTIFICATE VERIFICATION & STRICT ACADEMIC DIPLOMA SHEET
   ============================================================================ */

.cert-verify-wrapper {
    max-width: 1040px;
    margin: 2rem auto 4rem;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.cert-registry-banner {
    padding: 1.5rem 1.75rem;
    border-radius: 14px;
    background: rgba(15, 22, 36, 0.94);
    border: 1px solid rgba(16, 185, 129, 0.38);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.cert-registry-banner.is-invalid {
    border-color: rgba(239, 68, 68, 0.4);
}

.cert-reg-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.cert-reg-status {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 640px;
}

.cert-reg-shield {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cert-reg-shield.invalid {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.cert-reg-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #f8fafc;
}

.cert-reg-desc {
    margin: 0.3rem 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #94a3b8;
}

.cert-reg-queried {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.cert-reg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.cert-reg-meta-grid {
    margin-top: 1.35rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.cert-reg-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cert-reg-meta-item .meta-lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
}

.cert-reg-meta-item .meta-val {
    font-size: 0.9rem;
    color: #f1f5f9;
}

.meta-user-link {
    margin-left: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #38bdf8;
    text-decoration: none;
}

.mono-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #38bdf8 !important;
}

/* Strict Academic Paper Diploma Sheet (Always Ivory & Oxford Navy) */
.academic-diploma-stage {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.academic-diploma-sheet {
    min-width: 820px;
    background: #faf8f2;
    color: #0f1e36;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    font-family: Georgia, 'Times New Roman', Times, serif;
}

.diploma-border-outer {
    border: 3px solid #0f1e36;
    padding: 5px;
}

.diploma-border-gold {
    border: 1.5px solid #b8964c;
    padding: 5px;
}

.diploma-border-inner {
    position: relative;
    border: 1px solid #0f1e36;
    padding: 38px 48px 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 510px;
}

.diploma-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #b8964c;
}
.diploma-corner.tl { top: -6px; left: -6px; }
.diploma-corner.tr { top: -6px; right: -6px; }
.diploma-corner.bl { bottom: -6px; left: -6px; }
.diploma-corner.br { bottom: -6px; right: -6px; }

.diploma-header {
    text-align: center;
}

.diploma-org-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: #0f1e36;
}

.diploma-org-sub {
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #9a7832;
}

.diploma-ornament-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px auto 0;
    max-width: 420px;
}

.diploma-ornament-rule .rule-line {
    flex: 1;
    height: 1px;
    background: #b8964c;
}

.diploma-ornament-rule .rule-diamond {
    width: 8px;
    height: 8px;
    background: #b8964c;
    transform: rotate(45deg);
}

.diploma-body {
    text-align: center;
    margin: 18px 0 22px;
}

.diploma-main-heading {
    margin: 0;
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0f1e36;
}

.diploma-preamble {
    margin: 12px 0 10px;
    font-size: 1rem;
    font-style: italic;
    color: #475569;
}

.diploma-recipient-name {
    display: inline-block;
    min-width: 380px;
    padding: 4px 24px 8px;
    border-bottom: 1.5px solid #b8964c;
    font-size: 2.05rem;
    font-weight: 700;
    color: #0f1e36;
}

.diploma-statement {
    max-width: 620px;
    margin: 16px auto 12px;
    font-size: 0.94rem;
    line-height: 1.55;
    color: #334155;
}

.diploma-course-title {
    font-size: 1.32rem;
    font-weight: 700;
    color: #162c4e;
}

.diploma-course-meta {
    margin-top: 6px;
    font-size: 0.82rem;
    color: #475569;
}

.diploma-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 1.5rem;
    margin-top: 12px;
}

.diploma-col-left {
    font-size: 0.8rem;
    color: #1e293b;
}

.diploma-meta-line {
    margin-bottom: 4px;
}

.diploma-sig-block {
    margin-top: 16px;
    max-width: 240px;
}

.diploma-sig-script {
    font-style: italic;
    font-size: 1.05rem;
    color: #2c3e5a;
    padding-left: 8px;
    margin-bottom: 3px;
}

.diploma-sig-line {
    height: 1px;
    background: #0f1e36;
    margin-bottom: 5px;
}

.diploma-sig-role {
    font-weight: 700;
    font-size: 0.8rem;
    color: #0f1e36;
}

.diploma-sig-loc {
    font-size: 0.72rem;
    color: #64748b;
}

.diploma-col-seal {
    display: flex;
    justify-content: center;
}

.diploma-seal-svg {
    width: 108px;
    height: 108px;
}

.diploma-col-qr {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.diploma-qr-frame {
    width: 96px;
    height: 96px;
    padding: 5px;
    background: #ffffff;
    border: 1px solid #b8964c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diploma-qr-frame svg {
    width: 100%;
    height: 100%;
    display: block;
}

.diploma-qr-caption {
    width: 96px;
    text-align: center;
    margin-top: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0f1e36;
}

/* Responsive Breakpoints */
@media (max-width: 920px) {
    .pro-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pro-titles-grid,
    .pro-certs-grid {
        grid-template-columns: 1fr;
    }
    .pro-achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cert-reg-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .pro-header-top {
        flex-direction: column;
    }
    .pro-identity-main {
        flex-direction: column;
    }
    .pro-kpi-grid,
    .pro-achievements-grid,
    .cert-reg-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* Light Theme Compatibility for Pro Profile & Verification Registry */
html[data-theme="light"] .pro-profile-card,
html[data-theme="light"] .pro-kpi-card,
html[data-theme="light"] .pro-section-card,
html[data-theme="light"] .pro-accordion,
html[data-theme="light"] .cert-registry-banner {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .pro-display-name,
html[data-theme="light"] .pro-kpi-val,
html[data-theme="light"] .pro-section-h2,
html[data-theme="light"] .pro-acc-title,
html[data-theme="light"] .pro-title-name,
html[data-theme="light"] .pro-ach-name,
html[data-theme="light"] .pro-cert-course,
html[data-theme="light"] .cert-reg-title,
html[data-theme="light"] .cert-reg-meta-item .meta-val {
    color: #0f172a;
}

html[data-theme="light"] .pro-status-tagline,
html[data-theme="light"] .pro-rank-cur {
    color: #334155;
}

html[data-theme="light"] .pro-btn-secondary,
html[data-theme="light"] .pro-btn-ghost {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

html[data-theme="light"] .pro-title-card,
html[data-theme="light"] .pro-ach-card,
html[data-theme="light"] .pro-cert-card {
    background: #f8fafc;
}

/* ==========================================================================
   LIGHT THEME — MOBILE / TABLET NAVIGATION DRAWER
   The drawer keeps a near-black backdrop from the dark theme, which made the
   light-theme nav links (dark slate text) unreadable. Give it a light surface.
   ========================================================================== */
@media (max-width: 968px) {
    html[data-theme="light"] .main-nav {
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #d3dce6;
        box-shadow: -10px 0 30px rgba(15, 23, 42, 0.12);
    }

    html[data-theme="light"] .main-nav.active {
        box-shadow: -10px 0 30px rgba(15, 23, 42, 0.16);
    }

    html[data-theme="light"] .nav-link {
        color: #27364b;
        border-bottom-color: #e2e8f0;
    }

    html[data-theme="light"] .nav-link:hover,
    html[data-theme="light"] .nav-link.active {
        color: #0062e3;
        background: #eff6ff;
    }

    html[data-theme="light"] .mobile-menu-btn {
        background: #f8fafc;
        border-color: #cbd5e1;
        color: #27364b;
    }
}
