/* YouTube Scheduler - Modern Dark Theme */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --accent-primary: #ff0050;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #ff0050 0%, #7c3aed 100%);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: #2a2a35;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at top left, rgba(255, 0, 80, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(124, 58, 237, 0.15) 0%, transparent 50%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.logo {
    margin-bottom: 24px;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    color: #333;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.feature .icon {
    font-size: 24px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-small {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.channel-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 50px;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.logout-btn, .switch-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.logout-btn:hover, .switch-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Channels Page */
.channels-page {
    padding: 60px 32px;
    text-align: center;
}

.channels-page h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.channel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.channel-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-secondary);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
}

.channel-thumb {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.channel-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.channel-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.select-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 0, 80, 0.3);
}

/* Dashboard */
.dashboard {
    padding: 32px;
    display: grid;
    gap: 32px;
}

.dashboard section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.dashboard h2 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(255, 0, 80, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
}

.copy-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.copy-btn {
    padding: 12px 24px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(124, 58, 237, 0.3);
}

#copyStatus {
    color: var(--success);
    font-size: 14px;
}

/* Schedule Section */
.schedule-config {
    background: var(--bg-dark);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.config-item input {
    width: 80px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 16px;
    text-align: center;
}

.save-btn {
    padding: 10px 20px;
    background: var(--accent-secondary);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    opacity: 0.9;
}

.config-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 12px;
}

.schedule-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.start-btn, .stop-btn {
    padding: 16px 40px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn {
    background: var(--success);
    color: white;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.stop-btn {
    background: var(--danger);
    color: white;
}

.stop-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.hidden {
    display: none !important;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-dark);
    border-radius: var(--radius);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
}

.status-indicator.running .status-dot {
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Video Gallery */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--accent-secondary);
}

.video-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.video-icon {
    font-size: 32px;
}

.video-filename {
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
}

.video-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-title {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.video-title:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

.video-description {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
}

.video-description:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

.video-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.save-video-btn, .delete-video-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-video-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
}

.delete-video-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}

.empty-gallery {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px;
    }
    
    .channel-badge {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .dashboard {
        padding: 16px;
    }
    
    .upload-area {
        padding: 32px 16px;
    }
    
    .schedule-controls {
        flex-wrap: wrap;
    }
    
    .start-btn, .stop-btn {
        flex: 1;
        min-width: 150px;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
