/* Global Tools Master CSS */
/* Show Top/Mobile Nav, Hide Massive Site Footer */
#navbar-container, #top-bar-container { display: block !important; }
.site-footer, footer, #footer-container { display: none !important; }
.d-none { display: none !important; }

/* Prevent any possible click interception issues on 3D overlays */
.waeyuk-topbar,
.waeyuk-navbar.mobile-only {
    pointer-events: auto !important;
}

html, body {
    margin: 0;
    padding: 0;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    font-family: 'Tajawal', 'Inter', sans-serif;
    min-height: 100%;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: 1;
}

/* Make sure overlays sit above canvas but below topbar */
.ui-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100dvh;
    pointer-events: none;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Master Top Bar Styling */
.waeyuk-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 60px !important;
    background: rgba(10, 10, 10, 0.92) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    z-index: 999999 !important; /* Above everything */
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

.waeyuk-topbar .topbar-logo {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #00d2ff !important;
    font-family: 'Tajawal', sans-serif !important;
    letter-spacing: 0.5px !important;
}

.waeyuk-topbar .topbar-links {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
}

.waeyuk-topbar a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    margin: 0 !important;
    font-family: 'Tajawal', sans-serif !important;
}

.waeyuk-topbar a:hover {
    color: #00d2ff !important;
    transform: translateY(-1px) !important;
}

.waeyuk-navbar.mobile-only {
    display: flex !important; /* Displayed as a premium floating dock on all screens */
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: clamp(300px, 90%, 500px) !important;
    background: rgba(10, 10, 15, 0.85) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    z-index: 99999 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    justify-content: space-around !important;
    align-items: center !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

.waeyuk-navbar.mobile-only a {
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease !important;
}

.waeyuk-navbar.mobile-only a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-3px) !important;
}

.waeyuk-navbar.mobile-only a.active {
    color: #00d2ff !important;
    background: rgba(0, 210, 255, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.2) !important;
}

@media (max-width: 768px) {
    .waeyuk-navbar.mobile-only {
        display: flex !important; /* Only shown on mobile viewports */
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        width: 90% !important;
        max-width: 400px !important;
        padding: 8px 16px !important;
        border-radius: 30px !important;
    }
    .waeyuk-navbar.mobile-only a {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
    }
}

