:root {
    --primary-color: #7b2cbf;
    --primary-light: #9d4edd;
    --primary-dark: #5a189a;
    --secondary-color: #48bfe3;
    --secondary-dark: #3a86ff;
    --text-primary: #f8f9fa;
    --text-secondary: #ced4da;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-input: #2d2d2d;
    --border-color: #333;
    --error-color: #e63946;
    --success-color: #2a9d8f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 5px;
    font-weight: 700;
}

.tagline {
    color: var(--text-secondary);
    font-style: italic;
}

/* Filter Panel Styles */
.filter-panel {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.filter-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-section h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.search-row {
    display: flex;
    gap: 10px;
}

.input-group {
    position: relative;
    flex: 1;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(157, 78, 221, 0.25);
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    cursor: pointer;
    font-size: 18px;
    display: none;
}

input:not(:placeholder-shown) + .clear-btn {
    display: block;
}

button {
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: white;
}

.secondary-btn:hover {
    background-color: var(--secondary-dark);
}

/* Preset Buttons */
.view-presets, .date-presets, .duration-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.preset-btn, .date-preset-btn, .duration-preset-btn {
    background-color: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
}

.preset-btn:hover, .date-preset-btn:hover, .duration-preset-btn:hover {
    background-color: rgba(157, 78, 221, 0.1);
    border-color: var(--primary-light);
}

.preset-btn.active, .date-preset-btn.active, .duration-preset-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.range-inputs {
    display: flex;
    gap: 10px;
}

/* Video Container */
.video-container {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

#quota-display {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding: 5px 10px;
    background-color: var(--bg-input);
    border-radius: 20px;
    display: inline-block;
    float: right;
}

#player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#player, #player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#player-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f0f0f;
    z-index: 1;
}

.placeholder-content {
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-content svg {
    margin-bottom: 15px;
    opacity: 0.7;
}

.video-info {
    padding: 5px;
}

#video-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

#video-stats {
    color: var(--secondary-color);
    font-size: 14px;
    margin-bottom: 15px;
}

#video-description {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

/* Loader */
#loader {
    background-color: rgba(30, 30, 30, 0.9);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

#error-message {
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--error-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--error-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
    }
    
    .range-inputs {
        flex-direction: column;
    }
    
    .view-presets, .date-presets, .duration-presets {
        flex-direction: column;
    }
    
    .preset-btn, .date-preset-btn, .duration-preset-btn {
        text-align: left;
    }
}