/* ================================
   SSP-E: English Pronunciation App
   Production CSS - Glassmorphism Design
   ================================ */

/* CSS Variables - Color Palette */
:root {
    /* Colors */
    --bg-primary: #0F1419;
    --bg-secondary: #1a202c;
    --bg-tertiary: #2d3748;
    --accent-cyan: #00D9FF;
    --accent-purple: #A855F7;
    --accent-blue: #0099FF;
    --accent-green: #00FF88;
    --text-primary: #F5F7FA;
    --text-secondary: #B0B7C3;
    --text-tertiary: #7a8695;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-lighter: rgba(255, 255, 255, 0.04);
    
    /* Glass Effect */
    --glass-bg: rgba(26, 32, 44, 0.45);
    --glass-border: rgba(255, 255, 255, 0.06);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(0, 217, 255, 0.2);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #A855F7 100%);
    --gradient-secondary: linear-gradient(135deg, #A855F7 0%, #0099FF 100%);
    --gradient-text: linear-gradient(135deg, #00D9FF 0%, #A855F7 50%, #0099FF 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Default */
:root {
    color-scheme: dark;
}

/* Enhanced Dark Mode - Night Mode */
@media (prefers-color-scheme: dark) {
    :root {
        /* Enhanced dark mode colors for better contrast and night mode experience */
        --bg-primary: #0a0f17;
        --bg-secondary: #0f1420;
        --bg-tertiary: #1a2132;
        --accent-cyan: #00d9ff;
        --accent-purple: #b856ff;
        --accent-blue: #0099ff;
        --accent-green: #00ff88;
        --text-primary: #f5f7fa;
        --text-secondary: #b8c5d6;
        --text-tertiary: #7a8695;
        --border-light: rgba(255, 255, 255, 0.08);
        --border-lighter: rgba(255, 255, 255, 0.04);
        
        /* Glass Effect - Optimized for dark mode */
        --glass-bg: rgba(15, 20, 32, 0.5);
        --glass-border: rgba(255, 255, 255, 0.06);
        
        /* Shadows - Enhanced for dark mode */
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
        --shadow-glow: 0 0 30px rgba(0, 217, 255, 0.25);
    }
}

/* Light Mode */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #F8FAFB;
        --bg-secondary: #FFFFFF;
        --bg-tertiary: #F0F4F8;
        --text-primary: #1a202c;
        --text-secondary: #4a5568;
        --text-tertiary: #718096;
        --glass-bg: rgba(255, 255, 255, 0.7);
        --glass-border: rgba(0, 0, 0, 0.06);
    }
}

/* ================================
   Reset & Base Styles
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Selection */
::selection {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

/* ================================
   Typography
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-purple);
}

.text-small {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   Glass Morphism Base
   ================================ */

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
}

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    color: var(--accent-cyan);
    border: 1.5px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 217, 255, 0.05);
}

/* Icon Button */
.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--accent-cyan);
}