.tool-content-section {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000000 !important; /* Above all content and canvases */
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    display: none !important; /* Hidden by default */
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.tool-content-section.active {
    display: flex !important;
    animation: modalFadeIn 0.3s ease forwards;
}

/* Inner modal wrapper holding stats & guide cards */
.tool-content-modal-card {
    background: rgba(15, 15, 20, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 30px !important;
    border-radius: 24px !important;
    width: 100% !important;
    max-width: 500px !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 210, 255, 0.15) !important;
    box-sizing: border-box !important;
    text-align: right !important;
    direction: rtl !important;
    position: relative !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tool-content-close-btn {
    position: absolute !important;
    top: 15px !important;
    left: 20px !important;
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 32px !important;
    cursor: pointer !important;
    line-height: 1 !important;
    transition: color 0.2s, transform 0.2s !important;
    z-index: 10 !important;
}

.tool-content-close-btn:hover {
    color: #ff4757 !important;
    transform: scale(1.1) !important;
}

.tool-content-section h2 {
    color: #00d2ff;
    text-align: center;
    margin-bottom: 30px;
}

.tool-stats-dashboard {
    background: linear-gradient(135deg, #111111 0%, #070707 100%);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tool-content-section a[href*="specialists"] {
    display: inline-block !important;
    background: linear-gradient(135deg, #00d2ff 0%, #00a2ff 100%) !important;
    color: #000 !important;
    padding: 12px 28px !important;
    text-decoration: none !important;
    border-radius: 30px !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tool-content-section a[href*="specialists"]:hover {
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.5) !important;
    filter: brightness(1.1) !important;
}


.waeyuk-footer {
    position: relative;
    z-index: 10;
    background: #000;
    padding: 30px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #555;
    font-size: 12px;
}

/* Mobile responsive adjustments for tools UI overlays globally */
@media (max-width: 768px) {
    /* Prevent backdrop filters on cheap mobile phones from lagging Three.js/Babylon scenes */
    * { 
        backdrop-filter: none !important; 
        -webkit-backdrop-filter: none !important; 
    }

    .ui-overlay {
        padding: calc(65px + env(safe-area-inset-top)) 12px calc(80px + env(safe-area-inset-bottom)) !important;
        justify-content: flex-end !important; /* Push tools action panel closer to thumb area */
        height: 100dvh !important;
        box-sizing: border-box !important;
    }

    .header-box {
        max-width: 100% !important;
        width: 100% !important;
        margin: auto 0 0 0 !important; /* Bottom anchor in UI overlay content area */
        padding: 14px 16px !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
        text-align: right !important;
        background: rgba(10, 10, 10, 0.85) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    }

    .header-box .header {
        text-align: right !important;
        margin-bottom: 10px !important;
    }

    .header-box .header h1 {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: #fff !important;
        margin: 0 0 4px 0 !important;
    }

    .header-box .header p {
        font-size: 11px !important;
        font-weight: 500 !important;
        color: #ccc !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }

    .header-box .footer {
        width: 100% !important;
        margin-top: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Target all buttons inside tool action panels */
    .header-box button,
    .header-box .btn,
    .header-box [class^="btn-"] {
        width: 100% !important;
        min-height: 44px !important; /* Standard mobile touch-target dimensions */
        padding: 10px 20px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        border-radius: 25px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        outline: none !important;
    }

    .header-box .input-area {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .header-box input[type="text"],
    .header-box input {
        width: 100% !important;
        height: 44px !important;
        padding: 10px 15px !important;
        font-size: 13px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
        border-radius: 25px !important;
        box-sizing: border-box !important;
        text-align: right !important;
        outline: none !important;
    }

    .header-box input:focus {
        border-color: var(--primary, #00d2ff) !important;
        background: rgba(255, 255, 255, 0.15) !important;
    }

    /* Responsive overrides for Top-bar, Guidelines and Stats Dashboard */
    .waeyuk-topbar {
        padding: 10px 16px !important;
        height: 56px !important;
        align-items: center !important;
    }
    .waeyuk-topbar .topbar-logo {
        font-size: 16px !important;
    }
    .waeyuk-topbar a {
        font-size: 12px !important;
        margin-left: 10px !important;
    }

    .tool-content-section {
        padding: 40px 16px !important;
        min-height: 40vh !important;
    }
    .tool-content-section h2 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }
    .tool-stats-dashboard {
        padding: 16px !important;
        margin-bottom: 25px !important;
        border-radius: 12px !important;
    }
    .tool-stats-dashboard h2 {
        font-size: 14px !important;
        margin-bottom: 15px !important;
    }
    .tool-stats-dashboard div[style*="font-size: 24px"] {
        font-size: 20px !important;
    }
    .tool-stats-dashboard div[style*="font-size: 12px"] {
        font-size: 10px !important;
    }
    .tool-content-section ul {
        padding-right: 15px !important;
    }
    .tool-content-section a[href*="specialists"] {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
        text-align: center !important;
        border-radius: 25px !important;
    }
}

/* ──────────────────────────────────────────────────────────
   Base / Desktop Styles for Psychological Tests & Quiz Pages
   ────────────────────────────────────────────────────────── */

.container-wrapper,
.waeyuk-test-container,
.test-container,
.container {
    max-width: 800px;
    margin: 140px auto 60px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    text-align: right;
    direction: rtl;
}

/* Titles and Headers */
.test-name,
.waeyuk-test-name {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, #ffffff 30%, #00d2ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Tajawal', sans-serif;
    filter: drop-shadow(0 2px 10px rgba(0, 210, 255, 0.15));
}

.test-header p,
.title,
.subtitle,
.text-dim {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 35px;
    font-size: 16px;
    line-height: 1.6;
}

/* Section indicator dots (Sub-tests navigation indicators) */
#section-indicator-wrap {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 18px 24px;
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
    box-sizing: border-box;
}

.section-progress-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-dot.active {
    background: #00d2ff;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
    transform: scale(1.3);
}

.section-dot.done {
    background: #00d2ff;
    opacity: 0.6;
}

.section-indicator {
    font-size: 14px;
    font-weight: 700;
    color: #00d2ff;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Progress indicator wrap & bar */
.progress-wrap,
.waeyuk-progress-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.progress-bar-container,
.progress-bar,
.waeyuk-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
}

.progress-bar .progress,
.waeyuk-progress-bar .progress,
.progress-bar .waeyuk-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d2ff, #9933ff);
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
    border-radius: 10px;
}

.percentage {
    position: absolute;
    top: -25px;
    left: 0;
    font-size: 13px;
    color: #00d2ff;
    font-weight: 700;
}

/* Questions and Answer Options */
.question-wrap {
    animation: testFadeIn 0.4s ease forwards;
}

@keyframes testFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.question,
.waeyuk-question {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: right;
    color: #ffffff;
}

.answers,
.waeyuk-ans-list {
    list-style: none;
    padding: 0;
    margin: 0 0 35px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answers li,
.waeyuk-ans-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 18px 22px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 15px;
    direction: rtl;
    box-sizing: border-box;
}

.answers li:hover,
.waeyuk-ans-item:hover {
    background: rgba(0, 210, 255, 0.04);
    border-color: rgba(0, 210, 255, 0.4);
    transform: translateX(-4px);
}

.answers li.selected,
.waeyuk-ans-item.selected {
    background: rgba(0, 210, 255, 0.08);
    border-color: #00d2ff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.15);
}

.option-circle {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.answers li:hover .option-circle,
.waeyuk-ans-item:hover .option-circle {
    border-color: rgba(0, 210, 255, 0.6);
}

.answers li.selected .option-circle,
.waeyuk-ans-item.selected .option-circle {
    border-color: #00d2ff;
}

.answers li.selected .option-circle::after,
.waeyuk-ans-item.selected .option-circle::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #00d2ff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00d2ff;
}

.option-text {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Navigation Buttons */
.nav-btns,
.btns-container {
    display: flex;
    justify-content: space-between;
    margin-top: 35px;
    align-items: center;
}

.btn,
.nav-btn,
.waeyuk-btn {
    padding: 12px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Tajawal', sans-serif;
    box-sizing: border-box;
}

.back-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.back-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.back-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.next-btn, .finish-btn {
    background: linear-gradient(135deg, #00d2ff, #0072ff);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 210, 255, 0.25);
}

.next-btn:hover, .finish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 210, 255, 0.4);
    filter: brightness(1.1);
}

/* Results Section */
.score-step {
    text-align: center;
    animation: testFadeIn 0.6s ease forwards;
}

.result-circle-wrap,
.result-score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 8px solid rgba(0, 210, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 40px auto 30px;
    background: rgba(0, 210, 255, 0.02);
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.08);
    position: relative;
    box-sizing: border-box;
}

.result-circle-wrap::before,
.result-score-circle::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 8px solid transparent;
    border-top-color: #00d2ff;
    border-bottom-color: #9933ff;
    animation: rotateTestCircle 4s linear infinite;
}

@keyframes rotateTestCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.score-value,
.score-val {
    font-size: 52px;
    font-weight: 900;
    color: #00d2ff;
    line-height: 1.1;
}

.score-label,
.score-total {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.result-title,
.result-level {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #ffffff;
    text-align: center;
}

.result-desc {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 35px;
    text-align: justify;
    text-justify: inter-word;
}

/* Contact box and CTAs */
.contact-box {
    background: rgba(0, 210, 255, 0.06);
    border: 1px solid rgba(0, 210, 255, 0.2);
    padding: 30px;
    border-radius: 20px;
    margin-top: 40px;
    text-align: center;
    box-sizing: border-box;
}

.contact-box .contact-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 800;
    color: #00d2ff;
}

.contact-box p:not(.contact-title) {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Breakdown Analysis Charts */
.section-breakdown-wrap {
    text-align: right;
    margin-top: 45px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 24px;
    padding: 30px;
    box-sizing: border-box;
}

.section-breakdown-wrap h3 {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.breakdown-item {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 18px;
}

.breakdown-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.breakdown-label {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
}

.breakdown-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.breakdown-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d2ff, #0072ff);
    border-radius: 4px;
    width: 0%;
    transition: width 1.2s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.footer-tools {
    text-align: center;
    margin-top: 30px;
}

.footer-tools a {
    color: #00d2ff;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer-tools a:hover {
    color: #00a2ff;
}
/* Hub / Sub-tests Dashboard Selection Screen */
.hub-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.hub-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 18px;
    text-align: right;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    opacity: 0; /* starts hidden for staggered animation */
    animation: slideUpStaggered 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpStaggered {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-card:nth-child(1) { animation-delay: 0.1s; }
.hub-card:nth-child(2) { animation-delay: 0.2s; }
.hub-card:nth-child(3) { animation-delay: 0.3s; }
.hub-card:nth-child(4) { animation-delay: 0.4s; }

.hub-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
    -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;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0.5;
}

.hub-card:hover {
    background: rgba(0, 210, 255, 0.04);
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.hub-card:hover::after {
    background: linear-gradient(135deg, #00d2ff, #9933ff);
    opacity: 1;
}

.hub-card-icon {
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.hub-card:hover .hub-card-icon {
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.2);
}

.hub-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hub-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.hub-card-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 12px 0;
}

.hub-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.hub-card-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.hub-card.status-completed {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.02);
}

.hub-card.status-completed:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.5);
}

.hub-card.status-completed .hub-card-status {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.hub-card.status-completed::after {
    background: linear-gradient(135deg, #10b981, transparent);
    opacity: 0.8;
}

.hub-card.status-in-progress {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.02);
}

.hub-card.status-in-progress:hover {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.5);
}

.hub-card.status-in-progress .hub-card-status {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.hub-card.status-in-progress::after {
    background: linear-gradient(135deg, #f59e0b, transparent);
    opacity: 0.8;
}

.hub-card-score {
    font-size: 13px;
    font-weight: 700;
    color: #00d2ff;
}

/* Card internal progress bar */
.card-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-progress-fill {
    height: 100%;
    background: #00d2ff;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.hub-card.status-completed .card-progress-fill {
    background: #10b981;
}

.hub-card.status-in-progress .card-progress-fill {
    background: #f59e0b;
}

/* Hub header banner progress dashboard */
.hub-header-banner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(0, 210, 255, 0.02) 100%);
    border: 1px solid rgba(0, 210, 255, 0.12);
    border-radius: 24px;
    padding: 24px 30px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: right;
    box-sizing: border-box;
}

.hub-header-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.banner-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.hub-header-banner h2 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.banner-badge {
    font-size: 13px;
    font-weight: 700;
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.08);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(0, 210, 255, 0.15);
}

.banner-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.banner-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d2ff, #9933ff);
    border-radius: 10px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}

.banner-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    line-height: 1.6;
}

