:root {
    --bg-main: #0f1115;
    --bg-secondary: #1a1d24;
    --bg-card: #222630;
    --text-main: #f0f2f5;
    --text-muted: #9ba1a6;
    --accent: #6b4cff;
    --accent-hover: #866dff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: #2d323b;
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

header h1 span { color: var(--accent); }
header p { color: var(--text-muted); font-size: 1.15rem; }

/* Upload Section */
.upload-section {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 60px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.upload-box {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 50px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: var(--bg-main);
    position: relative;
}

.upload-box:hover, .upload-box.dragover {
    border-color: var(--accent);
    background-color: rgba(107, 76, 255, 0.05);
}

#videoFile {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: none;
}

.upload-icon { width: 48px; height: 48px; color: var(--accent); }
.upload-label span { font-size: 1.15rem; font-weight: 500; color: var(--text-main); }

/* Progress Bar */
.progress-container {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 20;
}

.progress-bar {
    flex-grow: 1;
    height: 12px;
    background-color: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #866dff);
    width: 0%;
    transition: width 0.2s linear;
}

#progressText { font-weight: 600; min-width: 45px; }

#uploadStatus {
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
}

.status-success { color: var(--success); }
.status-error { color: var(--error); }

/* Video Gallery Grid */
.gallery-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

.video-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.5);
    border-color: var(--accent);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-thumbnail:hover .play-overlay { opacity: 1; }
.play-overlay svg { width: 50px; height: 50px; color: white; opacity: 0.9; }

.video-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-info h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info .date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; }
.tags { margin-bottom: 25px; flex-grow: 1; }

.tag {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.tag.success { background-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.tag.pending { background-color: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }

.btn-watch {
    display: block;
    text-align: center;
    padding: 12px;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
}

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

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    border: 1px dashed var(--border);
}

@media (max-width: 768px) {
    header h1 { font-size: 2.2rem; }
    .upload-section { padding: 25px; }
}
