@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables & Design Tokens (Ads-Optimized Light Theme) --- */
:root {
    --bg-dark: #f8fafc; /* Clean slate off-white background */
    --bg-card: #ffffff; /* Pure white card background for ads blend */
    --bg-card-hover: #ffffff;
    --border-color: #e2e8f0; /* Soft gray border */
    --border-glow: #ff713d; /* Coral/Orange focus border */
    
    --text-primary: #0f172a; /* Deep slate primary text for maximum readability */
    --text-secondary: #475569; /* Medium slate secondary text */
    --text-muted: #94a3b8; /* Muted slate for details */

    --accent-purple: #ff713d; /* Vibrant Orange Primary */
    --accent-cyan: #0ea5e9; /* Sky Blue */
    --accent-gradient: linear-gradient(135deg, #ff713d 0%, #ffaa85 100%);
    
    --success: #059669; /* Emerald Green */
    --success-border: rgba(5, 150, 105, 0.2);
    --success-bg: #ecfdf5;
    
    --danger: #dc2626; /* Rose Red */
    --danger-border: rgba(220, 38, 38, 0.2);
    --danger-bg: #fef2f2;
    
    --warning: #d97706;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Typography & Headings --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Layout Wrapper --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent-purple);
}

.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* --- Premium Card Style --- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    transition: var(--transition-normal);
}

.glass-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

/* --- Homepage Specific --- */
.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 3.5rem auto;
}

.hero-section h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Search Box & Autocomplete dropdown */
.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-container {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.4rem 0.6rem 0.4rem 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition-fast);
}

.search-input-container:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(255, 113, 61, 0.15);
}

.search-icon {
    color: var(--text-secondary);
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.search-input-container input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    width: 100%;
    padding: 0.6rem 0;
}

.search-input-container input::placeholder {
    color: var(--text-muted);
}

.clear-search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: none;
}

.clear-search-btn:hover {
    color: var(--text-primary);
}

/* Autocomplete Dropdown List */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f1f5f9;
}

.autocomplete-item .keyword-text {
    font-weight: 600;
    color: var(--text-primary);
}

.autocomplete-item .keyword-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.badge {
    background: #fff3ee;
    color: #d94e1f;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #ffd4c4;
    transition: var(--transition-fast);
}

.badge:hover {
    background: #ffd4c4;
    border-color: #ffbba3;
    color: #c83c0c;
}

/* Hub Grid Layouts */
.hub-section {
    margin-top: 4rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grid-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.category-card {
    cursor: pointer;
    text-align: left;
}

.category-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #f1f5f9;
    border-radius: 12px;
    transition: var(--transition-fast);
}

.category-card:hover .category-icon {
    background: #fff3ee;
}

.category-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Progress History Section --- */
.history-section {
    margin-top: 4rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.history-info h4 {
    font-weight: 600;
}

.history-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-badge {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- Practice Page Layout --- */
/* --- Practice Page Layout --- */
.practice-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    grid-template-rows: auto auto;
    gap: 2rem;
    margin-top: 1rem;
}

.workspace-area {
    grid-column: 1;
    grid-row: 1;
}

.sidebar {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 968px) {
    .practice-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .workspace-area {
        grid-column: 1;
        grid-row: auto;
    }
    .sidebar {
        grid-column: 1;
        grid-row: auto;
    }
    .seo-section {
        grid-column: 1;
        grid-row: auto !important;
        margin-top: 3.5rem !important;
        border-top: 1px solid var(--border-color) !important;
        padding-top: 2.5rem !important;
    }
}

/* Level Grid Selector */
.level-selector-title {
    margin-bottom: 1rem;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 1.25rem 0.75rem; /* larger vertical gap to accommodate S-curves */
    position: relative;
    padding: 0.5rem 0;
}

/* SVG Roadmap Path styling */
.levels-path-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.path-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 6, 6;
}

.path-active {
    fill: none;
    stroke: url(#active-grad);
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(255, 113, 61, 0.25));
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 1.2s ease-out forwards;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

.level-btn {
    aspect-ratio: 1;
    max-width: 70px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    background: #ffffff;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-heading);
    position: relative;
    z-index: 2;
    color: var(--text-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.level-btn.unlocked {
    background: #ffffff;
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.1);
}

.level-btn.unlocked:hover {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0284c7;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.2);
}

.level-btn.locked {
    color: var(--text-muted);
    cursor: not-allowed;
    background: #f8fafc;
    border-color: var(--border-color);
}

.level-btn.locked .lock-icon {
    font-size: 0.8rem;
    margin-top: 0.1rem;
    opacity: 0.6;
}

.level-btn.completed {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.1);
}

.level-btn.completed:hover {
    background: #dcfce7;
    border-color: #047857;
    color: #047857;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.2);
}

.level-btn.completed::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.7rem;
    font-weight: 900;
    background: var(--success);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.level-btn.active-level {
    border-color: var(--accent-purple);
    background: #fff3ee;
    color: var(--accent-purple);
    font-weight: 800;
    box-shadow: 0 0 0 4px rgba(255, 113, 61, 0.2), 0 4px 10px rgba(255, 113, 61, 0.15);
    animation: activePulse 2s infinite alternate;
}

@keyframes activePulse {
    0% {
        box-shadow: 0 0 0 2px rgba(255, 113, 61, 0.2), 0 4px 10px rgba(255, 113, 61, 0.15);
    }
    100% {
        box-shadow: 0 0 0 6px rgba(255, 113, 61, 0.4), 0 4px 14px rgba(255, 113, 61, 0.25);
    }
}

