/* Clean, compatible design for Precalculus 12 with Multi-Theme Support */

/* Font imports - prioritize system fonts for better compatibility */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Default Theme - Clean Blue */
    --primary-blue: #2563eb;
    --secondary-blue: #1e40af;
    --primary-light: #dbeafe;
    --background-primary: #f8fafc;
    --background-secondary: #ffffff;
    --surface-card: #ffffff;
    --surface-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-light: rgba(15, 23, 42, 0.08);
    --shadow-medium: rgba(15, 23, 42, 0.12);
    --success-green: #16a34a;
    --success-light: #dcfce7;
    --error-red: #dc2626;
    --error-light: #fef2f2;
    --warning-yellow: #d97706;
    --warning-light: #fef3c7;
    
    /* Consistent spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Simple border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Theme 2 - Alternative colors */
[data-theme="theme2"] {
    --primary-blue: #7c3aed;
    --secondary-blue: #6d28d9;
    --primary-light: #ede9fe;
    --background-primary: #faf5ff;
    --surface-hover: #f3e8ff;
}

/* Theme 3 - Material Design 3 Green */
[data-theme="material-green"] {
    /* Material Design 3 Green Color System */
    --primary-blue: #2e7d32;
    --secondary-blue: #1b5e20;
    --primary-light: #e8f5e8;
    --background-primary: #f1f8e9;
    --background-secondary: #ffffff;
    --surface-card: #ffffff;
    --surface-hover: #e8f5e8;
    --text-primary: #1b5e20;
    --text-secondary: #388e3c;
    --border-light: #c8e6c9;
    --border-medium: #a5d6a7;
    --shadow-light: rgba(46, 125, 50, 0.08);
    --shadow-medium: rgba(46, 125, 50, 0.12);
    
    /* Material Design 3 specific variables for green theme */
    --md-sys-color-primary: #2e7d32;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #e8f5e8;
    --md-sys-color-on-primary-container: #1b5e20;
    --md-sys-color-secondary: #388e3c;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #c8e6c9;
    --md-sys-color-on-secondary-container: #2e7d32;
    --md-sys-color-surface: #f8fdf8;
    --md-sys-color-on-surface: #1b5e20;
    --md-sys-color-surface-variant: #e8f5e8;
    --md-sys-color-on-surface-variant: #388e3c;
    --md-sys-color-outline: #81c784;
    --md-sys-color-outline-variant: #c8e6c9;
    --md-sys-color-background: #f1f8e9;
    --md-sys-color-on-background: #1b5e20;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #f8fdf8;
    --md-sys-color-surface-container: #f1f8e9;
    --md-sys-color-surface-container-high: #e8f5e8;
    --md-sys-color-surface-container-highest: #c8e6c9;
    
    /* Material Design 3 Elevation */
    --md-sys-elevation-level0: 0px 0px 0px 0px rgba(0, 0, 0, 0.00), 0px 0px 0px 0px rgba(0, 0, 0, 0.00);
    --md-sys-elevation-level1: 0px 1px 2px 0px rgba(46, 125, 50, 0.30), 0px 1px 3px 1px rgba(46, 125, 50, 0.15);
    --md-sys-elevation-level2: 0px 1px 2px 0px rgba(46, 125, 50, 0.30), 0px 2px 6px 2px rgba(46, 125, 50, 0.15);
    --md-sys-elevation-level3: 0px 4px 8px 3px rgba(46, 125, 50, 0.15), 0px 1px 3px 0px rgba(46, 125, 50, 0.30);
    
    /* Material Design 3 Shape */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 28px;
}

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

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--background-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 60px; /* Space for copyright footer */
}

/* Screen management */
.screen {
    display: none;
    min-height: 100vh;
    padding: var(--spacing-xl);
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

/* Start screen specific styling */
#start-screen .container {
    text-align: center;
}

/* Typography - clean and readable */
.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-blue);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Fallback for browsers that don't support background-clip: text */
    background-color: var(--primary-blue);
}

