/* Premium Styles for Volume 1 - Ultra Premium UI */

/* Glassmorphism Effect */
.glass-morphism {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Premium Lesson Cards */
.premium-lesson-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.premium-lesson-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(220, 38, 38, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-lesson-card:hover::before {
    opacity: 1;
}

.premium-lesson-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px -15px rgba(220, 38, 38, 0.3),
        0 0 0 1px rgba(220, 38, 38, 0.1);
}

/* Premium Status Badges */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.premium-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.premium-badge:hover::after {
    left: 100%;
}

.premium-badge.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.premium-badge.in-progress {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.premium-badge.locked {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #6b7280;
}

/* Premium Buttons */
.premium-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    overflow: hidden;
}

.premium-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.4s ease;
}

.premium-button:hover::before {
    left: 100%;
}

.premium-button.primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.premium-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.5);
}

/* Premium Modal */
.premium-modal {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.premium-modal-content {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Premium Lesson Header */
.premium-lesson-header {
    background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.premium-lesson-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Premium Tabs */
.premium-tab {
    position: relative;
    padding: 1rem 2rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    cursor: pointer;
}

.premium-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.premium-tab:hover {
    color: #dc2626;
}

.premium-tab.active {
    color: #dc2626;
}

.premium-tab.active::after {
    width: 80%;
}

/* Premium Progress Bar */
.premium-progress-container {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    padding: 4px;
    position: relative;
    overflow: hidden;
}

.premium-progress-bar {
    height: 16px;
    border-radius: 50px;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #dc2626 100%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    position: relative;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.premium-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Premium Vocabulary Cards */
.premium-vocab-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.premium-vocab-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px -10px rgba(251, 191, 36, 0.3);
}

.premium-vocab-card .word-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.premium-vocab-card .pronunciation-guide {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-family: monospace;
    display: inline-block;
    margin: 0.5rem 0;
}

/* Audio Button Premium */
.premium-audio-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.premium-audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.premium-audio-btn.playing::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: audioWave 1.5s ease-out infinite;
    transform: translate(-50%, -50%);
}

@keyframes audioWave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Premium Quiz Elements */
.premium-quiz-question {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.premium-quiz-question.correct {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
}

.premium-quiz-question.incorrect {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

.premium-quiz-option {
    background: white;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.premium-quiz-option:hover {
    border-color: #dc2626;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.1);
}

.premium-quiz-option.selected {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

/* Premium Achievement Modal */
.premium-achievement {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 30px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(251, 191, 36, 0.5);
}

.premium-achievement::before {
    content: '⭐';
    position: absolute;
    font-size: 200px;
    opacity: 0.1;
    top: -50px;
    right: -50px;
    animation: rotate 20s linear infinite;
}

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

/* Premium Loading States */
.premium-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 15px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Volume Section Header */
.volume-header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 3rem;
    border-radius: 30px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.volume-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}

.volume-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.volume-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Floating Elements */
.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #dc2626 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Premium Tooltip */
.premium-tooltip {
    position: relative;
}

.premium-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════
   TTS (Text-to-Speech) Buttons
   ═══════════════════════════════════════ */
.tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.08);
    color: #DC2626;
    transition: all 0.25s ease;
    flex-shrink: 0;
    position: relative;
}
.tts-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    transform: scale(1.1);
}
.tts-btn:active {
    transform: scale(0.95);
}

.tts-btn-sm {
    width: 32px;
    height: 32px;
    padding: 6px;
}
.tts-btn-lg {
    width: 40px;
    height: 40px;
    padding: 8px;
}

.tts-icon {
    width: 100%;
    height: 100%;
}

.tts-playing {
    background: rgba(220, 38, 38, 0.18);
    animation: tts-pulse 1s ease-in-out infinite;
}

@keyframes tts-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

.tts-speak-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tts-speak-row .tts-btn {
    background: rgba(220, 38, 38, 0.06);
}

.tts-msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(220, 38, 38, 0.15);
    background: rgba(220, 38, 38, 0.04);
    color: #DC2626;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tts-msg-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}
.tts-msg-btn svg {
    width: 14px;
    height: 14px;
}
.tts-msg-btn.tts-playing {
    background: rgba(220, 38, 38, 0.12);
    animation: tts-pulse 1s ease-in-out infinite;
}

/* Class Audio Introduction Button */
.class-audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    border: 1.5px solid rgba(220, 38, 38, 0.2);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.06) 0%, rgba(220, 38, 38, 0.02) 100%);
    color: #DC2626;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.class-audio-btn:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(220, 38, 38, 0.06) 100%);
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}
.class-audio-btn.tts-playing {
    background: rgba(220, 38, 38, 0.1);
    border-color: #DC2626;
    animation: tts-pulse 1s ease-in-out infinite;
}
.class-audio-btn svg {
    flex-shrink: 0;
}

