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

:root {
    --purple-900: #0d0015;
    --purple-800: #1a0030;
    --purple-700: #2d0050;
    --purple-600: #4a0080;
    --purple-500: #6a00b3;
    --purple-400: #8a2be2;
    --purple-300: #a855f7;
    --purple-200: #c084fc;
    --purple-100: #d8b4fe;
    --black: #050508;
    --gray-900: #0f0f14;
    --gray-800: #1a1a24;
    --gray-700: #2a2a38;
    --gray-600: #3a3a4a;
    --gray-500: #6b6b7a;
    --gray-400: #9ca3af;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #22c55e;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(5,5,8,0.95) 0%, transparent 100%);
    transition: background 0.3s;
}

.header.scrolled {
    background: rgba(5,5,8,0.98);
    border-bottom: 1px solid var(--gray-800);
}

.nav {
    display: flex;
    align-items: center;
    padding: 0 40px;
    height: 64px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
    color: var(--purple-400);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--purple-400), var(--purple-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-400);
    transition: color 0.2s;
    letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

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

.search-box {
    position: relative;
}

.search-box input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--white);
    font-size: 14px;
    width: 240px;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--purple-500);
    width: 300px;
}

.search-box input::placeholder {
    color: var(--gray-500);
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1001;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    transition: background 0.2s;
    cursor: pointer;
}

.search-result-item:hover {
    background: var(--gray-800);
}

.search-result-title {
    font-size: 14px;
    color: var(--white);
}

.search-result-type {
    font-size: 11px;
    color: var(--purple-400);
    text-transform: uppercase;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    color: var(--gray-300);
}

.btn-login, .btn-admin, .btn-logout {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-login {
    background: var(--purple-600);
    color: var(--white);
}

.btn-login:hover {
    background: var(--purple-500);
}

.btn-admin {
    background: var(--gray-700);
    color: var(--purple-300);
}

.btn-admin:hover {
    background: var(--gray-600);
}

.btn-logout {
    background: transparent;
    color: var(--gray-400);
    border: 1px solid var(--gray-600);
}

.btn-logout:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding: 80px 40px 60px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    opacity: 0.3;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, var(--black) 100%),
                linear-gradient(90deg, var(--black) 0%, transparent 50%);
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero-sinopse {
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-300);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    gap: 12px;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--purple-600);
    color: var(--white);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-play:hover {
    background: var(--purple-500);
    transform: scale(1.03);
}

.content {
    padding: 0 40px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.row {
    margin-bottom: 40px;
}

.row-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-left: 4px;
}

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

.carousel-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(106, 0, 179, 0.8);
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.carousel:hover .carousel-btn {
    display: flex;
}

.carousel-btn:hover {
    background: var(--purple-500);
    transform: scale(1.1);
}

.carousel-btn.prev { left: -8px; }
.carousel-btn.next { right: -8px; }

.card {
    flex: 0 0 auto;
    width: 185px;
    transition: transform 0.3s;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.05);
}

.card-poster {
    position: relative;
    width: 185px;
    height: 278px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-800);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-900), var(--gray-800));
    font-size: 32px;
    font-weight: 800;
    color: var(--purple-500);
}

.card-channel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-900), var(--gray-800));
    padding: 20px;
}

.card-channel img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.card-play {
    font-size: 48px;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.card-info {
    padding: 8px 4px;
}

.card-info h3 {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-year {
    font-size: 12px;
    color: var(--gray-400);
}

.card-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    margin-top: 4px;
}

.footer {
    padding: 40px;
    border-top: 1px solid var(--gray-800);
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.footer-disclaimer {
    font-size: 11px;
    color: var(--gray-600);
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--black), var(--purple-900));
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.auth-form {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 16px;
    padding: 40px;
}

.auth-form h1 {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-300);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--purple-500);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--purple-600);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--purple-500);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.3);
    color: var(--success);
}

.watch-page {
    background: var(--black);
}

.watch-header {
    position: relative;
    background: transparent;
}

.watch-main {
    display: flex;
    gap: 24px;
    padding: 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.player-container {
    flex: 1;
    min-width: 0;
}

.player-wrapper {
    position: relative;
    width: 100%;
    background: var(--black);
    border-radius: 12px;
    overflow: hidden;
}

.player-wrapper video {
    width: 100%;
    display: block;
}

.video-js {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.vjs-big-play-button {
    border-color: var(--purple-500) !important;
    background: rgba(106, 0, 179, 0.7) !important;
}

.player-empty {
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-900);
    color: var(--gray-500);
    font-size: 18px;
}

.player-info {
    padding: 24px 0;
}

.player-info h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.player-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.meta-item {
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--gray-800);
    font-size: 13px;
    color: var(--gray-300);
}

