* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-card: #1e1e1e;
    --bg-player: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6b7280;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.1);
    --border: #333;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-card: #f9fafb;
    --bg-player: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.1);
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
    /* Enable hardware acceleration for smooth scrolling */
    -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Universal button optimization for smooth interactions */
button {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    cursor: pointer;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for mobile */
    .episode-card {
        min-height: 120px;
    }
    
    .filter-tab {
        min-height: 44px;
    }
    
    .control-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .episode-card:hover,
    .filter-tab:hover,
    .theme-toggle:hover {
        transform: none;
    }
    
    /* Active states for touch feedback */
    .episode-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .filter-tab:active {
        transform: scale(0.96);
    }
    
    .theme-toggle:active {
        transform: scale(0.9);
    }
}

/* iPad and tablet landscape optimizations (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .recent-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .mini-player {
        height: 70px;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 120px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga', 'kern';
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
    /* Optimize for 60fps animations */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Smooth theme transitions for major elements */
.episode-card,
.filter-tab,
.mini-player,
.theme-toggle,
.notification {
    transition: background-color var(--transition-base), 
                border-color var(--transition-base), 
                color var(--transition-base);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: fadeIn var(--transition-slow);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 50px;
    animation: slideDown var(--transition-slow);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6, #fbbf24);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
    letter-spacing: -0.03em;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

header p {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

header p {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
}

.filter-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    animation: fadeIn var(--transition-slow) 200ms;
}

.filter-tab {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform var(--transition-fast), 
                background var(--transition-base),
                border-color var(--transition-base),
                box-shadow var(--transition-base);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    backface-visibility: hidden;
}

.filter-tab:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.filter-tab:active {
    transform: translateY(0) scale(0.96);
    transition-duration: 50ms;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Load More Button */
.load-more-btn {
    grid-column: 1 / -1;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 1rem;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, #2a2a2a 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: 12px;
    /* Optimize skeleton animation */
    will-change: background-position;
    transform: translateZ(0);
}

@keyframes shimmer {
    0% { 
        background-position: 200% 0; 
    }
    100% { 
        background-position: -200% 0; 
    }
}

.skeleton-card {
    height: 160px;
    padding: 24px;
}

.skeleton-text {
    height: 20px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.long {
    width: 90%;
}

.episode-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: transform var(--transition-base), 
                box-shadow var(--transition-base), 
                border-color var(--transition-base),
                background var(--transition-base);
    position: relative;
    overflow: hidden;
    /* GPU acceleration for smoother animations */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.episode-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.episode-card:active {
    transform: translateY(-2px) scale(0.98);
    transition-duration: 50ms;
}

.episode-card .episode-number {
    font-size: 14px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.episode-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.episode-card:hover h3 {
    color: var(--accent);
}

.episode-card .level-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all var(--transition-fast);
}

.episode-card:hover .level-badge {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Search Container */
.search-container {
    margin: 30px 0;
    animation: fadeIn var(--transition-base);
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--text-tertiary);
    border: none;
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.search-clear:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.search-clear:active {
    transform: translateY(-50%) scale(0.95);
}

.search-results-info {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.search-results-info .highlight {
    color: var(--accent);
    font-weight: 600;
}

/* Recently Played Section */
/* Mini Player */
.mini-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-player);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 10000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.mini-player.show {
    transform: translateY(0);
}

.mini-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.mini-player-info:hover {
    background: rgba(99, 102, 241, 0.1);
}

.mini-player-info:active {
    background: rgba(99, 102, 241, 0.2);
}

.mini-episode-number {
    font-size: 14px;
    color: var(--accent);
    font-weight: 700;
    min-width: 40px;
}

.mini-episode-details {
    flex: 1;
    overflow: hidden;
}

.mini-episode-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-episode-level {
    font-size: 12px;
    color: var(--text-secondary);
}

.mini-player-controls {
    display: flex;
    gap: 8px;
}

.mini-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    line-height: 0;
    padding: 0;
}

.mini-control-btn svg {
    display: block;
    margin: auto;
}

.mini-control-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.mini-control-btn:active {
    transform: scale(0.95);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--transition-base);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.theme-toggle:active {
    transform: scale(0.95) rotate(0deg);
}

/* Full dialogue container */
.full-dialogue .dialogue-line {
    margin-bottom: 12px;
}

.full-dialogue .speaker-badge {
    display: inline-block;
}

.full-dialogue .dialogue-text {
    margin-top: 8px;
    font-size: 15px;
}

.episode-detail {
    max-width: 900px;
    margin: 0 auto 40px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    position: relative;
    animation: scaleIn var(--transition-base);
    box-shadow: var(--shadow-xl);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-base);
    font-weight: 500;
}

.close-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.close-btn:active {
    transform: scale(0.98);
}

.detail-header {
    margin-bottom: 30px;
}

.detail-level {
    display: inline-block;
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.detail-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.tabs-section {
    margin-bottom: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tabs {
    display: flex;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border-bottom: 2px solid transparent;
    position: relative;
    z-index: 1;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--accent-light);
}

.tab-btn.active {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.tab-btn.active::after {
    transform: scaleX(1);
    box-shadow: 0 0 10px var(--accent);
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

.show-btn {
    padding: 10px 20px;
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-base);
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.show-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.show-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.content-area {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    max-height: 600px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar */
.content-area::-webkit-scrollbar {
    width: 8px;
}

.content-area::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.transcript-content h2 {
    font-size: 20px;
    margin: 24px 0 16px;
    color: var(--text-primary);
}

.dialogue-line {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 12px;
    transition: all var(--transition-base);
    animation: slideInLeft var(--transition-base);
    animation-fill-mode: both;
    border: 1px solid transparent;
}

.dialogue-line:nth-child(odd) {
    animation-delay: 50ms;
}

.dialogue-line:nth-child(even) {
    animation-delay: 100ms;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.speaker-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
    letter-spacing: 0.5px;
}

.dialogue-line:hover .speaker-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.speaker-badge.speaker-a {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4), 0 0 20px rgba(251, 191, 36, 0.2);
}

.speaker-badge.speaker-b {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4), 0 0 20px rgba(16, 185, 129, 0.2);
}

.dialogue-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 15px;
}

.dialogue-line:hover {
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Speaker A - Yellow/Amber theme */
.speaker-a .dialogue-line,
.dialogue-line:has(.speaker-badge.speaker-a) {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.05));
    border-color: rgba(251, 191, 36, 0.2);
}

.dialogue-line:has(.speaker-badge.speaker-a):hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.08));
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.15);
}

