/* ============================================
   AURA CHESS — Grandmaster Profiler
   Premium Glassmorphism Dashboard
   ============================================ */

/* ── Page Base ── */
/* ── Page Base ── */
/* ── Page Base ── */
.profiler-page {
    min-height: 100vh;
    padding-top: 70px;
    background: #08080c;
    position: relative;
    overflow-x: hidden;
    z-index: 1;
}

/* ── Professional Ambient Lighting & Texture ── */
.profiler-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Technical Dot Grid Overlay */
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        /* Ambient Corners */
        radial-gradient(circle at 85% 15%, rgba(0, 204, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 15% 85%, rgba(204, 0, 255, 0.03) 0%, transparent 40%);
    background-size: 40px 40px, 100% 100%, 100% 100%;
    pointer-events: none;
    z-index: 0;
}

/* Grounding Glow for core content */
.profiler-page::after {
    content: '';
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0, 204, 255, 0.025) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.profiler-page > * { position: relative; z-index: 1; }

/* ════════════════════════════════════════════
   3D DNA EXPERIENCE INTRO
   ════════════════════════════════════════════ */
.dna-intro {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    overflow: hidden;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.dna-intro.dna-hidden {
    display: none !important;
}

/* ── Fingerprint Icon ── */
.dna-icon-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}

.dna-glow-icon {
    font-size: 18rem;
    background: linear-gradient(135deg, #00CCFF, #CC00FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px rgba(204, 0, 255, 0.4));
    opacity: 0.9;
    animation: pulseIcon 4s ease-in-out infinite alternate;
}

@keyframes pulseIcon {
    0% { transform: scale(1); filter: drop-shadow(0 0 30px rgba(0, 204, 255, 0.4)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 50px rgba(204, 0, 255, 0.6)); }
}

/* ── Ambient Glow Overlays ── */
.dna-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.dna-glow-cyan {
    width: 400px;
    height: 400px;
    background: rgba(0, 204, 255, 0.08);
    top: 20%;
    left: 10%;
    animation: dnaGlowPulse 6s ease-in-out infinite;
}

[dir="rtl"] .dna-glow-cyan {
    left: auto;
    right: 10%;
}

.dna-glow-purple {
    width: 350px;
    height: 350px;
    background: rgba(204, 0, 255, 0.06);
    bottom: 15%;
    left: 25%;
    animation: dnaGlowPulse 8s ease-in-out infinite reverse;
}

[dir="rtl"] .dna-glow-purple {
    left: auto;
    right: 25%;
}

@keyframes dnaGlowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.2); }
}

/* ── Content Panel (Glassmorphism) ── */
.dna-content {
    position: relative;
    z-index: 10;
    flex: 1;
    max-width: 580px;
    min-height: 420px;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 24px;
    /* Glassmorphism */
    background: rgba(10, 14, 22, 0.35);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    /* Entry animation */
    animation: dnaContentSlideIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.4s;
}

@keyframes dnaContentSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Badge ── */
.dna-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.12), rgba(204, 0, 255, 0.12));
    border: 1px solid rgba(0, 204, 255, 0.25);
    border-radius: 24px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #00CCFF;
    letter-spacing: 0.5px;
}

.dna-badge i {
    font-size: 14px;
    filter: drop-shadow(0 0 6px rgba(0, 204, 255, 0.6));
    animation: dnaBadgeSpin 8s linear infinite;
}

@keyframes dnaBadgeSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Title ── */
.dna-title {
    font-family: 'Montserrat', 'Cairo', sans-serif;
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 900;
    line-height: 1.3;
    color: #fff;
    letter-spacing: -0.5px;
}

.dna-title-gradient {
    display: inline;
    background: linear-gradient(135deg, #00CCFF 0%, #CC00FF 50%, #FF0080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: dnaGradientShift 4s ease-in-out infinite;
}

@keyframes dnaGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ── Subtitle ── */
.dna-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 15px;
    line-height: 1.85;
    max-width: 450px;
    animation: dnaFadeUp 1s ease both;
    animation-delay: 0.8s;
}

@keyframes dnaFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── CTA Button ── */
.dna-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border: none;
    border-radius: 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #00CCFF, #8B5CF6, #CC00FF);
    background-size: 200% 200%;
    animation: dnaCtaGradient 3s ease-in-out infinite;
    box-shadow:
        0 0 20px rgba(0, 204, 255, 0.25),
        0 0 60px rgba(204, 0, 255, 0.12),
        0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.dna-cta::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, #00CCFF, #CC00FF);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.dna-cta:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 0 35px rgba(0, 204, 255, 0.4),
        0 0 80px rgba(204, 0, 255, 0.2),
        0 15px 40px rgba(0, 0, 0, 0.5);
}

.dna-cta:hover::before {
    opacity: 0.3;
}

.dna-cta:active {
    transform: translateY(-1px) scale(0.98);
}

.dna-cta i {
    font-size: 16px;
    transition: transform 0.3s;
}

.dna-cta:hover i {
    transform: translateX(-4px);
}

[dir="ltr"] .dna-cta:hover i {
    transform: translateX(4px);
}

@keyframes dnaCtaGradient {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ── Security Hint ── */
.dna-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    margin-top: 4px;
    animation: dnaFadeUp 1s ease both;
    animation-delay: 1.2s;
}

.dna-hint i {
    color: rgba(0, 204, 255, 0.4);
    font-size: 13px;
}

/* ── Scroll Hint ── */
.dna-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: dnaFadeUp 1s ease both;
    animation-delay: 2s;
}