.level-score {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.85;
    margin-top: 2px;
}

/* Quiz Content Frame */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Quiz Elements */
.question-number {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.question-text {
    font-size: 1.35rem;
    line-height: 1.4;
    margin-bottom: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.option-letter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    font-family: var(--font-heading);
    font-weight: 700;
    margin-right: 1rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.option-btn:hover:not(.disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(4px);
}

.option-btn:hover:not(.disabled) .option-letter {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #fff;
}

/* Correct/Incorrect Answer Highlights */
.option-btn.correct {
    background: var(--success-bg) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
    font-weight: 600;
}

.option-btn.correct .option-letter {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: #fff !important;
}

.option-btn.incorrect {
    background: var(--danger-bg) !important;
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}

.option-btn.incorrect .option-letter {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #fff !important;
}

.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Explanation Box */
.explanation-box {
    background: #fff3ee;
    border-left: 4px solid var(--accent-purple);
    padding: 1.25rem 1.5rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 2rem;
    display: none; /* Controlled via JS */
    animation: slideDown 0.3s ease-out;
}

.explanation-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.explanation-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Next / Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 0.9rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(255, 113, 61, 0.2);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 113, 61, 0.35);
}

.btn-action:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Results / Score Card --- */
.results-card {
    text-align: center;
    padding: 3rem 2rem;
    display: none;
}

.score-circle {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 4px solid var(--border-color);
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.score-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.score-total {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.result-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* --- AI Generation Loader --- */
.generation-card {
    text-align: center;
    padding: 5rem 2rem;
    display: none;
}

.ai-pulse-loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    margin: 0 auto 2.5rem;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 113, 61, 0.4);
    animation: pulse 1.8s infinite ease-in-out;
}

.ai-pulse-loader::after {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    border: 2px dashed var(--accent-purple);
    animation: rotate 10s linear infinite;
}

/* --- Google Ads Slots Integration --- */
.ad-container {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.ad-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.ad-placeholder {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.ad-leaderboard {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

.ad-rectangle {
    width: 300px;
    height: 250px;
}

.ad-banner-fluid {
    width: 100%;
    height: auto;
    min-height: 100px;
    max-height: 200px;
}

/* --- SEO Article & FAQ CSS --- */
.seo-section {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.seo-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155; /* Slate dark gray for maximum readability */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.seo-article h1, .seo-article h2, .seo-article h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-article h1 { font-size: 2.2rem; }
.seo-article h2 { font-size: 1.6rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; }
.seo-article h3 { font-size: 1.25rem; }

.seo-article p {
    margin-bottom: 1.5rem;
}

.seo-article ul, .seo-article ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-article li {
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: var(--transition-fast);
}

.faq-item:hover {
    border-color: #cbd5e1;
}

.faq-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 1.25rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: left;
    cursor: pointer;
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--accent-purple);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8fafc;
}

.faq-content-inner {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.active .faq-content {
    max-height: 500px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--accent-cyan);
}

/* Footer Section */
footer.site-footer {
    margin-top: 5rem;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Animations --- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 113, 61, 0.4);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(255, 113, 61, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 113, 61, 0);
    }
}

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

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* Quiz Footer Actions layout */
.quiz-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

/* Secondary Ghost/Border Button style */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-primary);
}

/* Hint Box styling */
.hint-box {
    background: #fef8e7; /* Warm soft yellow background */
    border-left: 4px solid var(--warning);
    padding: 1rem 1.25rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 1.5rem;
    display: none; /* Controlled via JS */
    animation: slideDown 0.3s ease-out;
}

.hint-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--warning);
    margin-bottom: 0.35rem;
}

.hint-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Mobile Responsiveness Updates --- */
@media (max-width: 600px) {
    .container {
        padding: 1.25rem 1rem;
    }
    
    header.site-header {
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.3rem;
        gap: 0.5rem;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .header-nav {
        display: none; /* Hide AI-Powered badge on mobile */
    }
    
    header.site-header .btn-action {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
    
    main > div > h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-section {
        margin: 2rem auto;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .glass-card {
        padding: 1.25rem;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .history-item > div:last-child {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .seo-article {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
    
    .seo-article h1 { font-size: 1.75rem; }
    .seo-article h2 { font-size: 1.4rem; }
    
    .faq-trigger {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .faq-content-inner {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    /* Quiz layouts */
    .question-text {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
    }
    
    .option-btn {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
    
    .option-letter {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        margin-right: 0.75rem;
    }
    
    .quiz-footer-actions .btn-secondary,
    .quiz-footer-actions .btn-action {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .results-actions .btn-action,
    .results-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* --- Sidebar Link Truncation --- */
.sidebar-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}

/* --- Homepage Latest Posts Grid --- */
.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.latest-post-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
    overflow: hidden;
}

.latest-post-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.latest-post-text {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-post-icon {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.latest-post-item:hover .latest-post-icon {
    color: var(--accent-purple);
}

.latest-post-arrow {
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-5px);
    transition: var(--transition-fast);
}

.latest-post-item:hover .latest-post-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent-purple);
}

/* Sidebar lists icon transition */
.sidebar-link-text i {
    transition: var(--transition-fast);
}
a:hover .sidebar-link-text i {
    color: inherit !important;
}