.btn-icon:hover:not(:disabled) {
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Play Button Special */
.btn-play {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border: none;
}

.btn-play:hover:not(:disabled) {
    transform: scale(1.1);
}

/* Icon Small Button */
.btn-icon-small {
    width: auto;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    height: auto;
}

.btn-icon-small svg {
    width: 16px;
    height: 16px;
}

/* ================================
   Navigation
   ================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-lighter);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent-cyan);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ================================
   Hero Section
   ================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
    max-width: 600px;
}

.hero-icon {
    width: 100px;
    height: 100px;
    margin-bottom: var(--space-xl);
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.icon-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
    display: none;
}

@media (min-width: 1024px) {
    .hero-visual {
        display: block;
    }
}

.floating-element {
    position: absolute;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    background: var(--glass-bg);
    animation: float-element 4s ease-in-out infinite;
}

.floating-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.floating-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    right: 5%;
    animation-delay: 1s;
}

.floating-3 {
    width: 180px;
    height: 180px;
    bottom: 10%;
    right: 25%;
    animation-delay: 2s;
}

@keyframes float-element {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(2deg);
    }
}

/* ================================
   Pronounce Section
   ================================ */

.pronounce-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.pronounce-container {
    display: flex;
    justify-content: center;
}

.pronounce-panel {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: slide-up 0.6s ease-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.voice-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.voice-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* ================================
   Input Group
   ================================ */

.input-group {
    margin-bottom: 2rem;
}

.text-input {
    width: 100%;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all var(--transition-base);
}

.text-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0, 217, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.text-input::placeholder {
    color: var(--text-tertiary);
}

.input-meta {
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-align: right;
}

/* ================================
   Controls Grid
   ================================ */

.controls-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .controls-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================
   Speed Control
   ================================ */

.speed-control {
    margin-bottom: 2rem;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.speed-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.speed-buttons {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.speed-btn {
    flex: 1;
    padding: var(--space-md);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.speed-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.speed-btn.active {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border-color: transparent;
}

.speed-slider-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.speed-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.speed-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 217, 255, 0.4);
}

.speed-value {
    min-width: 50px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ================================
   Waveform Visualization
   ================================ */

.waveform-container {
    height: 120px;
    margin-bottom: 2rem;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
}

.waveform {
    width: 100%;
    height: 100%;
    display: block;
}

/* ================================
   Progress Bar
   ================================ */

.progress-bar-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: var(--space-sm);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* ================================
   Quick Actions
   ================================ */

.quick-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.quick-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* ================================
   Benefits Section
   ================================ */

.benefits-section {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 217, 255, 0.05) 100%);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    background: var(--glass-bg);
    border-color: var(--accent-cyan);
}

.benefit-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(168, 85, 247, 0.1));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.benefit-card svg {
    width: 32px;
    height: 32px;
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.benefit-card p {
    font-size: 0.95rem;
    margin: 0;
}

/* ================================
   Features Section
   ================================ */

.features-section {
    padding: 4rem 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
    flex: 1;
}

.feature-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    opacity: 0.2;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

/* ================================
   History Section
   ================================ */

.history-section {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.05) 0%, transparent 100%);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.history-panel {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.history-panel .panel-header {
    margin: 0 0 var(--space-lg) 0;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.history-panel h3 {
    margin: 0;
    font-size: 1.25rem;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.history-item {
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
    group: 1;
}

.history-item:hover {
    background: rgba(0, 217, 255, 0.05);
    border-color: var(--accent-cyan);
    transform: translateX(4px);
}

.history-item-text {
    flex: 1;
    word-break: break-word;
    font-size: 0.95rem;
}

.history-item-actions {
    display: flex;
    gap: var(--space-sm);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.history-item:hover .history-item-actions {
    opacity: 1;
}

.history-item-actions button {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-lg);
}

/* ================================
   Footer
   ================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-lighter);
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.footer-logo {
    margin-top: 0.5rem;
}

.footer-logo svg {
    width: 40px;
    height: 40px;
}

.footer-brand h4 {
    margin: 0 0 var(--space-sm) 0;
    font-size: 1.1rem;
}

.footer-brand p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-meta p {
    margin: 0;
    font-size: 0.9rem;
}

.copyright {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-divider {
    height: 1px;
    background: var(--border-lighter);
    margin-bottom: 2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-lighter);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* ================================
   Toast Notification
   ================================ */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all var(--transition-base);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .pronounce-section {
        padding: 2rem 1rem;
    }

    .pronounce-panel {
        padding: 1.5rem;
    }

    .nav-menu {
        gap: var(--space-lg);
    }

    .benefits-grid,
    .features-grid,
    .history-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
    }
    
    .speed-slider-group {
        flex-direction: column;
    }
    
    .speed-slider {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .text-input {
        padding: 0.75rem;
        font-size: 16px;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .waveform-container {
        height: 80px;
        padding: var(--space-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 2.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero {
        min-height: auto;
        padding: 3rem 1rem;
    }

    .hero-icon {
        width: 80px;
        height: 80px;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-menu {
        gap: var(--space-lg);
    }

    .controls-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .speed-buttons {
        flex-direction: column;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-icon {
        width: 42px;
        height: 42px;
    }
    
    .pronounce-panel {
        padding: 1rem;
    }
    
    .control-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .text-input {
        padding: 0.75rem;
        font-size: 16px;
        min-height: 120px;
    }
    
    .speed-control {
        padding: 1rem;
    }
    
    .speed-label {
        font-size: 0.85rem;
    }
    
    .speed-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* ================================
   Accessibility
   ================================ */

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: more) {
    .glass {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }
}

/* ================================
   Print Styles
   ================================ */

@media print {
    body {
        background: white;
        color: black;
    }

    .navbar,
    .footer,
    .toast,
    .btn-icon {
        display: none;
    }
}