.dna-scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.dna-scroll-dot {
    width: 4px;
    height: 8px;
    border-radius: 4px;
    background: rgba(0, 204, 255, 0.6);
    margin-top: 6px;
    animation: dnaScrollBounce 2s ease-in-out infinite;
}

@keyframes dnaScrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%      { transform: translateY(10px); opacity: 0.3; }
}

/* ════════════════════════════════════════════
   3D DNA — MOBILE RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 900px) {
    .dna-intro {
        flex-direction: column;
        min-height: calc(100vh - 70px);
        justify-content: center;
        gap: 30px;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .dna-glow-icon {
        font-size: 11rem;
    }

    .dna-canvas {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0.25;
        z-index: 1;
    }

    [dir="rtl"] .dna-canvas {
        right: 0;
        left: 0;
    }

    .dna-content {
        width: 95%;
        max-width: 600px;
        min-height: 450px;
        margin: 0 auto;
        padding: 40px 30px;
        align-items: center;
        justify-content: center;
        text-align: center;
        background: rgba(10, 14, 22, 0.6);
    }

    .dna-subtitle {
        text-align: center;
    }

    .dna-glow {
        display: none;
    }
}

@media (max-width: 480px) {
    .dna-glow-icon {
        font-size: 8rem;
    }

    .dna-intro {
        gap: 20px;
        padding-top: 20px;
    }

    .dna-title {
        font-size: 22px;
    }

    .dna-subtitle {
        font-size: 13px;
        line-height: 1.6;
    }

    .dna-cta {
        padding: 14px 28px;
        font-size: 15px;
        width: 100%;
    }

    .dna-content {
        width: 96%;
        min-height: 400px;
        justify-content: center;
        padding: 30px 20px;
    }
}

/* ════════════════════════════════════════════
   HERO SECTION
   ════════════════════════════════════════════ */
.profiler-hero {
    text-align: center;
    padding: 50px 20px 30px;
    max-width: 700px;
    margin: 0 auto;
}

.profiler-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.12), rgba(204, 0, 255, 0.12));
    border: 1px solid rgba(0, 204, 255, 0.2);
    border-radius: 24px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #00CCFF;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.profiler-badge i {
    font-size: 14px;
    filter: drop-shadow(0 0 6px rgba(0, 204, 255, 0.6));
}

.profiler-title {
    font-family: 'Montserrat', 'Cairo', sans-serif;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #fff;
}

.profiler-title .highlight {
    background: linear-gradient(135deg, #00CCFF, #CC00FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profiler-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 15px;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════
   SEARCH SECTION
   ════════════════════════════════════════════ */
.profiler-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 70px);
    padding: 20px;
    position: relative;
    z-index: 2;
}

.sync-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.sync-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 700px;
    opacity: 0;
    transform: translateY(-30px);
    animation: syncHeroFadeSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sync-hero-badge {
    background: rgba(0, 255, 204, 0.15);
    border: 1px solid rgba(0, 255, 204, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    color: #00FFCC;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.2);
}

.sync-hero-badge i {
    font-size: 1rem;
}

.sync-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00CCFF, #00FFCC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.sync-hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

@keyframes syncHeroFadeSlideDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes syncHeroFadeSlideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.profiler-search-card.split-layout {
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(10, 14, 22, 0.5);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    padding: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: syncHeroFadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    overflow: hidden;
    margin: 0 auto;
}

.profiler-search-card.split-layout:focus-within {
    border-color: rgba(0, 204, 255, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 204, 255, 0.1) inset, inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.search-visual-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-inline-end: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    min-height: 400px;
}

.visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(129, 182, 76, 0.15) 0%, transparent 60%);
    z-index: 1;
    transition: background 0.6s ease;
    animation: visualBreathe 6s ease-in-out infinite alternate;
}

@keyframes visualBreathe {
    from { opacity: 0.6; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.dynamic-logo-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.2));
}

.dynamic-logo-wrapper {
    font-size: 140px;
    color: #fff;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.dynamic-logo-wrapper.fade-out {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
}

.search-controls-panel {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .profiler-search-card.split-layout {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    .search-visual-panel {
        min-height: 250px;
        border-inline-end: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .dynamic-logo-wrapper {
        font-size: 90px;
    }
    .search-controls-panel {
        padding: 30px 20px;
    }
}

.profiler-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0 24px;
    margin-bottom: 28px;
    transition: all 0.4s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    min-height: 68px;
}

.profiler-input-wrapper:focus-within {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--theme-color, rgba(129, 182, 76, 0.8));
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.15), 0 0 20px var(--theme-color, rgba(129, 182, 76, 0.3));
}

.floating-label-group {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    height: 100%;
}

.floating-label {
    position: absolute;
    inset-inline-start: 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 15px;
    pointer-events: none;
    transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: left top;
}

[dir="rtl"] .floating-label {
    transform-origin: right top;
}

.profiler-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    padding: 24px 0 8px 0;
    outline: none;
    font-family: 'Cairo', sans-serif;
    caret-color: var(--theme-color, #81B64C);
}

.profiler-input:focus ~ .floating-label,
.profiler-input:not(:placeholder-shown) ~ .floating-label {
    transform: translateY(-20px) scale(0.85);
    color: var(--theme-color, #81B64C);
    font-weight: 700;
}

/* ── Platform Selector ── */
.platform-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.profiler-platforms {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    padding: 6px;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.platform-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: 'Cairo', sans-serif;
}

.platform-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
}

