/* CSS Custom Properties for theming and sizing */
:root {
    /* Default Normal Theme */
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --bg-surface: rgba(255, 255, 255, 0.1);
    --bg-surface-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --accent-color: #00d4aa;
    --border-color: rgba(255, 255, 255, 0.2);
    --focus-color: #ff6b35;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Font Size Variables */
    --font-size-base: 24px;
    --font-size-small: 16px;
    --font-size-large: 32px;
    --font-size-xl: 48px;
    --font-size-heading: 72px;
    
    /* Button Size Variables */
    --button-height-normal: 80px;
    --button-height-large: 200px;
    --button-text-size: 18px;
    --button-text-size-large: 24px;
    --button-icon-size: 32px;
    --button-padding: 20px;
    --button-radius: 16px;
    --button-radius-large: 20px;
    
    /* Spacing Variables */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
}

/* Standard Theme (explicit definition to match the default) */
.theme-standard {
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --bg-surface: rgba(255, 255, 255, 0.1);
    --bg-surface-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --accent-color: #00d4aa;
    --border-color: rgba(255, 255, 255, 0.4);
    --focus-color: #ff6b35;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

/* High Contrast Theme */
.theme-high-contrast {
    --bg-primary: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #333333 100%);
    --bg-surface: rgba(255, 255, 255, 0.2);
    --bg-surface-hover: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent-color: #ffff00;
    --border-color: rgba(255, 255, 255, 0.7);
    --focus-color: #ffff00;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* Dark High Contrast Theme */
.theme-dark-high-contrast {
    --bg-primary: #000000;
    --bg-surface: rgba(255, 255, 255, 0.15);
    --bg-surface-hover: rgba(255, 255, 255, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent-color: #00ff00;
    --border-color: #ffffff;
    --focus-color: #00ff00;
    --shadow-color: rgba(255, 255, 255, 0.3);
}

/* Yellow on Black Theme */
.theme-yellow-black {
    --bg-primary: #000000;
    --bg-surface: rgba(255, 255, 255, 0.1);
    --bg-surface-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #ffff00;
    --text-secondary: #ffff00;
    --accent-color: #ffffff;
    --border-color: #ffff00;
    --focus-color: #ffffff;
    --shadow-color: rgba(255, 255, 0, 0.4);
}

/* White on Blue Theme */
.theme-white-blue {
    --bg-primary: linear-gradient(135deg, #003366 0%, #0066cc 50%, #0099ff 100%);
    --bg-surface: rgba(255, 255, 255, 0.2);
    --bg-surface-hover: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent-color: #ffff00;
    --border-color: rgba(255, 255, 255, 0.7);
    --focus-color: #ffff00;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Font Size Classes */
.font-size-small {
    --font-size-base: 18px;
    --font-size-small: 14px;
    --font-size-large: 24px;
    --font-size-xl: 36px;
    --font-size-heading: 48px;
    --button-text-size: 14px;
    --button-text-size-large: 18px;
}

.font-size-standard {
    --font-size-base: 24px;
    --font-size-small: 16px;
    --font-size-large: 32px;
    --font-size-xl: 48px;
    --font-size-heading: 72px;
    --button-text-size: 18px;
    --button-text-size-large: 24px;
}

.font-size-large {
    --font-size-base: 32px;
    --font-size-small: 20px;
    --font-size-large: 40px;
    --font-size-xl: 64px;
    --font-size-heading: 96px;
    --button-text-size: 24px;
    --button-text-size-large: 32px;
}

.font-size-extra-large {
    --font-size-base: 40px;
    --font-size-small: 24px;
    --font-size-large: 48px;
    --font-size-xl: 72px;
    --font-size-heading: 120px;
    --button-text-size: 32px;
    --button-text-size-large: 40px;
}

.font-size-huge {
    --font-size-base: 56px;
    --font-size-small: 32px;
    --font-size-large: 64px;
    --font-size-xl: 96px;
    --font-size-heading: 144px;
    --button-text-size: 40px;
    --button-text-size-large: 56px;
}


/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: #000000;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    z-index: 1000;
    border: 2px solid var(--text-primary);
    font-size: var(--font-size-small);
}

.skip-link:focus {
    top: 6px;
    background: var(--focus-color);
    color: var(--text-primary);
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--shadow-color);
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main container */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Title - Clean and modern */
h1 {
    font-size: var(--font-size-heading);
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
    text-shadow: 0 4px 20px var(--shadow-color);
    letter-spacing: 2px;
    text-align: center;
}


/* Header settings button */
.header-settings {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

@media (max-width: 768px) {
    .header-settings {
        top: 15px;
        right: 15px;
    }
    
    .settings-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

.settings-button {
    width: 48px;
    height: 48px;
    font-size: 20px;
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-button .material-symbols-rounded {
    font-size: 24px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.settings-button:hover {
    background: var(--bg-surface-hover);
    transform: scale(1.05);
    border-color: var(--accent-color);
}

.settings-button.active {
    background: var(--accent-color);
    color: #000000;
    border-color: var(--accent-color);
    transform: rotate(45deg);
}

.settings-button:focus {
    outline: 3px solid #ff6b35;
    outline-offset: 3px;
}

/* Settings panel */
.settings-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    border-radius: 24px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-small);
    box-shadow: 0 20px 40px var(--shadow-color);
    /* Removed max-height and overflow-y to prevent nested scrolling */
    animation: settingsSlideIn 0.3s ease-out;
    outline: none; /* For when focused programmatically */
}

@keyframes settingsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-panel h2 {
    font-size: var(--font-size-large);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    color: var(--text-primary);
}

.settings-section {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    text-align: left;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-small);
    font-weight: 500;
    padding: var(--spacing-sm);
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.setting-item:hover {
    background: var(--bg-surface-hover);
}

.setting-item label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
}

.setting-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--accent-color);
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin: 0;
}

.setting-item input[type="checkbox"]:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

.setting-item input[type="checkbox"]:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.setting-item select {
    width: 100%;
    max-width: 280px;
    height: 48px;
    font-size: var(--font-size-small);
    font-weight: 500;
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-md);
    transition: all 0.2s ease;
}

.setting-item select:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
    background: var(--bg-surface-hover);
}

.setting-item select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* RTL (Right-to-Left) support for Arabic */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .header-settings {
    left: 20px;
    right: auto;
}

.rtl .skip-link {
    right: 6px;
    left: auto;
}

.rtl .setting-item {
    flex-direction: row-reverse;
}

.rtl .nav-home {
    float: right;
}

/* Ensure emojis and camera icon remain LTR */
.rtl .camera-button,
.rtl .settings-button {
    direction: ltr;
}

/* Mode indicator */
.mode-indicator {
    text-align: center;
    margin: 30px 0 40px 0;
    animation: fadeIn 0.3s ease-in-out;
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 12px 24px;
    margin-bottom: 12px;
}

.mode-icon {
    font-size: 24px;
    color: #ffffff;
}

.mode-text {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.mode-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Button area container */
.button-area {
    width: 100%;
    max-width: 600px;
    margin-bottom: 40px;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Large primary buttons */
.large-button {
    height: 200px;
    font-size: 24px;
    border-radius: 20px;
}

.large-button .button-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.large-button .button-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

/* Secondary smaller buttons */
.secondary-button {
    height: 80px;
    font-size: 18px;
    border-radius: 16px;
    opacity: 0.8;
}

.secondary-button:hover {
    opacity: 1;
}

.secondary-button .icon {
    font-size: 32px;
}

.secondary-button .button-text {
    font-size: 16px;
    font-weight: 600;
}

.secondary-button.recording {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.5), 
                0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.secondary-button.recording .icon {
    animation: pulse-icon 1.5s ease-in-out infinite;
}

/* Stop TTS button */
.stop-tts-button {
    width: 180px;
    height: 45px;
    background: rgba(244, 67, 54, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 12px auto;
    touch-action: manipulation;
    box-shadow: 0 3px 8px rgba(244, 67, 54, 0.3);
}

.stop-tts-button:hover {
    background: rgba(244, 67, 54, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.stop-tts-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.stop-tts-button .material-symbols-rounded {
    font-size: 16px;
}

/* TTS Controls */
.tts-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    margin: var(--spacing-md) auto;
    max-width: 600px;
}

.tts-control-button {
    min-width: 100px;
    height: 48px;
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-small);
    font-weight: 600;
    touch-action: manipulation;
    box-shadow: 0 2px 8px var(--shadow-color);
    flex: 1;
    max-width: 120px;
}

.tts-control-button:hover {
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.tts-control-button:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

.tts-control-button.stop-button {
    background: rgba(244, 67, 54, 0.9);
    border-color: rgba(244, 67, 54, 1);
}

.tts-control-button.stop-button:hover {
    background: rgba(244, 67, 54, 1);
}

.tts-control-button .material-symbols-rounded {
    font-size: 20px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

/* Reset button */
.reset-button {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    touch-action: manipulation;
}

.reset-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.reset-button:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Material Design Icons */
.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 48px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Base button styles */
.camera-button, .voice-button {
    width: 100%;
    height: 180px;
    font-size: 20px;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    /* Motor accessibility improvements */
    min-height: 60px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
}

/* Camera button - Blue theme */
.camera-button {
    background: linear-gradient(145deg, #2196f3, #1976d2);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.4), 
                0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Voice button - Orange theme */
.voice-button {
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4), 
                0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Button icons */
.camera-button .icon, .voice-button .icon {
    font-size: 48px;
    font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 48;
}

/* Default button text */
.camera-button .button-text, .voice-button .button-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Button hover and interaction states */
.camera-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(33, 150, 243, 0.5), 
                0 6px 12px rgba(0, 0, 0, 0.25);
    background: linear-gradient(145deg, #42a5f5, #1e88e5);
}

.camera-button:active {
    transform: translateY(0px);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.4);
}

.camera-button:focus,
.camera-button:focus-visible {
    outline: 3px solid #ff6b35;
    outline-offset: 3px;
}

.camera-button:disabled,
.camera-button.loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(145deg, #757575, #616161);
}

.voice-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.5), 
                0 6px 12px rgba(0, 0, 0, 0.25);
    background: linear-gradient(145deg, #ff8a65, #ff7043);
}

.voice-button:active {
    transform: translateY(0px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
}

.voice-button:focus,
.voice-button:focus-visible {
    outline: 3px solid #2196f3;
    outline-offset: 3px;
}

.voice-button:disabled,
.voice-button.loading {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(145deg, #757575, #616161);
}

.voice-button.recording {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.5), 
                0 4px 8px rgba(0, 0, 0, 0.2);
}

.voice-button.recording .icon {
    animation: pulse-icon 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.95;
    }
}

@keyframes pulse-icon {
    0%, 100% { 
        font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 48;
    }
    50% { 
        font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 48;
    }
}

/* Status message */
.status-message {
    width: 100%;
    font-size: 18px;
    font-weight: 500;
    padding: 20px 24px;
    border: none;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    color: #ffffff;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-message.error {
    background: rgba(255, 71, 87, 0.9);
    backdrop-filter: blur(20px);
    color: #ffffff;
    border: 1px solid rgba(255, 71, 87, 0.3);
    box-shadow: 0 12px 24px rgba(255, 71, 87, 0.3);
}

.status-message.success {
    background: rgba(0, 212, 170, 0.9);
    backdrop-filter: blur(20px);
    color: #ffffff;
    border: 1px solid rgba(0, 212, 170, 0.3);
    box-shadow: 0 12px 24px rgba(0, 212, 170, 0.3);
}

.status-message.loading {
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(20px);
    color: #ffffff;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 400;
}

footer p {
    margin-bottom: 10px;
}

footer a {
    color: #00d4aa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

footer a:hover {
    color: #ffffff;
    background: rgba(0, 212, 170, 0.2);
    text-decoration: none;
}

footer a:focus {
    outline: 2px solid #00d4aa;
    outline-offset: 2px;
}

/* Responsive design - Mobile first */
@media (min-width: 768px) {
    body {
        font-size: 26px;
    }
    
    h1 {
        font-size: 96px;
        margin-bottom: 60px;
    }
    
    .button-row {
        flex-direction: row;
        max-width: 800px;
        gap: 30px;
    }
    
    .camera-button,
    .voice-button {
        height: 200px;
        font-size: 28px;
        flex: 1;
    }
    
    .status-message {
        font-size: 20px;
        padding: 24px 30px;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    body {
        font-size: 28px;
    }
    
    h1 {
        font-size: 120px;
    }
    
    .button-row {
        max-width: 900px;
        gap: 40px;
    }
    
    .camera-button,
    .voice-button {
        height: 220px;
        font-size: 32px;
    }
    
    .status-message {
        font-size: 22px;
        padding: 28px 36px;
    }
}

/* Page-specific styles for About, Help, Contact pages */
.nav-home {
    display: inline-block;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 700;
    padding: 15px 25px;
    margin: 20px 0 30px 0;
    border: 4px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.nav-home:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    transform: scale(1.02);
}

.nav-home:focus {
    outline: 4px solid var(--focus-color);
    outline-offset: 4px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
}

.page-content h1 {
    text-align: center;
    font-size: var(--font-size-heading);
    margin-bottom: 40px;
    color: var(--text-primary);
}

.page-content h2 {
    font-size: var(--font-size-xl);
    font-weight: 900;
    color: var(--text-primary);
    margin: 30px 0 15px 0;
}

.page-content h3 {
    font-size: var(--font-size-large);
    font-weight: 800;
    color: var(--text-primary);
    margin: 20px 0 10px 0;
}

.page-content p {
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.page-content ul,
.page-content ol {
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: 20px;
    padding-left: 30px;
    color: var(--text-primary);
}

.page-content li {
    margin-bottom: 8px;
}

.page-content strong {
    font-weight: 900;
    color: var(--text-primary);
}

.page-content a {
    color: var(--accent-color);
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    background-color: transparent;
}

.page-content a:hover {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    padding: 2px 6px;
    text-decoration: none;
}

.page-content a:focus {
    outline: 4px solid var(--focus-color);
    outline-offset: 2px;
    background-color: var(--accent-color);
    color: var(--bg-primary);
    padding: 2px 6px;
    text-decoration: none;
}

.page-content code {
    background-color: #000000;
    color: #ffff00;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
}

.page-content kbd {
    background-color: #000000;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #333333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-content dl {
    margin-bottom: 25px;
}

.page-content dt {
    font-weight: 900;
    margin-top: 15px;
    margin-bottom: 5px;
}

.page-content dd {
    margin-left: 25px;
    margin-bottom: 10px;
}

.action-buttons {
    text-align: center;
    margin: 40px 0;
}

.button-link {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bg-primary);
    text-decoration: none;
    font-size: var(--font-size-large);
    font-weight: 900;
    padding: 20px 30px;
    border: 6px solid var(--accent-color);
    border-radius: 16px;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.button-link:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    transform: scale(1.02);
    border-color: var(--text-primary);
}

.button-link:focus {
    outline: 6px solid var(--focus-color);
    outline-offset: 6px;
    background-color: var(--accent-color);
    color: var(--bg-primary);
}

/* Responsive adjustments for content pages */
@media (min-width: 768px) {
    .page-content h1 {
        font-size: 60px;
    }
    
    .page-content h2 {
        font-size: 38px;
    }
    
    .page-content h3 {
        font-size: 28px;
    }
    
    .page-content p,
    .page-content ul,
    .page-content ol {
        font-size: 22px;
    }
    
    .nav-home {
        font-size: 22px;
        padding: 18px 30px;
    }
    
    .button-link {
        font-size: 32px;
        padding: 25px 40px;
    }
}

@media (min-width: 1024px) {
    .page-content h1 {
        font-size: 72px;
    }
    
    .page-content h2 {
        font-size: 44px;
    }
    
    .page-content p,
    .page-content ul,
    .page-content ol {
        font-size: 24px;
    }
    
    .button-link {
        font-size: 36px;
        padding: 30px 50px;
    }
}