/* Fallback for browsers without background-clip support */
@supports not (background-clip: text) {
    .main-title {
        color: var(--primary-blue);
        background: none;
        -webkit-text-fill-color: inherit;
    }
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xxl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons - clean and accessible design */
.primary-button, .secondary-button {
    padding: var(--spacing-md) var(--spacing-xl);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.primary-button {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.primary-button:hover {
    background: var(--secondary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.primary-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px var(--shadow-light);
}

.secondary-button {
    background: var(--surface-card);
    color: var(--text-primary);
    border-color: var(--border-medium);
    box-shadow: 0 1px 3px var(--shadow-light);
}

.secondary-button:hover {
    background: var(--surface-hover);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.secondary-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px var(--shadow-light);
}

/* Units grid with clean card design */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.unit-card {
    background: var(--surface-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-light);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.unit-card:hover::before {
    transform: scaleX(1);
}

.unit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    border-color: var(--primary-blue);
    background: var(--surface-hover);
}

.unit-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.unit-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.unit-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.unit-card:visited {
    color: inherit;
}

/* Quiz interface */
#quiz-screen .container {
    max-width: 900px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.progress-info {
    background: var(--surface-card);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: 0 1px 3px var(--shadow-light);
}

.question-container {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 4px 12px var(--shadow-light);
    border: 2px solid var(--border-light);
}

.question-text {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    font-weight: 400;
}

/* Math equations styling - Enhanced for better display without MathJax */
.question-text .math-equation {
    font-family: 'Times New Roman', 'STIX Two Math', 'Latin Modern Math', serif;
    font-size: 1.1em;
    font-weight: normal;
    display: inline-block;
    margin: 0 4px;
    font-style: italic;
    color: #2c3e50;
}

.question-text .regular-text {
    font-weight: 400;
    font-style: normal;
}

/* Special math symbols and formatting */
.math-equation {
    line-height: 1.4;
}

/* Style for superscripts and subscripts in math */
.math-equation sup {
    font-size: 0.8em;
    vertical-align: super;
}

.math-equation sub {
    font-size: 0.8em;
    vertical-align: sub;
}

/* Fraction styling */
.math-fraction {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
}

.math-fraction .numerator {
    display: block;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}

.math-fraction .denominator {
    display: block;
    padding-top: 2px;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.option {
    background: var(--surface-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    text-align: left;
    touch-action: manipulation;
    user-select: none;
}

/* Use media query to only apply hover effects on devices that support hover */
@media (hover: hover) {
    .option:hover {
        background: rgba(255, 255, 255, 0.9);
        border-color: var(--primary-blue);
        transform: translateX(4px);
    }
    min-height: 44px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px var(--shadow-light);
}

.option:hover {
    background: var(--surface-hover);
    border-color: var(--primary-blue);
    transform: translateX(4px);
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.option:active, .option:focus {
    background: var(--surface-hover);
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.option.selected {
    background: var(--primary-light);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 500;
}

.option.correct {
    background: var(--success-light);
    border-color: var(--success-green);
    color: var(--success-green);
    font-weight: 500;
}

.option.incorrect {
    background: var(--error-light);
    border-color: var(--error-red);
    color: var(--error-red);
    font-weight: 500;
}

.option.correct-answer {
    background: var(--success-light) !important;
    border-color: var(--success-green) !important;
    color: var(--success-green) !important;
    font-weight: 600 !important;
}

.text-input-container {
    margin-top: var(--spacing-lg);
}

#text-answer {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--surface-card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px var(--shadow-light);
}

#text-answer:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.quiz-controls {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.feedback {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 2px 8px var(--shadow-light);
    border: 2px solid var(--border-light);
}

.feedback.correct {
    border-left-color: var(--success-green);
    background: var(--success-light);
    border-color: var(--success-green);
}

.feedback.incorrect {
    border-left-color: var(--error-red);
    background: var(--error-light);
    border-color: var(--error-red);
}

.hint-text {
    background: var(--warning-light);
    border: 2px solid var(--warning-yellow);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    font-style: italic;
    color: var(--warning-yellow);
    box-shadow: 0 2px 8px var(--shadow-light);
}

/* Responsive design */
@media (max-width: 768px) {
    .screen {
        padding: var(--spacing-lg);
    }
    
    .units-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-header {
        flex-direction: column;
        text-align: center;
    }
    
    .quiz-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .quiz-controls button {
        width: 100%;
        max-width: 300px;
    }
    
    /* Mobile-specific improvements */
    .option {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-sm);
        touch-action: manipulation;
    }
    
    .question-container, .quiz-controls {
        touch-action: manipulation;
    }
    
    /* Mobile Safari specific fixes - prevent zoom on fast taps */
    .question-options {
        touch-action: manipulation;
    /* Larger touch targets for mobile */
    .primary-button, .secondary-button {
        min-height: 44px;
        padding: var(--spacing-md) var(--spacing-lg);
    }
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.active {
    animation: fadeIn 0.5s ease-out;
}

/* Loading state for MathJax */
.math-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    height: 20px;
    margin: 4px 0;
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: -100% 50%;
    }
}

/* Navigation styles */
.navigation {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface-card);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px var(--shadow-light);
}

.back-button:hover {
    background: var(--surface-hover);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-medium);
}

/* Unit description styling */
.unit-description {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
}

/* Completion message styling */
.completion-message {
    text-align: center;
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xxl);
    box-shadow: 0 4px 12px var(--shadow-light);
    border: 2px solid var(--border-light);
}

.completion-message h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.completion-message p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.completion-message .primary-button {
    margin-top: var(--spacing-lg);
    text-decoration: none;
    display: inline-block;
}

/* Feedback styles */
.feedback-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.feedback-icon {
    font-size: 1.2rem;
}

.feedback.correct .feedback-icon {
    color: var(--success-green);
}

.feedback.incorrect .feedback-icon {
    color: var(--error-red);
}

.feedback-explanation {
    line-height: 1.6;
    color: var(--text-primary);
}

/* Copyright footer */
.copyright-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-card);
    border-top: 2px solid var(--border-light);
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 1000;
    box-shadow: 0 -2px 8px var(--shadow-light);
}