.platform-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.platform-btn-img {
    width: 20px;
    height: 20px;
    margin-inline-end: 8px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.platform-btn:hover .platform-btn-img {
    transform: scale(1.1);
}

.platform-btn i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.platform-btn.active[data-platform="chesscom"] {
    background: rgba(129, 182, 76, 0.15);
    border-color: rgba(129, 182, 76, 0.4);
    color: #fff;
    box-shadow: 0 4px 20px rgba(129, 182, 76, 0.25);
}

.platform-btn.active[data-platform="lichess"] {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ── Analyze Button ── */
.profiler-analyze-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00CCFF, #CC00FF);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(204, 0, 255, 0.2);
}

.profiler-analyze-btn .btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: 0s;
}

.profiler-analyze-btn:hover:not(:disabled) .btn-shine {
    left: 200%;
    transition: left 0.7s ease-in-out;
}

.profiler-analyze-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(204, 0, 255, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.profiler-analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profiler-analyze-btn.loading {
    transform: scale(0.96);
    opacity: 0.85;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(204, 0, 255, 0.2);
}

.profiler-analyze-btn .btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.profiler-analyze-btn.loading .btn-spinner {
    display: block;
}

.profiler-analyze-btn.loading .btn-spinner { display: block; }
.profiler-analyze-btn.loading .btn-icon { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error Modal ── */
.pr-error-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    display: none;
    animation: fadeIn 0.3s forwards;
}

.pr-error-modal {
    background: #1e293b;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
    transform: scale(0.9);
    animation: scaleUp 0.3s forwards;
}

.pr-error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.4));
}

.pr-error-modal h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.pr-error-msg {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.pr-error-close {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.pr-error-close:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* ════════════════════════════════════════════
   SMART LOADING STATE
   ════════════════════════════════════════════ */
.profiler-loading {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    display: none;
}

.profiler-loading.active { display: block; }

.loading-orb {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.2), rgba(204, 0, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: orbPulse 2s ease-in-out infinite;
}

.loading-orb::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #00CCFF;
    border-right-color: #CC00FF;
    animation: spin 1.5s linear infinite;
}

.loading-orb i {
    font-size: 28px;
    color: #00CCFF;
    filter: drop-shadow(0 0 10px rgba(0, 204, 255, 0.5));
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(0, 204, 255, 0.1); }
    50% { transform: scale(1.05); box-shadow: 0 0 50px rgba(0, 204, 255, 0.2); }
}

.loading-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00CCFF, #CC00FF);
    border-radius: 3px;
    width: 0%;
    transition: width 1s ease;
}

.loading-status {
    color: #00CCFF;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    min-height: 24px;
}

.loading-sub {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
}

/* ════════════════════════════════════════════
   RESULTS DASHBOARD
   ════════════════════════════════════════════ */
.profiler-results {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 80px;
    display: none;
}

.profiler-results.active {
    display: block;
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── GM Match Card ── */
.gm-match-card {
    background: linear-gradient(135deg, rgba(15, 20, 30, 0.85), rgba(5, 5, 10, 0.95));
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 45px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(0, 204, 255, 0.03);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.gm-match-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 50px rgba(0, 204, 255, 0.05);
}

.gm-match-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 0, 255, 0.08), transparent 70%);
    pointer-events: none;
}

.gm-photo-wrap {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
    position: relative;
    background: #000;
    animation: borderGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes borderGlowPulse {
    0% { box-shadow: 0 15px 30px rgba(0,0,0,0.6), 0 0 10px rgba(0, 204, 255, 0.15); }
    100% { box-shadow: 0 25px 50px rgba(0,0,0,0.7), 0 0 25px rgba(204, 0, 255, 0.25); }
}

.gm-photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #00CCFF, #CC00FF);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
}

.gm-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gm-match-info {
    flex: 1;
}

.gm-match-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.gm-match-name {
    font-family: 'Montserrat', 'Cairo', sans-serif;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 900;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.gm-similarity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.15), rgba(204, 0, 255, 0.15));
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 14px;
    font-weight: 800;
    color: #00CCFF;
    margin-bottom: 14px;
}

.gm-quote {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-style: italic;
    line-height: 1.7;
    position: relative;
    padding-inline-start: 20px;
    border-inline-start: 4px solid #CC00FF;
    max-width: 600px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.gm-match-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.2), rgba(204, 0, 255, 0.1));
    border: 1px solid rgba(0, 204, 255, 0.4);
    border-radius: 14px;
    color: #00CCFF;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 204, 255, 0.1);
    width: fit-content;
}

.gm-match-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.gm-match-btn:hover {
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.4), rgba(204, 0, 255, 0.3));
    border-color: #00CCFF;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 204, 255, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.gm-match-btn:hover i {
    transform: translate(3px, -3px);
}

/* ── Superpower & Kryptonite Section ── */
.superkrypto-section {
    margin-bottom: 30px;
}