.meta-item.live {
    background: var(--danger);
    color: var(--white);
    font-weight: 700;
}

.player-sinopse {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-400);
}

.episodes-section {
    margin-top: 24px;
}

.episodes-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.season {
    margin-bottom: 20px;
}

.season h3 {
    font-size: 16px;
    color: var(--purple-300);
    margin-bottom: 12px;
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.episode-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--gray-800);
    border-radius: 8px;
    transition: all 0.2s;
    min-width: 200px;
}

.episode-card:hover,
.episode-card.active {
    background: var(--purple-700);
}

.ep-number {
    font-size: 12px;
    color: var(--purple-300);
    font-weight: 700;
}

.ep-title {
    font-size: 13px;
}

.sidebar-related {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-related h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-card {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.related-card:hover {
    background: var(--gray-800);
}

.related-poster {
    width: 80px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-800);
}

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

.related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-900), var(--gray-800));
    font-size: 20px;
    font-weight: 800;
    color: var(--purple-500);
}

.related-info h3 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .nav {
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        gap: 8px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 8px 0;
    }

    .search-box {
        display: none;
    }

    .hero {
        height: 50vh;
        min-height: 300px;
        padding: 60px 16px 30px;
    }

    .hero-title {
        font-size: 28px;
    }

    .content {
        padding: 0 16px 20px;
    }

    .card {
        width: 140px;
    }

    .card-poster {
        width: 140px;
        height: 210px;
    }

    .watch-main {
        flex-direction: column;
        padding: 16px;
    }

    .sidebar-related {
        width: 100%;
    }

    .related-list {
        flex-direction: row;
        overflow-x: auto;
    }

    .related-card {
        flex-direction: column;
        min-width: 120px;
    }

    .related-poster {
        width: 120px;
        height: 180px;
    }

    .auth-container {
        padding: 20px;
    }

    .auth-form {
        padding: 24px;
    }
}

.zenin-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    cursor: none;
    user-select: none;
}

.zenin-player.zp-playing {
    cursor: none;
}

.zenin-player video {
    width: 100%;
    height: 100%;
    display: block;
}

.zp-controls {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.7) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.zp-controls.zp-hidden {
    opacity: 0;
    pointer-events: none;
}

.zp-controls-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
}

.zp-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.zp-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

.zp-play-center {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.8);
    background: rgba(106, 0, 179, 0.75);
    color: var(--white);
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.zp-play-center:hover {
    background: var(--purple-500);
    transform: scale(1.1);
}

.zp-controls-bottom {
    padding: 0 20px 12px;
}

.zp-progress {
    padding: 8px 0;
    cursor: pointer;
    width: 100%;
}

.zp-progress-track {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: height 0.1s;
}

.zp-progress-track:hover {
    height: 6px;
}

.zp-progress-buffered {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: width 0.1s;
}

.zp-progress-current {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--purple-500), var(--purple-300));
    border-radius: 4px;
    transition: width 0.1s linear;
}

.zp-progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--purple-400);
    box-shadow: 0 0 6px rgba(106,0,179,0.6);
    opacity: 0;
    transition: opacity 0.15s;
}

.zp-progress-track:hover .zp-progress-thumb {
    opacity: 1;
}

.zp-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.zp-bottom-left,
.zp-bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zp-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.zp-btn:hover {
    background: rgba(255,255,255,0.12);
    opacity: 1;
}

.zp-time {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    min-width: 100px;
}

.zp-volume-slider {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.zp-volume-track {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--purple-400);
    border-radius: 4px;
    transition: width 0.05s;
}

.zp-fullscreen-btn {
    font-size: 20px;
}

.zenin-player:fullscreen .zp-title {
    font-size: 18px;
}

.zenin-player:fullscreen video {
    object-fit: contain;
}

@media (max-width: 768px) {
    .zp-play-center {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    .zp-controls-top {
        padding: 10px 12px;
    }
    .zp-controls-bottom {
        padding: 0 12px 8px;
    }
    .zp-volume-slider {
        display: none;
    }
    .zp-title {
        font-size: 13px;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
