/* British Council Inspired Dashboard Styles */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

aielts-header {
    display: block;
    margin: 0;
    padding: 0;
    border-top: none !important;
    outline: none !important;
    box-shadow: none !important;
}

:root {
    --bc-red: #c8102e;
    --bc-header-black: #222222;
    --bc-nav-bg: #022069;
    --bc-bg-gray: #F4F4F4;
    --bc-text-dark: #222222;
    --bc-link-blue: #0077C8;
    /* Approximate BC Blue */
    --bc-button-blue: #235F89;
    /* Darker Button Blue */
    --bc-alert-bg: #E3F2FD;
    --bc-border: #DEDEDE;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    border-top: none !important;
    outline: none !important;
    box-shadow: none !important;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #FFFFFF;
    color: var(--bc-text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

#root {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}


/* --- Top Bar --- */
.top-bar {
    background-color: var(--bc-red);
    color: white;
    padding: 3px 0;
    font-size: 13px;
    border-top: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 15px;
}

.top-bar a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
}

.top-bar a:hover {
    text-decoration: underline;
}

/* --- Main Header (Logo) --- */
.site-header {
    background-color: #D1D1D1;
    padding: 2px 0 !important;
    color: #000000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-image {
    height: 40px !important;
    width: auto;
    margin-right: 20px;
    display: block;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-sub {
    font-weight: 300;
    opacity: 0.9;
    margin-left: 5px;
}


/* --- Navigation --- */
.nav-bar {
    background-color: var(--bc-nav-bg);
    color: white;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    position: relative;
}

.nav-item {
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
    display: block;
}

.nav-item:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Dropdown Menu --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    top: 100%;
    left: 0;
    border-top: 2px solid var(--bc-red);
}

.dropdown-content a {
    color: var(--bc-text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--bc-button-blue);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .nav-item {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Main Content --- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 15px 40px;
    flex: 1;
    width: 100%;
}

h1.page-title {
    font-size: 36px;
    font-weight: 400;
    margin-top: 0px;
    margin-bottom: 20px;
}

/* --- Countdown Timer Overlay --- */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    font-family: 'Open Sans', sans-serif;
}

.countdown-text {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    text-align: center;
    letter-spacing: 1px;
}

.countdown-number-container {
    width: 180px;
    height: 180px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 40px rgba(200, 16, 46, 0.3);
    transition: all 0.3s ease;
}

.countdown-number {
    font-size: 100px;
    font-weight: 800;
    color: #c8102e;
    line-height: 1;
}

.countdown-start-text {
    font-size: 120px;
    font-weight: 900;
    color: #c8102e;
    text-transform: uppercase;
    display: none;
    animation: scaleIn 0.3s ease-out;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(200, 16, 46, 0.2);
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Alert Box */
.alert-box {
    background-color: var(--bc-alert-bg);
    color: var(--bc-button-blue);
    padding: 15px 20px;
    border: 1px solid #B3E5FC;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Section Header */
h2.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

p.section-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    margin-top: 0;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Card Style */
.dash-card {
    background-color: #F8F9FA;
    border: 1px solid #E0E0E0;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
}

.dash-card:hover {
    background-color: #E6E6E6;
    border-color: #CCC;
}

.dash-card h3 {
    margin: 0;
    color: var(--bc-button-blue);
    font-size: 16px;
    font-weight: 600;
}

.dash-card p {
    margin: 5px 0 0;
    color: #555;
    font-size: 13px;
}

/* Quick Links Section */
.quick-links-container {
    background-color: #F4F4F4;
    border: 1px solid #E0E0E0;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.btn-primary {
    background-color: var(--bc-button-blue);
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    /* Pill shape */
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: #1A4A6B;
}

.link-secondary {
    color: var(--bc-button-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-left: 20px;
}

.link-secondary:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: var(--bc-header-black);
    color: #CCC;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 5px solid var(--bc-red);
}

.footer-links {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    font-size: 12px;
}

.footer-links a {
    color: #CCC;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copyright {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 15px;
    font-size: 11px;
    color: #888;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar {
        font-size: 11px;
    }

    .top-bar-container {
        justify-content: space-between;
        padding: 0 10px;
    }

    .site-header {
        padding: 4px 0 !important;
    }

    .header-container {
        padding: 0 15px !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
    }

    .logo-link {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
    }

    .logo-image {
        height: 40px !important;
        width: auto !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
    }

    .logo-text {
        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
        display: inline !important;
    }

    .logo-sub {
        display: none;
    }

    .nav-bar {
        background-color: var(--bc-nav-bg);
        border-bottom: 2px solid var(--bc-red);
        position: sticky;
        top: 0;
        z-index: 1000;
        overflow: visible !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 5px 12px;
        gap: 8px;
        align-items: center;
    }

    .nav-container::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        border: none;
        padding: 8px 16px;
        flex-shrink: 0;
        font-size: 13px;
        border-radius: 6px;
        margin: 0;
        color: rgba(255, 255, 255, 0.8);
        transition: all 0.2s;
    }

    .nav-item.active {
        background-color: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        font-weight: 700;
    }

    .nav-item:first-child {
        border-left: none;
    }

    .nav-container.has-active-dropdown {
        overflow: visible !important;
    }

    .dropdown.active-mobile .dropdown-content {
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 9999;
        background-color: #f1f3f5;
        /* Premium Light Grey */
        min-width: 180px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border-top: 3px solid var(--bc-red);
        border-radius: 0 0 8px 8px;
    }

    .dropdown.active-mobile .dropdown-content a {
        padding: 14px 20px;
        font-size: 14px;
        border-bottom: 1px solid #e9ecef;
        color: #333;
        font-weight: 500;
        white-space: normal;
        /* Allow text wrap if needed */
    }

    .dropdown.active-mobile .dropdown-content a:last-child {
        border-bottom: none;
        border-radius: 0 0 8px 8px;
    }

    .dropdown.active-mobile .dropdown-content a:active,
    .dropdown.active-mobile .dropdown-content a:hover {
        background-color: #e9ecef;
    }

    .quick-links-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .link-secondary {
        margin-left: 0;
    }

    .main-content {
        padding: 8px 15px 24px;
    }

    h1.page-title {
        font-size: 28px;
        margin-top: 0px;
        margin-bottom: 12px;
        text-align: center;
    }
}

/* --- Professional Evaluation Styling --- */
.evaluation-result-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.eval-hero-card {
    background: linear-gradient(135deg, #022069 0%, #011440 100%);
    color: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(2, 32, 105, 0.25);
    position: relative;
    overflow: hidden;
}

.eval-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.eval-hero-title {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.eval-band-score {
    font-size: 84px;
    font-weight: 800;
    margin: 10px 0;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.eval-band-label {
    font-size: 24px;
    font-weight: 600;
    opacity: 0.95;
}

.eval-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.eval-score-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid #eef2f7;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.eval-score-card:hover {
    transform: translateY(-5px);
    border-color: #022069;
    box-shadow: 0 10px 25px rgba(2, 32, 105, 0.1);
}

.eval-score-card .criteria-name {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.eval-score-card .criteria-score {
    font-size: 32px;
    font-weight: 700;
    color: #022069;
}

.eval-feedback-section {
    background: #f8fafc;
    border-radius: 20px;
    padding: 35px;
    border: 1px solid #e2e8f0;
}

.eval-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.eval-section-title svg {
    color: #022069;
}

.feedback-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.feedback-block {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border-left: 5px solid #022069;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.feedback-block.strengths {
    border-left-color: #10b981;
}

.feedback-block.improvements {
    border-left-color: #f59e0b;
}

.feedback-block.advice {
    border-left-color: #3b82f6;
}

.feedback-block h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-block p,
.feedback-block li {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 10px;
}

.feedback-block ul {
    padding-left: 20px;
}

/* Fix for PDF export button in evaluation */
.eval-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn-eval-action {
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
}

.btn-eval-primary {
    background: #022069;
    color: white;
}

.btn-eval-primary:hover {
    background: #011442;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 32, 105, 0.3);
}

.btn-eval-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-eval-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-eval-export {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.btn-eval-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

/* Markdown Evaluation Formatting */
.markdown-evaluation {
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
}

.markdown-evaluation h1, 
.markdown-evaluation h2, 
.markdown-evaluation h3, 
.markdown-evaluation h4 {
    color: #0f172a;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 700;
}

.markdown-evaluation h1 { font-size: 1.5em; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.3em; }
.markdown-evaluation h2 { font-size: 1.3em; color: #022069; }
.markdown-evaluation h3 { font-size: 1.1em; }
.markdown-evaluation h4 { font-size: 1em; }

.markdown-evaluation p {
    margin-bottom: 1em;
}

.markdown-evaluation ul, 
.markdown-evaluation ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.markdown-evaluation li {
    margin-bottom: 0.5em;
}

.markdown-evaluation strong {
    color: #1e293b;
    font-weight: 700;
}

@media (max-width: 640px) {
    .eval-band-score {
        font-size: 60px;
    }

    .eval-hero-card {
        padding: 30px 20px;
    }

    .eval-score-grid {
        grid-template-columns: 1fr 1fr;
    }

    .eval-feedback-section {
        padding: 20px;
    }
}