.superkrypto-header {
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.superkrypto-header i {
    color: #FFD700;
    font-size: 16px;
}

.superkrypto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.superkrypto-card {
    background: rgba(10, 14, 20, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.superkrypto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.superpower-card::before {
    background: linear-gradient(to bottom, #00CCFF, #00FF88);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.8);
}

.kryptonite-card::before {
    background: linear-gradient(to bottom, #FF3366, #CC00FF);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.8);
}

.superkrypto-card:hover {
    transform: translateY(-5px);
}

.superpower-card:hover {
    border-color: rgba(0, 204, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(0, 204, 255, 0.05);
}

.kryptonite-card:hover {
    border-color: rgba(255, 51, 102, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 51, 102, 0.05);
}

.sk-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    flex-shrink: 0;
    position: relative;
}

.superpower-icon {
    background: rgba(0, 204, 255, 0.1);
    color: #00CCFF;
    border: 1px solid rgba(0, 204, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.15);
}

.kryptonite-icon {
    background: rgba(255, 51, 102, 0.1);
    color: #FF3366;
    border: 1px solid rgba(255, 51, 102, 0.2);
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.15);
}

.sk-content {
    flex: 1;
}

.sk-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.superpower-card .sk-label {
    color: #00CCFF;
}

.kryptonite-card .sk-label {
    color: #FF3366;
}

.sk-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
}

.sk-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .superkrypto-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Nemesis Section ── */
.nemesis-section {
    margin-bottom: 30px;
}

.nemesis-header {
    font-size: 14px;
    font-weight: 800;
    color: #FF0044;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 0, 68, 0.4);
}

.nemesis-card {
    background: linear-gradient(135deg, rgba(20, 5, 5, 0.8), rgba(10, 14, 20, 0.9));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 0, 68, 0.15);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.nemesis-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #FF0044, transparent, #8800FF);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    transition: opacity 0.4s;
}

.nemesis-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 68, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 0 25px rgba(255, 0, 68, 0.1);
}

.nemesis-card:hover::before {
    opacity: 0.8;
}

.nemesis-icon-wrap {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    flex-shrink: 0;
    position: relative;
    background: rgba(255, 0, 68, 0.1);
    color: #FF0044;
    border: 1px solid rgba(255, 0, 68, 0.3);
    box-shadow: 0 0 25px rgba(255, 0, 68, 0.2);
    animation: nemesisPulse 3s infinite alternate;
}

@keyframes nemesisPulse {
    0% { box-shadow: 0 0 15px rgba(255, 0, 68, 0.1); }
    100% { box-shadow: 0 0 30px rgba(255, 0, 68, 0.4), inset 0 0 10px rgba(255, 0, 68, 0.2); }
}

.nemesis-content {
    flex: 1;
}

.nemesis-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    color: #FF0044;
}

.nemesis-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.nemesis-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

/* ── Dashboard Grid ── */
.profiler-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* ── Glass Cards ── */
.profiler-card {
    background: rgba(10, 14, 20, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px;
}

.profiler-card-title {
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profiler-card-title i {
    color: #00CCFF;
    font-size: 16px;
}

/* ── Metrics Breakdown (Replacement for Radar) ── */
.metrics-breakdown {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px 0;
}

.metric-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 14px;
}

.metric-name-wrap i {
    width: 20px;
    color: #00CCFF;
    text-align: center;
}

.metric-value-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: #00CCFF;
}

.bar-outer {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    position: relative;
    overflow: visible; /* To allow legend marker glow */
}