/* Speaker B - Green/Cyan theme */
.speaker-b .dialogue-line,
.dialogue-line:has(.speaker-badge.speaker-b) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
    border-color: rgba(16, 185, 129, 0.2);
}

.dialogue-line:has(.speaker-badge.speaker-b):hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.vocab-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vocab-section:first-child {
    margin-top: 0;
}

.vocab-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

.vocab-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.vocab-table tr {
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.vocab-table tr:last-child {
    border-bottom: none;
}

.vocab-table tr:hover {
    background: var(--accent-light);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.vocab-table td {
    padding: 16px 12px;
    vertical-align: top;
    transition: color var(--transition-fast);
}

.vocab-word {
    color: #10b981;
    font-weight: 700;
    font-size: 16px;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speak-btn {
    background: transparent;
    border: none;
    color: #10b981;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.speak-btn:hover {
    opacity: 1;
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.1);
}

.speak-btn:active {
    transform: scale(0.95);
}

.practice-vocab-btn {
    background: transparent;
    border: none;
    color: #6366f1;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.practice-vocab-btn:hover {
    opacity: 1;
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.1);
}

.practice-vocab-btn:active {
    transform: scale(0.95);
}

.vocab-table tr:hover .practice-vocab-btn {
    opacity: 0.8;
    color: #818cf8;
}

.vocab-table tr:hover .speak-btn {
    opacity: 0.8;
}

.vocab-table tr:hover .vocab-word {
    color: #34d399;
}

.vocab-table tr:hover .speak-btn {
    color: #34d399;
}

.vocab-type {
    color: var(--text-tertiary);
    font-style: italic;
    font-size: 14px;
    min-width: 100px;
}

.vocab-def {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
}

.audio-section {
    margin-top: 20px;
    background: var(--bg-player);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.custom-player {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.time-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 90px;
}

.time-display .separator {
    color: var(--text-tertiary);
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Volume Control */
.volume-control {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
    align-items: center;
    animation: slideUpFade 0.2s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.volume-slider input[type="range"] {
    writing-mode: vertical-lr;
    direction: rtl;
    height: 100px;
    width: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Filled track effect */
.volume-slider input[type="range"]::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--volume-percent, 100%);
    background: linear-gradient(to top, 
        #6366f1 0%,
        #8b5cf6 50%,
        #a78bfa 100%);
    border-radius: 3px;
    pointer-events: none;
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #6366f1 100%);
    border-radius: 50%;
    cursor: grab;
    transition: all var(--transition-fast);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.5),
                0 0 0 4px rgba(99, 102, 241, 0.15),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
    position: relative;
    z-index: 10;
}

.volume-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.7),
                0 0 0 5px rgba(99, 102, 241, 0.2),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.6),
                0 0 0 3px rgba(99, 102, 241, 0.3);
}