/* Responsive overrides for all psychological tests/quiz pages */
@media (max-width: 768px) {
    .hub-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .hub-card {
        padding: 18px;
    }
    /* 1. Main containers responsiveness */
    .test-container,
    .container,
    .waeyuk-test-container,
    .container-wrapper,
    #quizBox,
    #container-wrapper {
        width: auto !important;
        max-width: calc(100% - 24px) !important;
        margin: 80px 12px 120px 12px !important; /* Spacing for Top Bar and Bottom floating nav */
        padding: 24px 16px !important;
        border-radius: 20px !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
        box-sizing: border-box !important;
    }

    /* 2. Titles and Headers */
    .test-name,
    .waeyuk-test-name {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }

    .test-header p,
    .title,
    .text-dim {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }

    /* 3. Questions */
    .question,
    .waeyuk-question {
        font-size: 17px !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }

    /* 4. Answer options lists */
    .answers,
    .waeyuk-ans-list {
        display: grid !important;
        grid-template-columns: 1fr !important; /* Force stack vertically */
        gap: 10px !important;
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
    }

    /* 5. Answer items */
    .answers li,
    .waeyuk-ans-item {
        padding: 14px 16px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
        gap: 12px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .waeyuk-ans-item {
        justify-content: flex-start !important; /* Keep radio/bullet aligned to right/left */
        text-align: right !important;
    }

    /* 6. Buttons container */
    .nav-btns,
    .btns-container,
    .btns-container div {
        margin-top: 24px !important;
        gap: 10px !important;
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    /* 7. Buttons styling */
    .btn,
    .nav-btn,
    .waeyuk-btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
        border-radius: 12px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        font-weight: 700 !important;
        box-sizing: border-box !important;
    }

    /* 8. Progress indicators */
    .progress-wrap,
    .waeyuk-progress-wrap {
        margin: 16px 0 !important;
        gap: 12px !important;
    }

    .progress-bar-container,
    .progress-bar,
    .waeyuk-progress-bar {
        height: 6px !important;
    }

    /* 9. Results / Score / Toxicity meters */
    .toxicity-meter,
    .result-hex,
    .result-score-circle {
        width: 130px !important;
        height: 130px !important;
        margin: 0 auto 20px !important;
        border-width: 6px !important;
    }

    .toxicity-meter .percentage,
    .result-score,
    .score-val {
        font-size: 28px !important;
    }

    .toxicity-meter .label,
    .score-total {
        font-size: 11px !important;
    }

    .result-card {
        padding: 20px 16px !important;
        border-radius: 20px !important;
    }

    .result-title,
    .result-level {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }

    .result-desc {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }

    /* 10. Contact box / CTA Specialists */
    .contact-box {
        padding: 20px 16px !important;
        border-radius: 16px !important;
        margin-top: 20px !important;
    }

    .contact-box .contact-title {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }

    .contact-box p:not(.contact-title) {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }

    .contact-box a.btn,
    .contact-box a.waeyuk-btn,
    .contact-box a.nav-btn {
        width: 100% !important;
        padding: 12px !important;
        border-radius: 12px !important;
        font-size: 13px !important;
    }
}