.bar-fill {
    height: 100%;
    width: 0%; /* Animate via JS */
    background: linear-gradient(90deg, #0088CC, #00CCFF);
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gm-marker {
    position: absolute;
    top: -6px;
    bottom: -6px;
    width: 4px;
    background: #CC00FF;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(204, 0, 255, 0.8),
                0 0 5px rgba(204, 0, 255, 1);
    z-index: 2;
    opacity: 0;
    transition: inset-inline-start 1.5s cubic-bezier(0.34, 1.56, 0.64, 1), left 1.5s cubic-bezier(0.34, 1.56, 0.64, 1), right 1.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.gm-marker::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #CC00FF;
    border-radius: 50%;
}

.breakdown-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-item.user .dot { background: #00CCFF; box-shadow: 0 0 8px rgba(0, 204, 255, 0.6); }
.legend-item.legend .dot { background: #CC00FF; box-shadow: 0 0 8px rgba(204, 0, 255, 0.6); }

/* ── Opening Pie Chart ── */
.opening-chart-container {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.custom-opening-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding: 0 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.opening-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.opening-legend-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.opening-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.opening-legend-name {
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 180px;
}

.opening-legend-pct {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 12px;
    opacity: 0.9;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 18px 10px;
    background: rgba(15, 22, 35, 0.3);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.stat-item:hover {
    border-color: rgba(0, 204, 255, 0.25);
    background: rgba(15, 22, 35, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(0, 204, 255, 0.08);
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #00CCFF;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

/* ── Fun Description ── */
.gm-description-card {
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.05), rgba(204, 0, 255, 0.05));
    border: 1px solid rgba(0, 204, 255, 0.1);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 30px;
}

.gm-description-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.8;
}

.gm-description-text strong {
    color: #00CCFF;
}

/* ── Runner-up Matches ── */
.runner-up-section {
    margin-bottom: 35px;
}

.runner-up-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.runner-up-grid {
    display: flex;
    gap: 14px;
}

.runner-up-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 22, 35, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.runner-up-card:hover {
    border-color: rgba(0, 204, 255, 0.35);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 204, 255, 0.05);
}

.runner-up-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.runner-up-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
}

.runner-up-sim {
    font-size: 12px;
    color: rgba(0, 204, 255, 0.7);
    font-weight: 600;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
    .gm-match-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }

    .gm-quote {
        border-inline-start: none;
        padding-inline-start: 0;
        border-top: 2px solid rgba(204, 0, 255, 0.3);
        padding-top: 12px;
    }

    .profiler-dashboard {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .runner-up-grid {
        flex-direction: column;
    }

    .gm-photo-wrap {
        width: 110px;
        height: 110px;
    }
}

/* ════════════ SPA MASTER WRAPPER ════════════ */
.spa-master-wrapper {
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

.spa-master-wrapper > section {
    width: 100%;
}

/* ═══════════════════════════════════════════
   QUIZ SECTION
   ═══════════════════════════════════════════ */
.profiler-quiz {
    width: 100%;
    min-height: calc(100vh - 70px);
    display: grid;
    place-items: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}
.quiz-container-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    min-height: calc(100vh - 100px);
}

.quiz-hero-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 600px;
    opacity: 0;
    transform: translateY(-30px);
    animation: quizHeroFadeSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.quiz-hero-badge {
    background: rgba(204, 0, 255, 0.15);
    border: 1px solid rgba(204, 0, 255, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    color: #CC00FF;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(204, 0, 255, 0.2);
}

.quiz-hero-badge i {
    font-size: 1rem;
}

.quiz-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FF0055, #CC00FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.quiz-hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

@keyframes quizHeroFadeSlideDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes quizHeroFadeSlideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.quiz-container {
    width: 100%;
    max-width: 700px;
    position: relative;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(30px);
    animation: quizHeroFadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.quiz-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.quiz-title-wrap i {
    font-size: 1.5rem;
    color: #CC00FF;
}
.quiz-title-wrap h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.quiz-step {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    display: flex;
    gap: 4px;
}
.quiz-progress {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    margin-bottom: 28px;
    overflow: hidden;
}
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #CC00FF, #00CCFF);
    border-radius: 4px;
    width: 10%;
    transition: width 0.4s ease-in-out;
    box-shadow: 0 0 10px rgba(204, 0, 255, 0.6), 0 0 20px rgba(0, 204, 255, 0.4);
}
.quiz-card {
    animation: quizSlideIn 0.5s ease;
}
@keyframes quizSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.quiz-question {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e8e8e8;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.quiz-option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #c8c8c8;
    font-size: 0.95rem;
    text-align: start;
    width: 100%;
}
.quiz-option:hover {
    background: rgba(204, 0, 255, 0.12);
    border-color: rgba(204, 0, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}
.quiz-option.selected {
    background: rgba(0, 204, 255, 0.15);
    border-color: rgba(0, 204, 255, 0.6);
    color: #fff;
    box-shadow: 0 0 25px rgba(0, 204, 255, 0.15);
}
.quiz-option-letter {
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #CC00FF;
    flex-shrink: 0;
}
.quiz-option:hover .quiz-option-letter {
    background: rgba(204, 0, 255, 0.3);
}
.quiz-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
.quiz-skip-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: rgba(255,255,255,0.4);
    padding: 10px 24px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.quiz-skip-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
}

/* ═══════════════════════════════════════════
   PERSONALITY REVEAL CARD
   ═══════════════════════════════════════════ */
.personality-reveal {
    margin-bottom: 40px;
    animation: personalityFadeIn 1s ease;
}
@keyframes personalityFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.personality-card {
    position: relative;
    background: rgba(15, 18, 30, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    overflow: hidden;
    backdrop-filter: blur(20px);
}
.personality-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--personality-color, #CC00FF) 0%, transparent 70%);
    opacity: 0.12;
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite alternate;
}
@keyframes glowPulse {
    from { opacity: 0.08; transform: translateX(-50%) scale(1); }
    to { opacity: 0.18; transform: translateX(-50%) scale(1.1); }
}
.personality-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--personality-color, #CC00FF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 30px rgba(204, 0, 255, 0.2);
}
.personality-icon-wrap i {
    font-size: 2.2rem;
    color: var(--personality-color, #CC00FF);
}
.personality-code {
    font-family: 'Montserrat', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 6px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.personality-name {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}
.personality-name .highlight-text {
    color: var(--personality-color, #CC00FF);
}
.personality-desc {
    font-size: 1rem;
    line-height: 1.9;
    color: rgba(255,255,255,0.6);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════
   BIPOLAR AXES
   ═══════════════════════════════════════════ */
.axes-section {
    margin-bottom: 40px;
    background: rgba(15, 18, 30, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px);
}
.axes-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}
.axes-header i {
    color: #00CCFF;
}
.axes-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.axis-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.axis-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.axis-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.axis-label.left {
    color: #CC00FF;
}
.axis-label.right {
    color: #00CCFF;
}
.axis-value-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.06);
    padding: 2px 10px;
    border-radius: 10px;
}
.axis-bar-wrap {
    position: relative;
    height: 14px;
    background: rgba(255,255,255,0.06);
    border-radius: 7px;
    overflow: visible;
}
.axis-bar-gradient {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 7px;
    background: linear-gradient(90deg, 
        rgba(204, 0, 255, 0.25) 0%, 
        rgba(255,255,255, 0.03) 50%, 
        rgba(0, 204, 255, 0.25) 100%);
}
.axis-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #00CCFF;
    box-shadow: 0 0 14px rgba(0, 204, 255, 0.5);
    z-index: 2;
    left: 50%;
    transition: left 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.axis-marker.left-pole {
    border-color: #CC00FF;
    box-shadow: 0 0 14px rgba(204, 0, 255, 0.5);
}

/* ═══════════════════════════════════════════
   RECOMMENDATIONS SECTION
   ═══════════════════════════════════════════ */
.recommendations-section {
    margin-bottom: 40px;
    background: rgba(15, 18, 30, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px);
}
.recommendations-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}
.recommendations-header i {
    color: #FFD700;
}
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.rec-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}
.rec-card:hover {
    background: rgba(0, 204, 255, 0.08);
    border-color: rgba(0, 204, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.rec-color-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}
.rec-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.rec-color-dot.white { background: #fff; }
.rec-color-dot.black { background: #333; border: 1px solid #666; }
.rec-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e0e0e0;
    line-height: 1.4;
}
.rec-card:hover .rec-name {
    color: #00CCFF;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Quiz & New Sections
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .quiz-container {
        padding: 20px;
    }
    .quiz-question {
        font-size: 1rem;
    }
    .quiz-option {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    .personality-card {
        padding: 32px 20px;
    }
    .personality-name {
        font-size: 1.5rem;
    }
    .personality-desc {
        font-size: 0.9rem;
    }
    .axes-section, .recommendations-section {
        padding: 20px;
    }
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    .axis-label {
        font-size: 0.75rem;
    }
}

/* ── Path Selection Wrapper ── */
.path-selection-wrapper {
    width: 100%;
    max-width: 1050px;
    min-height: calc(100vh - 70px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 5%;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
    position: relative;
}

/* ── Selection Header ── */
.selection-header {
    text-align: center;
    margin-bottom: 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    animation: slideDownFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.selection-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #00ccff;
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.selection-title {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00ccff 0%, #cc00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.selection-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    line-height: 1.6;
    margin: 0 auto;
}

/* ── Analysis Options Container (Cards Grid) ── */
.analysis-options-container {
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 30px;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 100ms forwards;
    opacity: 0;
}

/* ── Animations ── */
@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .path-selection-wrapper {
        padding: 40px 24px;
        min-height: auto;
    }
    .selection-header {
        margin-bottom: 2rem;
        gap: 12px;
    }
    .selection-title {
        font-size: 1.85rem;
    }
    .selection-subtitle {
        font-size: 0.95rem;
    }
    .analysis-options-container {
        flex-direction: column;
        gap: 20px;
    }
}

/* ── Analysis Cards (Twin Cards) ── */
.analysis-card {
    flex: 1;
    position: relative;
    padding: 50px 35px;
    background: rgba(10, 14, 22, 0.25);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-cyan {
    --theme-glow: rgba(0, 204, 255, 0.45);
    --bg-glow: rgba(0, 204, 255, 0.07);
}

.card-purple {
    --theme-glow: rgba(204, 0, 255, 0.45);
    --bg-glow: rgba(204, 0, 255, 0.07);
}

/* ── Interactive Glass Sheen Swipe ── */
.analysis-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: skewX(-25deg);
    transition: none;
    pointer-events: none;
    z-index: 3;
}

.analysis-card:hover::after {
    left: 150%;
    transition: left 0.85s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── Flat Mouse-tracking Spotlight Glow ── */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(
        350px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
        var(--bg-glow),
        transparent 65%
    );
}

.analysis-card:hover .card-glow {
    opacity: 1;
}

/* Hover Elevations */
.analysis-card:hover {
    transform: translateY(-10px);
}

.card-cyan:hover {
    box-shadow: 0 35px 80px rgba(0, 204, 255, 0.15), inset 0 0 30px rgba(0, 204, 255, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 204, 255, 0.4);
}

.card-purple:hover {
    box-shadow: 0 35px 80px rgba(204, 0, 255, 0.15), inset 0 0 30px rgba(204, 0, 255, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(204, 0, 255, 0.4);
}

/* ── High-Tech Circular Glass Plate Icons ── */
.card-icon {
    position: relative;
    font-size: 45px;
    margin-bottom: 25px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-cyan .card-icon {
    color: #00CCFF;
    border-color: rgba(0, 204, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.05);
}

.card-purple .card-icon {
    color: #CC00FF;
    border-color: rgba(204, 0, 255, 0.12);
    box-shadow: 0 0 20px rgba(204, 0, 255, 0.05);
}

/* Icon hover transformation */
.analysis-card:hover .card-icon {
    transform: translateY(-6px) scale(1.08);
}

.card-cyan:hover .card-icon {
    background: rgba(0, 204, 255, 0.08);
    border-color: rgba(0, 204, 255, 0.35);
    box-shadow: 0 0 30px rgba(0, 204, 255, 0.25), 0 0 15px rgba(0, 204, 255, 0.15) inset;
    filter: drop-shadow(0 0 10px rgba(0, 204, 255, 0.5));
}

.card-purple:hover .card-icon {
    background: rgba(204, 0, 255, 0.08);
    border-color: rgba(204, 0, 255, 0.35);
    box-shadow: 0 0 30px rgba(204, 0, 255, 0.25), 0 0 15px rgba(204, 0, 255, 0.15) inset;
    filter: drop-shadow(0 0 10px rgba(204, 0, 255, 0.5));
}

.analysis-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    font-family: 'Montserrat', 'Cairo', sans-serif;
    position: relative;
    z-index: 2;
}

.analysis-card p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

/* ── Select Button Styles ── */
.card-select-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 24px;
    border-radius: 50px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
}

.card-select-btn i {
    transition: transform 0.3s ease;
}

.card-cyan:hover .card-select-btn {
    background: rgba(0, 204, 255, 0.12);
    border-color: rgba(0, 204, 255, 0.3);
    color: #00CCFF;
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.15);
}

.card-purple:hover .card-select-btn {
    background: rgba(204, 0, 255, 0.12);
    border-color: rgba(204, 0, 255, 0.3);
    color: #CC00FF;
    box-shadow: 0 0 20px rgba(204, 0, 255, 0.15);
}

/* Slide Arrow animation dynamically */
.analysis-card:hover .card-select-btn i.fa-arrow-left {
    transform: translateX(-5px);
}

.analysis-card:hover .card-select-btn i.fa-arrow-right {
    transform: translateX(5px);
}

/* Spotlight Effect via JS */
.analysis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px; /* border width */
    background: radial-gradient(
        600px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
        rgba(255, 255, 255, 0.15),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
}

/* ── SPA Navigation (Back Buttons & Steps) ── */
.spa-back-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    font-family: inherit;
    padding: 0;
}
.spa-back-btn:hover {
    color: #00CCFF;
    transform: translateX(5px);
}
.spa-back-btn[dir="rtl"]:hover {
    transform: translateX(5px);
}
.spa-back-btn[dir="ltr"]:hover {
    transform: translateX(-5px);
}
.spa-step-badge {
    background: rgba(204, 0, 255, 0.15);
    border: 1px solid rgba(204, 0, 255, 0.3);
    color: #CC00FF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
}
.profiler-search .spa-step-badge {
    background: rgba(0, 204, 255, 0.15);
    border-color: rgba(0, 204, 255, 0.3);
    color: #00CCFF;
}

/* Flex header for sections */
.spa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
}

/* ═══════════════════════════════════════════
   DEEP DNA MATRIX — Carousel & Scatter Charts
   ═══════════════════════════════════════════ */
.dna-matrix-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 40px;
}
.dna-matrix-section {
    max-width: 900px;
    width: 100%;
    height: auto;
    margin: 0;
    background: rgba(15, 18, 30, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    position: relative;
    overflow: hidden;
}
.dna-matrix-section::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 204, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Header */
.matrix-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}
.matrix-header i {
    color: #00CCFF;
    font-size: 1.2rem;
}

/* Navigation: Prev / Dots / Next (Bottom navigation) */
.matrix-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 16px;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}
.matrix-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 8px 18px;
    color: rgba(255,255,255,0.6);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.matrix-nav-btn:hover {
    background: rgba(0, 204, 255, 0.12);
    border-color: rgba(0, 204, 255, 0.35);
    color: #00CCFF;
}
.matrix-nav-btn i {
    font-size: 0.7rem;
}

/* Dots */
.matrix-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}
.matrix-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid transparent;
}
.matrix-dot.active {
    background: #00CCFF;
    border-color: rgba(0, 204, 255, 0.5);
    box-shadow: 0 0 12px rgba(0, 204, 255, 0.5);
    transform: scale(1.3);
}
.matrix-dot:hover:not(.active) {
    background: rgba(255,255,255,0.35);
    transform: scale(1.15);
}

