:root {
    --bg-deep: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --slide-bg: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.main-container {
    width: 96%;
    max-width: 1600px;
    margin: 20px auto;
}

/* Header Styling */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.course-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.course-brand i {
    color: var(--accent-primary);
    -webkit-text-fill-color: initial;
}

.lecture-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

.course-info {
    color: var(--accent-primary);
}

/* Layout Grid */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

@media (max-width: 1200px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
}

/* Player Screen */
.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Presentation Slide Stage */
.slide-stage {
    flex: 1;
    background: var(--slide-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

/* Dynamic Content Animations */
.slide-content {
    width: 100%;
    max-width: 1000px;
    text-align: left;
}

.slide-up {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staggered List Items */
.stagger-item {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInRight 0.5s ease forwards;
}

@keyframes fadeInRight {
    to { opacity: 1; transform: translateX(0); }
}

/* Typography on Slides */
.slide-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.1;
    background: linear-gradient(to bottom right, #fff, #64748b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-content h2 {
    font-size: 2.2rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 20px;
    opacity: 0.9;
}

.slide-content ul, .slide-content ol {
    margin-top: 30px;
    list-style: none;
}

.slide-content li {
    font-size: 1.3rem;
    margin: 15px 0;
    padding-left: 35px;
    position: relative;
    color: var(--text-main);
}

.slide-content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 12px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 2px;
}

/* Karaoke Subtitles Styling */
.subtitle-overlay {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 10;
}

.subtitle-wrapper {
    display: flex;
    white-space: nowrap;
    padding: 0 50%;
    transition: transform 0.15s linear;
}

.word {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0 10px;
    opacity: 0.3;
    transition: all 0.2s ease;
    color: #fff;
}

.word.highlight {
    opacity: 1;
    color: var(--accent-primary);
    transform: scale(1.15);
}

.word.read {
    opacity: 0.6;
}

/* Controls Styling */
.controls-container {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 25px;
    border-top: 1px solid var(--glass-border);
}

.progress-bar-wrapper {
    padding: 10px 0;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    border-radius: 10px;
    position: relative;
}

.progress-knob {
    position: absolute;
    right: -8px;
    top: -5px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-container:hover .progress-knob {
    opacity: 1;
}

.controls-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.time-display {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: -0.5px;
}

.speed-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* Sidebar Playlist */
.playlist-sidebar {
    background: var(--panel-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 25px;
    border-bottom: 1px solid var(--glass-border);
}

.progress-stats {
    margin-top: 15px;
}

#completion-status {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.mini-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

#mini-progress-bar {
    height: 100%;
    background: var(--accent-primary);
    width: 0%;
    transition: width 0.3s ease;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.item-index {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.playlist-item.active .item-index {
    background: var(--accent-primary);
    color: #000;
    font-weight: 700;
}

.item-info {
    flex: 1;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.playlist-item.active .item-title {
    color: var(--accent-primary);
}

/* Lecture Details */
.lecture-details {
    margin-top: 30px;
    padding: 30px;
    background: var(--panel-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badge {
    padding: 4px 10px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-primary);
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Welcome Screen Large Btn */
.play-btn-large {
    width: 100px;
    height: 100px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #000;
    margin-bottom: 25px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-btn-large:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.6);
}

/* Fullscreen Adjustments */
#video-player:fullscreen {
    border-radius: 0;
}

#video-player:fullscreen .slide-stage {
    padding: 100px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
