/* ============================================
   EtD-TV Python - Clean Minimal CSS
   ============================================ */

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #181818;
    --text-primary: #ffffff;
    --text-secondary: #a7a7a7;
    --accent: #e50914;
    --accent-hover: #ff1f2d;
    --border: #282828;
    --radius: 8px;
    --transition: 0.2s ease;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border: #e0e0e0;
}

body {
    font-family: 'Poppins', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo img {
    display: block;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.main-nav a:hover {
    color: var(--text-primary);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
}

[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: inline; }
[data-theme="light"] .theme-toggle .sun { display: inline; }
[data-theme="light"] .theme-toggle .moon { display: none; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.site-main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* ============================================
   VIDEO GRID
   ============================================ */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.video-card a {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.video-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   VIDEO PLAYER PAGE
   ============================================ */

.video-player-wrapper {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-player-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-details {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    margin-bottom: 2rem;
}

.video-details h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.video-details .meta {
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ============================================
   MY PAGE
   ============================================ */

.section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.video-list-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.video-list-item img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 0.5rem;
}

.progress-bar .fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-about {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-info {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.flash.error {
    background: #4a1515;
    color: #ff8080;
}

.flash.success {
    background: #154a15;
    color: #80ff80;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .header-actions .user-name {
        display: none;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-details {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}