/* Carousel Track */
.matrix-carousel {
    position: relative;
    min-height: 400px;
    z-index: 1;
}

/* Slides */
.matrix-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateX(40px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.matrix-slide.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.matrix-slide.exit-left {
    opacity: 0;
    transform: translateX(-40px);
}

/* Slide Title & Subtitle */
.matrix-slide-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
}
.matrix-slide-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    text-align: center;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Chart Wrapper (contains canvas + overlays) */
.matrix-chart-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 320px;
    margin: 0 auto;
    background: rgba(10, 14, 22, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 16px;
}
.matrix-chart-wrap canvas {
    display: block;
}

/* Quadrant crosshair lines */
.matrix-chart-wrap::before,
.matrix-chart-wrap::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,0.06);
    z-index: 1;
    pointer-events: none;
}
.matrix-chart-wrap::before {
    /* vertical center line */
    top: 16px;
    bottom: 16px;
    left: 50%;
    width: 1px;
}
.matrix-chart-wrap::after {
    /* horizontal center line */
    left: 16px;
    right: 16px;
    top: 50%;
    height: 1px;
}

/* Floating Quadrant Badges */
.matrix-quadrant-badge {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    background: rgba(15, 18, 30, 0.65);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 5px 12px;
    z-index: 5;
    pointer-events: none;
    transition: all 0.5s ease;
    white-space: nowrap;
}
.matrix-quadrant-badge.q-tl { top: 24px;  left: 24px; }
.matrix-quadrant-badge.q-tr { top: 24px;  right: 24px; }
.matrix-quadrant-badge.q-bl { bottom: 24px; left: 24px; }
.matrix-quadrant-badge.q-br { bottom: 24px; right: 24px; }

