/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Screen management */
.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none;
}

/* Password screen */
.password-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.password-container h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.password-container p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

#password-input {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    width: 300px;
    max-width: 100%;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

#password-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#password-button {
    padding: 1rem 2rem;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#password-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
}

.error {
    color: #ff6b6b;
    margin-top: 1rem;
    font-weight: 500;
    display: none;
}

/* Main content */
#main-content {
    background: white;
}

header {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

/* Video player section */
.video-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
    margin-bottom: 1.5rem;
}

.video-info h2 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 500;
}

.video-info p {
    color: #666;
    line-height: 1.6;
}

/* Video list */
.video-list h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 500;
}

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

.video-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.video-item:hover {
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.video-item.active {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.video-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.video-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Footer */
footer {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    color: #666;
    border-top: 1px solid #e9ecef;
}

/* Mobile and low-end device optimizations */
@media (max-width: 768px) {
    .password-container h1 {
        font-size: 2rem;
    }
    
    header {
        padding: 2rem 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .video-container {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    #video-items {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .video-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    #password-input {
        width: 250px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .video-info h2 {
        font-size: 1.2rem;
    }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: #000;
    }
    
    .password-container, header, footer {
        background: #000;
        color: #fff;
    }
    
    #password-input, #password-button, .video-item {
        border: 2px solid #fff;
    }
}