/* Math equations styling - Enhanced for better display */
.question-text .math-equation {
    font-family: 'Times New Roman', 'STIX Two Math', 'Latin Modern Math', serif;
    font-size: 1.1em;
    font-weight: normal;
    display: inline-block;
    margin: 0 4px;
    font-style: italic;
    color: var(--text-primary);
}

.question-text .regular-text {
    font-weight: 400;
    font-style: normal;
}

/* Special math symbols and formatting */
.math-equation {
    line-height: 1.4;
}

/* Style for superscripts and subscripts in math */
.math-equation sup {
    font-size: 0.8em;
    vertical-align: super;
}

.math-equation sub {
    font-size: 0.8em;
    vertical-align: sub;
}

/* Fraction styling */
.math-fraction {
    display: inline-block;
    text-align: center;
    vertical-align: middle;
}

.math-fraction .numerator {
    display: block;
    border-bottom: 1px solid var(--text-primary);
    padding-bottom: 2px;
}

.math-fraction .denominator {
    display: block;
    padding-top: 2px;
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.active {
    animation: fadeIn 0.3s ease-out;
}

/* Theme Toggle Styles */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.theme-toggle-btn {
    background: var(--surface-card);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background: var(--surface-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Loading state indicators */
.loading {
    background: linear-gradient(90deg, var(--border-light) 25%, transparent 37%, var(--border-light) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    height: 20px;
    margin: 4px 0;
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: -100% 50%;
    }
}
/* Theme Toggle Button */
.theme-toggle-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 1000;
}

.theme-toggle-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    background: var(--surface-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.theme-toggle-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-medium);
    border-color: var(--primary-blue);
}

.theme-toggle-button:active {
    transform: scale(0.95);
}

.theme-icon {
    transition: transform 0.2s ease;
}

.theme-toggle-button:hover .theme-icon {
    transform: rotate(180deg);
}

/* Material Design 3 Components for Green Theme */
[data-theme="material-green"] body {
    font-family: Roboto, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

[data-theme="material-green"] .md-card {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--radius-lg);
    border: 1px solid var(--md-sys-color-outline-variant);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--md-sys-elevation-level1);
}

[data-theme="material-green"] .md-card:hover {
    box-shadow: var(--md-sys-elevation-level3);
    transform: translateY(-2px);
}

[data-theme="material-green"] .md-filled-button {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--md-sys-elevation-level1);
    min-width: 140px;
}

[data-theme="material-green"] .md-filled-button:hover {
    box-shadow: var(--md-sys-elevation-level2);
    transform: translateY(-1px);
}

[data-theme="material-green"] .md-filled-button:active {
    transform: translateY(0);
    box-shadow: var(--md-sys-elevation-level1);
}

/* Update unit cards for Material Design 3 green theme */
[data-theme="material-green"] .unit-card {
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: all 0.2s ease;
    box-shadow: var(--md-sys-elevation-level1);
    position: relative;
    overflow: hidden;
}

[data-theme="material-green"] .unit-card:hover {
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-sys-elevation-level3);
    transform: translateY(-4px);
    border-color: var(--md-sys-color-primary);
}

[data-theme="material-green"] .unit-card::before {
    background: var(--md-sys-color-primary);
    height: 4px;
}

[data-theme="material-green"] .unit-card h3 {
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
}

[data-theme="material-green"] .unit-card p {
    color: var(--md-sys-color-on-surface-variant);
}

/* Material Design 3 specific adjustments */
[data-theme="material-green"] .main-title {
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="material-green"] .section-title {
    color: var(--md-sys-color-on-surface);
}

[data-theme="material-green"] .subtitle {
    color: var(--md-sys-color-on-surface-variant);
}

/* Update theme toggle for material design */
[data-theme="material-green"] .theme-toggle-button {
    background: var(--md-sys-color-surface-container-high);
    border-color: var(--md-sys-color-outline);
    box-shadow: var(--md-sys-elevation-level2);
}

[data-theme="material-green"] .theme-toggle-button:hover {
    background: var(--md-sys-color-surface-container-highest);
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--md-sys-elevation-level3);
}

/* Card content wrapper for Material Design compatibility */
.card-content {
    display: block;
    width: 100%;
}

.card-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Ensure Material Design 3 classes don't conflict with default styling */
[data-theme="material-green"] .card-content h3 {
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
}

[data-theme="material-green"] .card-content p {
    color: var(--md-sys-color-on-surface-variant);
}
