@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #121212;
    --bg-darkest: #0a0a0a;
    --text-light: #e0e0e0;
    --text-lighter: #ffffff;
    --text-muted: #a0a0a0;
    --primary: #6a5acd;
    --primary-dark: #5a4abc;
    --primary-light: #7b6edd;
    --border: #333333;
    --border-light: #444444;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@supports (font-variation-settings: normal) {
    body {
        font-family: 'Inter var', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 10px auto 0;
}

header {
    background-color: var(--bg-darker);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-lighter);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: "📹";
    font-size: 1.2em;
}

.nav-links {
    display: flex;
    gap: 0.75rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: var(--primary);
    color: var(--text-lighter);
    transform: translateY(-1px);
}

main {
    flex: 1;
    padding: 2rem 0;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-lighter);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1px;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-lighter);
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(106, 90, 205, 0.2);
}

input[type="file"] {
    padding: 0.5rem;
    background-color: transparent;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a0a0a0'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: var(--text-lighter);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--bg-darker);
    border-color: var(--primary-light);
    color: var(--text-lighter);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.card {
    background-color: var(--bg-darker);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--bg-darkest);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-lighter);
}

.card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
    color: #c8e6c9;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
    color: #ffcdd2;
}

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

.channel-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.channel-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow);
}

.video-player {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    background-color: #000;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

footer {
    background-color: var(--bg-darker);
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    margin-top: 10px;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

@media (max-width: 768px) {
    .channel-header {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        padding: 0.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

.badge {
    background-color: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 5px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.text-muted {
    color: #6c757d !important;
    font-size: 0.85rem;
}

/* static/css/components/search.css */
.search-container {
    margin: 1.5rem 0;
    width: 100%;
}

.search-group {
    display: flex;
    position: relative;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 0.75rem 3rem 0.75rem 1rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(106, 90, 205, 0.2);
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    color: var(--primary);
}

.search-btn svg {
    width: 16px;
    height: 16px;
}

.search-results-info {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clear-search {
    color: var(--primary-light);
    text-decoration: none;
    margin-left: 0.25rem;
    transition: var(--transition);
}

.clear-search:hover {
    color: var(--primary);
    text-decoration: underline;
}

.fa-user, .fa-clock {
    margin-right: 3px;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Error Pages */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    text-align: center;
    padding: 2rem;
}

.error-content h1 {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1;
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-lighter);
}

.error-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-content .actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .error-content h1 {
        font-size: 4rem;
    }

    .error-content h2 {
        font-size: 1.5rem;
    }
}

/* CAPTCHA Styles */
.captcha {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.captcha img {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.captcha input {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-light);
}

.refresh-captcha {
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.refresh-captcha:hover {
    color: var(--primary);
}

.error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* User dropdown styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    font-size: 24px;
    color: white;
}

.username {
    font-weight: 500;
    font-size: 0.95rem;
}

.dropdown-icon {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.user-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--bg-darker);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.user-dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-light);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary-light);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 4px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-btn .username {
        display: none;
    }

    .dropdown-content {
        min-width: 160px;
    }
}

/* Settings Page Styles */
.settings-container {
    display: flex;
    min-height: calc(100vh - 200px);
    margin-top: 2rem;
}

.settings-sidebar {
    width: 250px;
    background-color: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-right: 2rem;
    height: fit-content;
}

.settings-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.settings-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-menu {
    list-style: none;
}

.settings-menu li {
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.settings-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.settings-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.settings-menu li.active a {
    background-color: var(--primary);
    color: white;
}

.settings-menu li i {
    width: 20px;
    text-align: center;
}

.settings-content {
    flex: 1;
}

.settings-card {
    background-color: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--border);
}

.settings-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.settings-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.password-form .form-group {
    margin-bottom: 1.5rem;
}

.password-form label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.password-requirements {
    background-color: var(--bg-darkest);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.password-requirements p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.password-requirements ul {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.password-requirements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.25rem;
}

.password-requirements li:before {
    content: "•";
    position: absolute;
    left: 0;
}

.password-requirements li.valid {
    color: #4CAF50;
}

.password-requirements li.valid:before {
    content: "✓";
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-container {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

.progress-container {
    display: none;
    margin: 15px 0;
    background-color: var(--bg-darker);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-bar {
    height: 20px;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.thumbnail-preview {
    margin-top: 10px;
    max-width: 200px;
    display: none;
}

.video-preview {
    margin-top: 10px;
    max-width: 100%;
    display: none;
}

