/* YurCash Academy - Netflix Style */

:root {
    --bg-primary: #141414;
    --bg-secondary: #1f1f1f;
    --bg-card: #181818;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --accent: #e50914;
    --accent-hover: #f40612;
    --success: #46d369;
    --border: #333333;
}

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

body {
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--text-primary);
    text-decoration: none;
}

/* ============== HEADER ============== */
.header {
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.header.scrolled {
    background: var(--bg-primary);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    color: var(--text-secondary);
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* ============== MAIN CONTENT ============== */
.main {
    padding-top: 100px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* ============== COURSE GRID ============== */
.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.course-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.course-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 10;
}

.course-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-info {
    padding: 16px;
}

.course-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.course-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.course-progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============== COURSE PAGE ============== */
.course-header {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
}

.course-header h1 {
    font-size: 36px;
    margin-bottom: 12px;
}

.course-header p {
    color: var(--text-secondary);
    max-width: 600px;
}

.module {
    margin-bottom: 30px;
}

.module-title {
    font-size: 18px;
    font-weight: 600;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    transition: background 0.2s;
}

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

.lesson-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.lesson-status.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.lesson-status.current {
    border-color: var(--accent);
    color: var(--accent);
}

.lesson-info {
    flex: 1;
}

.lesson-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.lesson-duration {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============== VIDEO PLAYER PAGE ============== */
.watch-page {
    display: flex;
    height: 100vh;
    padding-top: 60px;
}

.player-container {
    flex: 1;
    background: #000;
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-wrapper video {
    width: 100%;
    max-height: 100%;
}

.player-controls {
    padding: 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.progress-bar {
    height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 15px;
    position: relative;
}

.progress-bar:hover {
    height: 7px;
}

.progress-played {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    position: relative;
}

.progress-played::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-bar:hover .progress-played::after {
    opacity: 1;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.1);
}

.time-display {
    font-size: 14px;
    color: var(--text-secondary);
}

.speed-select {
    background: transparent;
    color: white;
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.volume-slider {
    width: 80px;
    accent-color: var(--accent);
}

/* Sidebar */
.sidebar {
    width: 400px;
    background: var(--bg-secondary);
    overflow-y: auto;
    border-left: 1px solid var(--border);
}

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

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.sidebar-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.sidebar-lesson {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.sidebar-lesson:hover {
    background: var(--bg-hover);
}

.sidebar-lesson.active {
    background: rgba(229, 9, 20, 0.2);
    border-left: 3px solid var(--accent);
}

/* ============== LOGIN PAGE ============== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.login-box {
    background: rgba(0,0,0,0.75);
    padding: 60px 68px;
    border-radius: 4px;
    width: 100%;
    max-width: 450px;
}

.login-box h1 {
    font-size: 32px;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 16px;
    background: #333;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
}

.form-input:focus {
    outline: none;
    background: #454545;
}

.form-input::placeholder {
    color: #8c8c8c;
}

.error-message {
    background: #e87c03;
    color: white;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
}

.login-btn:hover {
    background: var(--accent-hover);
}

/* ============== ADMIN ============== */
.admin-page {
    padding-top: 80px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-section {
    margin-bottom: 40px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    color: var(--text-secondary);
    font-weight: 500;
}

.admin-form {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.admin-form h3 {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row .form-input {
    flex: 1;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
    .header {
        padding: 15px 30px;
    }

    .container {
        padding: 0 30px;
    }

    .sidebar {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 20px;
    }

    .container {
        padding: 0 20px;
    }

    .course-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .watch-page {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 300px;
    }

    .login-box {
        padding: 40px 30px;
        margin: 20px;
    }
}