.volume-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #6366f1 100%);
    border-radius: 50%;
    cursor: grab;
    border: 3px solid white;
    transition: all var(--transition-fast);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.5),
                0 0 0 4px rgba(99, 102, 241, 0.15),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.7),
                0 0 0 5px rgba(99, 102, 241, 0.2),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider input[type="range"]::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.volume-percentage {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 36px;
    text-align: center;
    opacity: 0.8;
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
    line-height: 0;
}

.control-btn svg {
    display: block;
    margin: auto;
}

.control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform var(--transition-base);
}

.control-btn:hover::before {
    transform: scale(1);
}

.control-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.play-btn {
    background: var(--accent);
    width: 48px;
    height: 48px;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    position: relative;
    padding: 0;
}

.control-btn.play-btn svg {
    width: 24px;
    height: 24px;
}

.control-btn.play-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.control-btn.play-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.control-btn.play-btn:active {
    transform: scale(1.05);
}

.loading-spinner {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.control-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.control-btn#speedBtn {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
}

.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-player);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.player-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.player-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.player-info .level-badge {
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

audio {
    width: 100%;
    height: 40px;
    outline: none;
}

audio::-webkit-media-controls-panel {
    background-color: var(--bg-card);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Responsive Design */

/* Tablet landscape (1024px - 1400px) */
@media (max-width: 1400px) {
    .container {
        max-width: 100%;
        padding: 30px 20px;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Tablet portrait (768px - 1024px) */
@media (max-width: 1024px) {
    header h1 {
        font-size: 48px;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .episode-detail {
        padding: 24px;
    }
    
    .filter-tabs {
        gap: 10px;
    }
    
    .filter-tab {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Mobile landscape & small tablets (600px - 768px) */
@media (max-width: 768px) {
    header h1 {
        font-size: 36px;
    }
    
    header p {
        font-size: 16px;
    }
    
    .container {
        padding: 20px 16px;
    }
    
    /* Mini Player responsive - Tablet */
    .mini-player {
        height: 70px;
        padding: 0 16px;
        padding-bottom: max(env(safe-area-inset-bottom), 8px);
    }
    
    .mini-episode-title {
        font-size: 13px;
    }
    
    .mini-episode-level {
        font-size: 11px;
    }
    
    .mini-player-controls {
        gap: 8px;
    }
    
    .mini-control-btn {
        width: 44px; /* Touch target minimum */
        height: 44px;
        flex-shrink: 0;
    }
    
    .mini-control-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Theme toggle responsive */
    .theme-toggle {
        width: 44px;
        height: 44px;
        top: 16px;
        right: 16px;
        font-size: 20px;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .episode-card {
        padding: 16px;
    }
    
    .episode-card h3 {
        font-size: 16px;
    }
    
    .filter-tabs {
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .filter-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .episode-detail {
        padding: 20px;
    }
    
    .detail-header h2 {
        font-size: 24px;
    }
    
    .tabs {
        flex-direction: row;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Progress Bar Tablet - Medium touch target */
    .progress-bar {
        height: 8px;
        border-radius: 4px;
    }
    
    .progress-filled {
        border-radius: 4px;
    }
    
    .controls {
        gap: 12px;
    }
    
    .control-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }
    
    .control-btn.play-btn {
        width: 56px;
        height: 56px;
    }
    
    .control-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* Mobile portrait (< 600px) */
@media (max-width: 600px) {
    header h1 {
        font-size: 28px;
    }
    
    header p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    body {
        padding-bottom: 90px;
    }
    
    .container {
        padding: 16px 12px;
    }
    
    .episodes-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Search mobile */
    .search-container {
        margin: 20px 0;
    }
    
    .search-input {
        padding: 12px 40px 12px 40px;
        font-size: 14px;
    }
    
    .search-results-info {
        font-size: 13px;
        margin-top: 8px;
    }
    
    /* Mini Player mobile - Optimized for touch */
    .mini-player {
        height: 70px; /* Giữ nguyên height cho không bị chật */
        padding: 0 12px;
        padding-bottom: max(env(safe-area-inset-bottom), 8px); /* iOS notch support */
    }
    
    .mini-episode-number {
        font-size: 12px;
        min-width: 32px;
    }
    
    .mini-episode-title {
        font-size: 13px;
    }
    
    .mini-episode-level {
        font-size: 11px;
    }
    
    .mini-player-controls {
        gap: 6px;
    }
    
    .mini-control-btn {
        width: 44px; /* Touch target minimum 44×44 */
        height: 44px;
        flex-shrink: 0; /* Không bị shrink */
    }
    
    .mini-control-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Theme toggle mobile */
    .theme-toggle {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
        font-size: 18px;
    }
    
    .episode-card {
        padding: 16px;
    }
    
    .filter-tabs {
        gap: 6px;
        margin-bottom: 20px;
    }
    
    .filter-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .episode-detail {
        padding: 16px;
        border-radius: 8px;
    }
    
    .close-btn {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .detail-header h2 {
        font-size: 20px;
        margin-top: 8px;
    }
    
    .tabs {
        border-radius: 6px 6px 0 0;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .tab-content {
        padding: 12px;
    }
    
    .show-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .dialogue-line {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .speaker-badge {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .dialogue-text {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .vocab-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .vocab-word {
        font-size: 14px;
        min-width: 80px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .speak-btn {
        padding: 3px;
    }
    
    .speak-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .vocab-type {
        font-size: 12px;
        min-width: 120px;
    }
    
    .vocab-def {
        font-size: 13px;
    }
    
    .audio-section {
        padding: 12px;
    }
    
    /* Progress Bar Mobile - Larger touch target */
    .progress-container {
        margin: 16px 0;
    }
    
    .progress-bar {
        height: 10px; /* Taller for easier touch */
        border-radius: 5px;
        cursor: pointer;
        position: relative;
        padding: 8px 0; /* Expand touch area */
        margin: -8px 0; /* Offset padding */
    }
    
    .progress-bar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: transparent;
    }
    
    .progress-filled {
        border-radius: 5px;
    }
    
    .controls {
        gap: 12px;
    }
    
    .controls-left,
    .controls-right {
        gap: 6px;
    }
    
    .control-btn {
        padding: 8px; /* Larger touch target */
        min-width: 44px; /* Apple/Android minimum */
        min-height: 44px;
    }
    
    .control-btn.play-btn {
        width: 56px;
        height: 56px;
    }
    
    .control-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .control-btn.play-btn svg {
        width: 30px;
        height: 30px;
    }
    
    .time-display {
        font-size: 12px;
        min-width: 80px;
    }
}

/* Very small devices (< 380px) */
@media (max-width: 380px) {
    header h1 {
        font-size: 24px;
    }
    
    .filter-tab {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    /* Progress Bar - Even larger on very small screens */
    .progress-bar {
        height: 12px;
        border-radius: 6px;
    }
    
    .progress-filled {
        border-radius: 6px;
    }
    
    .controls {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .controls-left,
    .controls-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .control-btn {
        min-width: 48px;
        min-height: 48px;
    }
    
    .time-display {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    /* Mini Player - Very small screens */
    .mini-player {
        height: 75px; /* Cao hơn 1 chút để chứa buttons lớn */
        padding: 0 8px;
    }
    
    .mini-episode-number {
        font-size: 11px;
        min-width: 28px;
    }
    
    .mini-episode-title {
        font-size: 12px;
    }
    
    .mini-episode-level {
        font-size: 10px;
    }
    
    .mini-player-controls {
        gap: 4px;
    }
    
    .mini-control-btn {
        width: 46px; /* Slightly larger for easier touch */
        height: 46px;
    }
}

/* Repeat Button States */
.repeatBtn.setting {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    animation: pulse 1.5s ease-in-out infinite;
}

.repeatBtn.active {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
}

/* Repeat Markers on Progress Bar */
.repeat-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 3;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.repeat-start {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
}

.repeat-end {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.repeat-region {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(81, 207, 102, 0.2);
    z-index: 2;
    pointer-events: none;
}

/* Notification Toast */
.notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border);
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: notificationPulse 0.4s ease-out;
}

@keyframes notificationPulse {
    0% {
        transform: translateX(-50%) translateY(0) scale(0.9);
    }
    50% {
        transform: translateX(-50%) translateY(0) scale(1.02);
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Pronunciation Practice Styles */
.practice-container {
    padding: 20px;
}

.practice-header {
    text-align: center;
    margin-bottom: 20px;
}

.practice-header h3 {
    font-size: 22px;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.practice-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.practice-mode-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.mode-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    color: white;
    border-color: var(--accent);
}

.role-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.role-selector p {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.role-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.role-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: scale(1.05);
}

.role-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
}

.roleplay-context {
    padding: 10px;
}

.your-turn {
    color: #10b981;
    font-size: 16px;
    font-weight: 600;
    margin: 15px 0 10px 0;
}

.practice-text {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 80px;
    border: 2px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
}

.full-dialogue p {
    margin: 12px 0;
    line-height: 1.6;
}

.practice-quote {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    font-style: italic;
}

.practice-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.practice-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.practice-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.practice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.practice-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 1.5s ease-in-out infinite;
}

.recording-status {
    text-align: center;
    min-height: 24px;
    font-size: 14px;
    margin-bottom: 20px;
}

.pronunciation-score {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--accent);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.score-feedback {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

.dialogue-line {
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialogue-line:hover {
    transform: translateX(4px);
    opacity: 0.8;
}

@media (max-width: 600px) {
    .notification {
        bottom: 80px;
        font-size: 13px;
        padding: 10px 20px;
    }
    
    .practice-mode-selector {
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .role-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .role-btn {
        width: 100%;
    }
    
    .practice-controls {
        flex-direction: column;
    }
    
    .practice-btn {
        width: 100%;
        justify-content: center;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 40px;
    }
    
    .vocab-word {
        gap: 6px;
    }
    
    .practice-vocab-btn {
        padding: 3px;
    }
}

.full-dialogue {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 80px;
    border: 2px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
}

.full-dialogue p {
    margin: 12px 0;
    line-height: 1.6;
}

.practice-quote {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    font-style: italic;
}

.practice-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.practice-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.practice-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.practice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.practice-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 1.5s ease-in-out infinite;
}

.recording-status {
    text-align: center;
    min-height: 24px;
    font-size: 14px;
    margin-bottom: 20px;
}

.pronunciation-score {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--accent);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.score-feedback {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

.dialogue-line {
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialogue-line:hover {
    transform: translateX(4px);
    opacity: 0.8;
}

@media (max-width: 600px) {
    .notification {
        bottom: 80px;
        font-size: 13px;
        padding: 10px 20px;
    }
    
    .practice-mode-selector {
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .role-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .role-btn {
        width: 100%;
    }
    
    .practice-controls {
        flex-direction: column;
    }
    
    .practice-btn {
        width: 100%;
        justify-content: center;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 40px;
    }
    
    .vocab-word {
        gap: 6px;
    }
    
    .practice-vocab-btn {
        padding: 3px;
    }
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.score-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.score-feedback {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

.dialogue-line {
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialogue-line:hover {
    transform: translateX(4px);
    opacity: 0.8;
}

@media (max-width: 600px) {
    .notification {
        bottom: 80px;
        font-size: 13px;
        padding: 10px 20px;
    }
    
    .practice-mode-selector {
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .role-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .role-btn {
        width: 100%;
    }
    
    .practice-controls {
        flex-direction: column;
    }
    
    .practice-btn {
        width: 100%;
        justify-content: center;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 40px;
    }
    
    .vocab-word {
        gap: 6px;
    }
    
    .practice-vocab-btn {
        padding: 3px;
    }
}