/* Inline TTS in theory content */
.tts-inline {
    display: inline-flex;
    vertical-align: middle;
    margin: 0 2px;
}
.tts-inline .tts-btn {
    vertical-align: middle;
}

.vowel-list li {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    padding: 0.375rem 0;
}

/* ═══════════════════════════════════════
   INTERACTIVE ENGLISH PHRASES (AI Tutor)
   ═══════════════════════════════════════ */
.en-phrase {
    display: inline;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.12));
    border-radius: 4px;
    padding: 1px 4px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.3);
    white-space: normal;
}
.en-word {
    cursor: pointer;
    color: #1d4ed8;
    font-weight: 600;
    border-radius: 2px;
    padding: 0 1px;
    transition: background 0.15s, color 0.15s;
}
.en-word:hover {
    background: rgba(37, 99, 235, 0.18);
    color: #1e40af;
}
.en-word:active {
    background: rgba(37, 99, 235, 0.3);
}
.en-phrase-speak {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 3px;
    padding: 0;
    border: none;
    background: rgba(37, 99, 235, 0.12);
    border-radius: 50%;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
}
.en-phrase-speak svg {
    width: 11px;
    height: 11px;
    color: #2563eb;
}
.en-phrase-speak:hover {
    background: rgba(37, 99, 235, 0.25);
    transform: scale(1.15);
}
.en-phrase-speak:active {
    background: rgba(37, 99, 235, 0.35);
}
.en-phrase-speak.tts-playing {
    background: rgba(220, 38, 38, 0.15);
    animation: tts-pulse 1s ease-in-out infinite;
}
.en-phrase-speak.tts-playing svg {
    color: #dc2626;
}

/* ═══════════════════════════════════════
   TTS FLOATING PLAYER BAR
   ═══════════════════════════════════════ */
.tts-player {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 9999;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 1.25rem;
    box-shadow: 0 12px 48px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    max-width: calc(100vw - 2rem);
    width: auto;
}
.tts-player.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .tts-player { bottom: 24px; }
}

.tts-player-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}
.tts-player-btn:hover {
    background: rgba(220,38,38,0.08);
    color: #DC2626;
}
.tts-player-btn:active {
    transform: scale(0.9);
}
.tts-player-btn svg {
    width: 18px;
    height: 18px;
}

.tts-player-btn-primary {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}
.tts-player-btn-primary:hover {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 6px 16px rgba(220,38,38,0.4);
    transform: scale(1.05);
}
.tts-player-btn-primary svg {
    width: 20px;
    height: 20px;
}

.tts-player-divider {
    width: 1px;
    height: 24px;
    background: rgba(0,0,0,0.08);
    margin: 0 0.125rem;
    flex-shrink: 0;
}

.tts-speed-btn {
    min-width: 42px;
    height: 30px;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.02);
    color: #374151;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 0.375rem;
    flex-shrink: 0;
}
.tts-speed-btn:hover {
    background: rgba(220,38,38,0.06);
    border-color: rgba(220,38,38,0.3);
    color: #DC2626;
}

.tts-player-label {
    font-size: 11px;
    color: rgba(0,0,0,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    flex-shrink: 1;
    min-width: 0;
}

.tts-player-progress {
    flex: 1;
    min-width: 40px;
    max-width: 100px;
    height: 3px;
    background: rgba(0,0,0,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.tts-player-progress-fill {
    height: 100%;
    background: #DC2626;
    border-radius: 2px;
    transition: width 0.3s linear;
    width: 0%;
}