/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-hover: #252532;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #2a2a3a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.2s ease;
}

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

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.logo i {
    color: var(--accent);
    font-size: 1.5rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs i {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 i {
    -webkit-text-fill-color: var(--accent);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Load Box */
.load-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.load-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.load-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

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

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

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

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

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

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

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

.btn-download:hover {
    background: #16a34a;
}

/* Tips */
.tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.tips h3 {
    font-size: 0.9rem;
    color: var(--warning);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips ul {
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tips li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.tips li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

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

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
}

.view-toggle .btn {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.view-toggle .btn.active,
.view-toggle .btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.file-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* File Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

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

.file-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.file-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.file-card-thumbnail {
    height: 140px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.file-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.file-card-thumbnail:hover img {
    transform: scale(1.05);
}

/* Loading state with emoji */
.file-card-thumbnail.thumb-loading::before {
    content: "🎬";
    font-size: 2.5rem;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    z-index: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

.file-card-thumbnail.thumb-loading img {
    opacity: 0;
}

.file-card-thumbnail.thumb-loaded img {
    opacity: 1;
}

.file-card-thumbnail.thumb-error::before {
    content: "❌";
    font-size: 2rem;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.2);
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.folder-icon {
    color: var(--warning);
}

.file-icon {
    color: var(--text-muted);
}

.file-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transition: var(--transition);
}

.file-card:hover .file-card-overlay {
    opacity: 1;
}

.file-card-overlay .btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
}

.file-card-body {
    padding: 1rem;
}

.file-card-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.file-card-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.file-card-buttons .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* Path Info */
.path-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.path-info i {
    color: var(--warning);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

/* Watch Page */
.watch-container {
    max-width: 1000px;
}

.video-wrapper {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--accent);
}

.video-player {
    background: #000;
    line-height: 0;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.video-player video {
    max-height: 70vh;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.video-info {
    padding: 1.5rem;
}

.video-info h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.video-meta i {
    margin-right: 0.5rem;
}

.video-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.related-files {
    margin-top: 2rem;
}

.related-files h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

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

    .file-card-thumbnail {
        height: 100px;
    }

    .toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .video-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* SPA additions */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.breadcrumb-item:hover {
    color: var(--accent);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
    cursor: default;
}

.breadcrumb-item.active:hover {
    color: var(--text-primary);
}

.breadcrumb-item::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--border);
}

.breadcrumb-item:last-child::after {
    display: none;
}

.url-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto 2rem;
    box-shadow: var(--shadow);
}

.url-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.url-input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.url-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.url-input::placeholder {
    color: var(--text-muted);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.btn-fast-play {
    background: #8B5CF6;
    color: white;
}

.btn-fast-play:hover {
    background: #7C3AED;
}

.btn-fast-download {
    background: var(--warning);
    color: white;
}

.btn-fast-download:hover {
    background: #d97706;
}

.btn-zip {
    background: var(--warning);
    color: white;
}

.btn-zip:hover {
    background: #d97706;
}

.helper-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.loading-section {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.content-section {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stats-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-actions-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-field {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-field i {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    z-index: 1;
    font-size: 0.9rem;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

.file-card-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.file-card-icon.video {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.file-card-icon.image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.file-card-icon.audio {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.file-card-icon.document {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.file-card-icon.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.file-card-icon i {
    font-size: 3rem;
}

.file-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.file-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.content-section .file-card-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.content-section .file-card-buttons .btn {
    padding: 0.5rem;
    font-size: 0.8rem;
}

.folder-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.folder-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--warning);
}

.folder-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
}

.folder-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.folder-card-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.folder-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.folder-group-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.folder-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.history-section {
    margin-top: 1rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.history-info {
    min-width: 0;
}

.history-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.history-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.related-card {
    margin-top: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.related-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.related-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.related-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.related-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-fallback {
    font-size: 1.1rem;
}

.related-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.related-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.related-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.image-modal.is-open {
    display: flex;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.image-modal-content {
    position: relative;
    max-width: min(90vw, 1200px);
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #000;
}

.image-modal-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    word-break: break-word;
}

.image-modal-close {
    position: absolute;
    top: 0.35rem;
    right: 0.6rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

#playerVideo {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
}

#playerImage {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: none;
}

.video-player.modern-player {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-player.modern-player video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .url-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .stats-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .content-section .file-card-buttons {
        grid-template-columns: 1fr;
    }

    .video-player video,
    #playerVideo,
    #playerImage {
        max-height: 60vh;
    }

    .video-player.modern-player video {
        max-height: 60vh;
    }
}
