/* VideoPortal - Video Portal Theme */
:root {
    --primary: #00a1d6;
    --primary-dark: #0089b8;
    --vip: #fb7299;
    --bg: #f4f4f4;
    --bg-white: #ffffff;
    --bg-dark: #222;
    --text-primary: #212121;
    --text-secondary: #666;
    --text-muted: #999;
    --border: #e5e5e5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-sm: 4px;
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-top {
    background: var(--bg-dark);
    padding: 6px 0;
}

.top-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.top-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.top-links a:hover {
    color: var(--primary);
}

.navbar {
    padding: 12px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    gap: 40px;
}

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

.logo-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu a {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary);
    color: var(--bg-white);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 20px;
    padding: 0 16px;
    border: 1px solid var(--border);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    padding: 10px;
    width: 200px;
    font-size: 0.9rem;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-vip {
    background: linear-gradient(135deg, var(--vip), #f25d8e);
    color: var(--bg-white);
}

.btn-vip:hover {
    opacity: 0.9;
}

/* Banner Section */
.banner-section {
    padding: 20px 0;
}

.banner-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.banner-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 320px;
}

.banner-slide {
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.banner-content {
    color: var(--bg-white);
}

.banner-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--vip);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.banner-content h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.banner-content p {
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background: var(--bg-white);
}

.banner-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-card {
    flex: 1;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--bg-white);
    cursor: pointer;
    transition: transform 0.3s;
}

.side-card:hover {
    transform: scale(1.02);
}

.card-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 8px;
    width: fit-content;
}

.side-card h3 {
    font-size: 1.1rem;
}

/* Channel Navigation */
.channel-nav {
    padding: 20px 0;
    background: var(--bg-white);
    margin-bottom: 20px;
}

.channel-list {
    display: flex;
    justify-content: space-around;
}

.channel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.channel-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.channel-icon {
    font-size: 1.5rem;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.header-tabs {
    display: flex;
    gap: 8px;
    margin-left: 20px;
}

.tab-btn {
    padding: 6px 16px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-white);
}

.more-link {
    margin-left: auto;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.more-link:hover {
    color: var(--primary);
}

/* Video Section */
.video-section {
    padding: 20px 0;
    background: var(--bg-white);
    margin-bottom: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.video-card {
    cursor: pointer;
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-cover {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-icon {
    opacity: 1;
}

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

.quality-badge,
.vip-badge,
.episode-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
}

.quality-badge {
    background: var(--primary);
    color: var(--bg-white);
}

.vip-badge {
    background: var(--vip);
    color: var(--bg-white);
}

.episode-badge {
    background: rgba(0, 0, 0, 0.7);
    color: var(--bg-white);
}

.video-info {
    padding: 12px 4px;
}

.video-info h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Video Grid Small */
.video-grid-small {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.video-card-horizontal {
    display: flex;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.video-card-horizontal:hover {
    background: #e8e8e8;
}

.video-cover-h {
    width: 120px;
    height: 70px;
    border-radius: var(--radius-sm);
    position: relative;
    flex-shrink: 0;
}

.live-badge,
.update-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
}

.live-badge {
    background: #f25d8e;
    color: var(--bg-white);
}

.update-badge {
    background: var(--primary);
    color: var(--bg-white);
}

.video-info-h h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.video-info-h p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.video-info-h .views {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Anime Grid */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.anime-card {
    cursor: pointer;
    transition: transform 0.3s;
}

.anime-card:hover {
    transform: translateY(-4px);
}

.anime-cover {
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    position: relative;
}

.anime-episode {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--bg-white);
    font-size: 0.75rem;
    border-radius: 4px;
    text-align: center;
}

.anime-card h3 {
    font-size: 0.9rem;
    margin: 10px 0 4px;
}

.anime-schedule {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Ranking Section */
.ranking-section {
    padding: 20px 0;
    background: var(--bg-white);
    margin-bottom: 20px;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ranking-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.ranking-header h3 {
    font-size: 1rem;
}

.ranking-header a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.ranking-list {
    list-style: none;
    padding: 12px;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.3s;
    cursor: pointer;
}

.ranking-list li:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ranking-list .rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 12px;
}

.ranking-list .rank.top {
    background: var(--primary);
    color: var(--bg-white);
    border-radius: 4px;
}

.ranking-list .title {
    flex: 1;
    font-size: 0.9rem;
}

.ranking-list .hot {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: #ccc;
    padding: 50px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #999;
}

.footer-links h4 {
    color: var(--bg-white);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: #999;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 0;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: #666;
}

/* Responsive */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .anime-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .video-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }

    .ranking-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu,
    .header-top {
        display: none;
    }

    .banner-wrapper {
        grid-template-columns: 1fr;
    }

    .banner-side {
        flex-direction: row;
    }

    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .anime-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .video-grid-small {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
