:root {
    --bg-dark: #0a0a0f;
    --panel-bg: rgba(20, 20, 28, 0.7);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-dim: #9ba1a6;
    --accent: #ff3366;
    --accent-hover: #ff4d79;
    --radius-lg: 16px;
    --radius-md: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 51, 102, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(51, 153, 255, 0.05), transparent 25%);
    background-attachment: fixed;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--accent);
}

.logo h1 {
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-dim);
    font-size: 1rem;
}

/* Glassmorphism base */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Player Section */
.player-section {
    margin-bottom: 3rem;
}

#player-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

#player-placeholder {
    color: var(--text-dim);
    font-size: 1.1rem;
    text-align: center;
}

/* ogv.js canvas styles */
#player-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    background: #000;
}

/* Custom Controls */
.controls-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: none;
}

.btn {
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

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

.progress-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    font-variant-numeric: tabular-nums;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Gallery Section */
.gallery-section h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

.video-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.video-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.video-icon {
    width: 100%;
    height: 140px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
}

.video-card:hover .video-icon {
    color: var(--text-main);
}

.video-title {
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-date {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: auto;
}

.loading {
    color: var(--text-dim);
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}