.matrix-quadrant-badge.active {
    color: #00CCFF;
    border-color: rgba(0, 204, 255, 0.45);
    background: rgba(0, 204, 255, 0.08);
    box-shadow: 0 0 18px rgba(0, 204, 255, 0.15);
}

/* Axis Labels (edge-positioned) */
.matrix-axis-label {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
}
.matrix-axis-label.axis-top {
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 204, 255, 0.5);
}
.matrix-axis-label.axis-bottom {
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(204, 0, 255, 0.5);
}
.matrix-axis-label.axis-left {
    left: 2px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    color: rgba(204, 0, 255, 0.5);
}
.matrix-axis-label.axis-right {
    right: 2px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center center;
    color: rgba(0, 204, 255, 0.5);
}

/* Hero Orb Pulse Animation */
@keyframes heroOrbPulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 204, 255, 0.55); }
    50%  { box-shadow: 0 0 0 14px rgba(0, 204, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 204, 255, 0); }
}
.matrix-hero-orb {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #66E0FF, #00CCFF 60%, #0088CC);
    border: 3px solid rgba(0, 204, 255, 0.5);
    z-index: 10;
    pointer-events: none;
    animation: heroOrbPulse 2s ease-in-out infinite;
    transform: translate(-50%, -50%);
}

/* ═══════════════════════════════════════════
   LEGEND HOVER CARD (Custom External Tooltip)
   ═══════════════════════════════════════════ */
