/* ===================================================
   1. Typing Test Theme Variables (Self-Defined)
   =================================================== */

:root {
    /* --- Colors derived from your FormVisit Light Theme --- */
    --tt-bg-main: #f5faff;
    /* Page Background (from --bg-color) */
    --tt-bg-card: #ffffff;
    /* Card/Hero Background (from --card-bg) */
    --tt-text-main: #111111;
    /* Main Text Color (from --text-color) */
    --tt-text-muted: #6b6b6b;
    /* Sub-headline/Muted Text (from --muted) */

    --tt-primary-blue: #6FB6EF;
    /* Primary Theme Color (Toolbar/Buttons) */
    --tt-primary-dark: #1e6091;
    /* Darker Accent/Footer Heading */
    --tt-accent-gold: #f5b301;
    /* Accent Icon Color (from --colored-star) */
    --tt-action-green: #2ecc71;
    /* Primary CTA Button (Start Test) */
    --tt-border-color: #e6e6e6;
    /* Border/Separator Color (from --border) */
    --tt-link-color: #1923e2;
    --tt-link-hover: #0066cc;
}

/* Dark theme overrides for the Typing Test Component */
.dark-mode {
    --tt-bg-main: #0f1113;
    --tt-bg-card: #3f3f3f;
    --tt-text-main: #e9eef1;
    --tt-text-muted: #99a0a6;

    --tt-primary-blue: #17303f;
    --tt-primary-dark: #1f5f87;
    --tt-accent-gold: #ffd95e;
    --tt-action-green: #27ae60;
    /* Slightly darker green in dark mode */
    --tt-border-color: #222629;
    --tt-link-color: #4dabf7;
    --tt-link-hover: #90caf9;
}


/* =======================================
   2. Global & Reset Styles
   ======================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--tt-text-main);
    background-color: var(--tt-bg-main);
    transition: background-color 0.4s, color 0.4s;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: var(--tt-link-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--tt-link-hover);
}


/* =======================================
   3. Header Styling
   ======================================= */

.main-header {
    background-color: var(--tt-primary-blue);
    color: white;
    padding: 15px 0;
    border-bottom: 3px solid var(--tt-primary-dark);
}

.main-header .container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.com-highlight {
    color: var(--tt-accent-gold);
}

.theme-toggle {
    font-size: 20px;
    font-weight: bold;
    background: none;
    border: none;
    color: white;
}
/* =======================================
   4. Hero Section Styling (Grid)
   ======================================= */

.hero-section {
    background-color: var(--tt-bg-card);
    padding: 80px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 44px;
    margin-bottom: 15px;
    color: var(--tt-text-main);
}

.sub-headline {
    font-size: 18px;
    color: var(--tt-text-muted);
    margin-bottom: 40px;
}

/* CTA Buttons (Primary: Green for Start) */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background-color: var(--tt-action-green);
    color: white;
    box-shadow: 0 4px #27ae60;
    margin-bottom: 30px;
}

.btn-primary:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px #27ae60;
}

/* Exam Quick Select Grid Area */
.exam-quick-select-container {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--tt-bg-main);
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--tt-border-color);
}

.exam-select-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--tt-text-main);
    margin-bottom: 15px;
}

/* The Core Grid Layout (3 items per row) */
.exam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
}

/* Style for the exam buttons inside the grid */
.btn-exam-select {
    background-color: var(--tt-primary-dark);
    color: white;
    padding: 12px 10px;
    font-size: 16px;
    text-align: center;
    border-radius: 5px;
    display: block;
}

.btn-exam-select:hover {
    background-color: var(--tt-primary-blue);
}

/* =======================================
   5. Key Features Section Styling
   ======================================= */

.features-section {
    padding: 60px 0;
    background-color: var(--tt-bg-main);
    text-align: center;
    border-top: 1px solid var(--tt-border-color);
}

.features-section h2 {
    font-size: 32px;
    color: var(--tt-text-main);
    margin-bottom: 40px;
}

.feature-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.feature-card {
    flex: 1;
    background: var(--tt-bg-card);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--tt-border-color);
    transition: transform 0.3s, background-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background-color: var(--tt-border-color);
    /* Hover state uses a subtle theme color */
}

.feature-icon {
    font-size: 40px;
    color: var(--tt-accent-gold);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 20px;
    color: var(--tt-text-main);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--tt-text-muted);
}


/* =======================================
   6. Footer Styling
   ======================================= */

footer {
    /* Using dark theme colors for high contrast footer */
    background-color: var(--tt-primary-dark);
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

footer a {
    color: #cee6f8;
    /* Light blue color for footer links */
    margin: 0 10px;
}

footer a:hover {
    color: var(--tt-accent-gold);
}


/* =======================================
   7. Media Queries (Responsiveness)
   ======================================= */

@media (max-width: 768px) {
    .exam-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-section {
        padding: 50px 0;
    }

    .hero-section h1 {
        font-size: 36px;
    }
}

@media (max-width: 650px) {
    .logo {
        font-size: 24px;
        font-weight: 700;
        color: white;
    }

    .desktop-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .feature-grid {
        flex-direction: column;
    }
}

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