* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --fresh-primary: #6366f1;
    --fresh-primary-dark: #4f46e5;
    --fresh-primary-light: #818cf8;
    --fresh-secondary: #8b5cf6;
    --fresh-bg: #ffffff;
    --fresh-bg-alt: #f8fafc;
    --fresh-surface: #ffffff;
    --fresh-border: #e2e8f0;
    --fresh-text: #1e293b;
    --fresh-text-secondary: #64748b;
    --fresh-text-light: #94a3b8;
    --fresh-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --fresh-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --fresh-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --fresh-radius: 12px;
    --fresh-radius-sm: 8px;
    --fresh-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.fresh-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--fresh-bg-alt);
    color: var(--fresh-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fresh-header {
    background: var(--fresh-bg);
    border-bottom: 1px solid var(--fresh-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--fresh-shadow);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 2rem;
}

.logo {
    text-decoration: none;
    color: var(--fresh-text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: var(--fresh-transition);
}

.logo:hover {
    color: var(--fresh-primary);
}

.logo-text {
    background: linear-gradient(135deg, var(--fresh-primary), var(--fresh-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--fresh-border);
    border-radius: var(--fresh-radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--fresh-transition);
    background: var(--fresh-bg);
}

.search-input:focus {
    outline: none;
    border-color: var(--fresh-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-btn {
    padding: 0.75rem 1.25rem;
    background: var(--fresh-primary);
    color: white;
    border: none;
    border-radius: var(--fresh-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--fresh-transition);
}

.search-btn:hover {
    background: var(--fresh-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--fresh-shadow-md);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--fresh-text);
    border-radius: 2px;
    transition: var(--fresh-transition);
}

.main-nav {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--fresh-border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: 0.625rem 1.25rem;
    color: var(--fresh-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--fresh-radius-sm);
    white-space: nowrap;
    transition: var(--fresh-transition);
    position: relative;
}

.nav-link:hover {
    color: var(--fresh-primary);
    background: rgba(99, 102, 241, 0.05);
}

.nav-link.active {
    color: var(--fresh-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--fresh-primary);
    border-radius: 2px;
}

.fresh-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

.fresh-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fresh-text);
    letter-spacing: -0.5px;
}

.section-more {
    color: var(--fresh-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--fresh-transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.section-more:hover {
    color: var(--fresh-primary-dark);
    gap: 0.5rem;
}

.section-count {
    color: var(--fresh-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--fresh-surface);
    border-radius: var(--fresh-radius);
    overflow: hidden;
    transition: var(--fresh-transition);
    box-shadow: var(--fresh-shadow);
    border: 1px solid var(--fresh-border);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fresh-shadow-lg);
    border-color: var(--fresh-primary-light);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: var(--fresh-bg-alt);
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--fresh-transition);
}

.video-card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--fresh-transition);
}

.video-card:hover .card-overlay {
    opacity: 1;
}

.play-icon {
    color: white;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--fresh-transition);
}

.video-card:hover .play-icon {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--fresh-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--fresh-radius-sm);
    z-index: 2;
    box-shadow: var(--fresh-shadow-md);
}

.card-time {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--fresh-radius-sm);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.card-content {
    padding: 1rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fresh-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--fresh-transition);
}

.video-card:hover .card-title {
    color: var(--fresh-primary);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.meta-item {
    color: var(--fresh-text-secondary);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: var(--fresh-bg-alt);
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--fresh-text-secondary);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--fresh-surface);
    border-radius: var(--fresh-radius);
    box-shadow: var(--fresh-shadow);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--fresh-bg);
    color: var(--fresh-text);
    border: 1px solid var(--fresh-border);
    text-decoration: none;
    border-radius: var(--fresh-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--fresh-transition);
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--fresh-primary);
    color: white;
    border-color: var(--fresh-primary);
    transform: translateY(-1px);
    box-shadow: var(--fresh-shadow-md);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-page {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fresh-bg);
    color: var(--fresh-text);
    border: 1px solid var(--fresh-border);
    text-decoration: none;
    border-radius: var(--fresh-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--fresh-transition);
}

.pagination-page:hover {
    background: var(--fresh-primary);
    color: white;
    border-color: var(--fresh-primary);
    transform: translateY(-1px);
}

.pagination-page.active {
    background: var(--fresh-primary);
    color: white;
    border-color: var(--fresh-primary);
    box-shadow: var(--fresh-shadow-md);
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--fresh-text-light);
}

.fresh-player {
    background: var(--fresh-surface);
    border-radius: var(--fresh-radius);
    padding: 1.5rem;
    box-shadow: var(--fresh-shadow-lg);
    border: 1px solid var(--fresh-border);
}

.player-screen {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--fresh-radius-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-label {
    font-weight: 600;
    color: var(--fresh-text);
    font-size: 0.95rem;
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.control-btn {
    padding: 0.625rem 1.25rem;
    background: var(--fresh-bg);
    color: var(--fresh-text);
    border: 1px solid var(--fresh-border);
    border-radius: var(--fresh-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--fresh-transition);
    font-family: inherit;
}

.control-btn:hover {
    background: var(--fresh-primary);
    color: white;
    border-color: var(--fresh-primary);
    transform: translateY(-1px);
}

.control-btn.active {
    background: var(--fresh-primary);
    color: white;
    border-color: var(--fresh-primary);
    box-shadow: var(--fresh-shadow-md);
}

.detail-section {
    background: var(--fresh-surface);
    border-radius: var(--fresh-radius);
    padding: 2rem;
    box-shadow: var(--fresh-shadow);
    border: 1px solid var(--fresh-border);
}

.detail-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

.detail-poster {
    position: relative;
    border-radius: var(--fresh-radius-sm);
    overflow: hidden;
    border: 2px solid var(--fresh-border);
}

.detail-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.poster-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--fresh-primary);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--fresh-radius-sm);
    z-index: 2;
    box-shadow: var(--fresh-shadow-md);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-header-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fresh-text);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--fresh-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--fresh-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--fresh-bg-alt);
    border-radius: var(--fresh-radius-sm);
}

.meta-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.meta-label {
    color: var(--fresh-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 80px;
}

.meta-value {
    color: var(--fresh-text);
    font-size: 0.95rem;
    flex: 1;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--fresh-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--fresh-radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--fresh-transition);
    border: 2px solid var(--fresh-primary);
}

.action-btn:hover {
    background: var(--fresh-primary-dark);
    border-color: var(--fresh-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--fresh-shadow-md);
}

.content-section {
    background: var(--fresh-surface);
    border-radius: var(--fresh-radius);
    padding: 2rem;
    box-shadow: var(--fresh-shadow);
    border: 1px solid var(--fresh-border);
}

.detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--fresh-text);
    padding: 1rem 0;
}

.fresh-footer {
    background: var(--fresh-text);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--fresh-transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .search-form {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background: var(--fresh-bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        box-shadow: var(--fresh-shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1000;
        overflow-y: auto;
        border-top: none;
    }

    .main-nav[data-open="true"] {
        transform: translateX(0);
    }

    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .fresh-main {
        padding: 1.5rem 1rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .detail-container {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 200px;
        margin: 0 auto;
    }

    .pagination {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .pagination-pages {
        flex-wrap: wrap;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