.legend-hover-card {
    position: absolute;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', 'Tajawal', sans-serif;
    direction: ltr;
}
.legend-hover-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.legend-hover-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(15, 15, 20, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    min-width: 200px;
    max-width: 280px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 204, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
[dir="rtl"] .legend-hover-card {
    direction: rtl;
}
.legend-hover-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 204, 255, 0.35);
    box-shadow: 0 0 12px rgba(0, 204, 255, 0.2);
}
.legend-hover-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.legend-hover-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.legend-hover-archetype {
    font-size: 0.7rem;
    color: rgba(0, 204, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.legend-hover-match {
    font-size: 0.72rem;
    font-weight: 600;
    color: #FFD740;
    margin-top: 2px;
    line-height: 1.2;
}


/* ═══════════════════════════════════════════
   DNA MATRIX — RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .dna-matrix-section {
        padding: 20px;
    }
    .matrix-carousel {
        min-height: 380px;
    }
    .matrix-chart-wrap {
        max-width: 100%;
        height: 320px;
        padding: 12px;
    }
    .matrix-nav-btn span {
        display: none;
    }
    .matrix-nav-btn {
        padding: 8px 14px;
    }
    .matrix-quadrant-badge {
        font-size: 0.55rem;
        padding: 3px 8px;
    }
    .matrix-quadrant-badge.q-tl { top: 16px;  left: 16px; }
    .matrix-quadrant-badge.q-tr { top: 16px;  right: 16px; }
    .matrix-quadrant-badge.q-bl { bottom: 16px; left: 16px; }
    .matrix-quadrant-badge.q-br { bottom: 16px; right: 16px; }
    .matrix-axis-label {
        font-size: 0.55rem;
    }
    .matrix-slide-title {
        font-size: 1.05rem;
    }
    .matrix-slide-subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .matrix-carousel {
        min-height: 320px;
    }
    .matrix-chart-wrap {
        height: 280px;
    }
    .matrix-quadrant-badge {
        font-size: 0.5rem;
        padding: 2px 6px;
    }
}

/* ── Fusion Animation Elements ── */
.matrix-mind-dot, .matrix-board-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    z-index: 9;
    transform: translate(-50%, -50%);
    transition: left 1.2s cubic-bezier(0.25, 1, 0.5, 1), top 1.2s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.matrix-mind-dot {
    background: radial-gradient(circle at 35% 35%, #FFA3D7, #FF3C9C 60%, #B8005D);
    border: 2px solid rgba(255, 60, 156, 0.6);
    box-shadow: 0 0 10px rgba(255, 60, 156, 0.5);
}

.matrix-board-dot {
    background: radial-gradient(circle at 35% 35%, #88E0FF, #00A6FF 60%, #005DB8);
    border: 2px solid rgba(0, 166, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 166, 255, 0.5);
}

/* Fusion Labels */
.matrix-fusion-label {
    position: absolute;
    bottom: 20px;
    white-space: nowrap;
    background: rgba(10, 14, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: labelFadeIn 0.3s ease both;
}

.matrix-mind-dot .matrix-fusion-label {
    border-color: rgba(255, 60, 156, 0.3);
    color: #FFA3D7;
}

.matrix-board-dot .matrix-fusion-label {
    border-color: rgba(0, 166, 255, 0.3);
    color: #88E0FF;
}

@keyframes labelFadeIn {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

[dir="ltr"] .matrix-fusion-label {
    direction: ltr;
}

[dir="rtl"] .matrix-fusion-label {
    direction: rtl;
}

/* Neon Fusion Ripple Explosion */
@keyframes neonFusionRipple {
    0% {
        transform: translate(-50%, -50%) scale(0.1);
        opacity: 1;
        box-shadow: 0 0 0 0px rgba(0, 204, 255, 0.8), 0 0 10px 5px rgba(204, 0, 255, 0.6);
    }
    100% {
        transform: translate(-50%, -50%) scale(3.5);
        opacity: 0;
        box-shadow: 0 0 0 30px rgba(0, 204, 255, 0), 0 0 40px 20px rgba(204, 0, 255, 0);
    }
}

.matrix-fusion-ripple {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 12;
    animation: neonFusionRipple 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    transform: translate(-50%, -50%);
}
/* ═══════════════════════════════════════════
   ERA FILTER SEGMENTED CONTROL
   ═══════════════════════════════════════════ */
.matrix-filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 18px auto 26px;
    padding: 5px;
    background: rgba(15, 15, 20, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    max-width: 680px;
    width: 95%;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4), 
        0 0 0 1px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.matrix-filter-pill {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    white-space: nowrap;
    font-family: 'Inter', 'Tajawal', sans-serif;
}

.matrix-filter-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.matrix-filter-pill.active {
    color: #fff;
    background: rgba(0, 204, 255, 0.12);
    border: 1px solid rgba(0, 204, 255, 0.35);
    box-shadow: 
        0 0 16px rgba(0, 204, 255, 0.2), 
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* == Deep Stats == */
.stats-section {
    margin-bottom: 40px;
    background: rgba(15, 18, 30, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px);
}
.stats-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}
.stats-header i {
    color: #00CCFF;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.06);
    border-color: rgba(0, 204, 255, 0.3);
}
.stat-icon {
    font-size: 1.8rem;
    color: #00CCFF;
    margin-bottom: 12px;
}
.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0,204,255,0.4);
}
.stat-label {
    font-size: 0.85rem;
    color: #a0aec0;
    font-weight: 600;
}
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
