/* Reset e Base */
:root {
    --bg-primary: #141414;
    --bg-secondary: #181818;
    --bg-card: #2f2f2f;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-red: #e50914;
    --accent-red-hover: #b80710;
    --accent-gray: #2a2a2a;
    --accent-gray-hover: #404040;
    --border-color: #333333;
    --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbar estilizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #444;
}

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

/* Layout - Header / Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 4%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background-color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.logo {
    color: var(--accent-red);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo span {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.search-input {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px 8px 35px;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    width: 200px;
    transition: var(--transition-smooth);
}

.search-input:focus {
    width: 300px;
    border-color: var(--accent-red);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
}

/* Landing / Login Page */
.login-container {
    height: 100vh;
    width: 100vw;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('https://assets.nflxext.com/ffe/siteui/vlv3/ab180a27-b661-44d7-a6d9-940cb32f2f4a/7fb4c35a-05b6-4db0-97f4-13e0c47854f0/BR-pt-20231009-popsignuptwoweeks-perspective_alpha_website_large.jpg') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: rgba(0, 0, 0, 0.85);
    padding: 60px;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-card h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 28px;
}

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

.form-control {
    width: 100%;
    padding: 16px;
    background: #333333;
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus {
    background: #454545;
}

.btn-primary {
    background-color: var(--accent-red);
    color: var(--text-primary);
    border: none;
    padding: 16px;
    width: 100%;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 10px;
}

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

.btn-oauth {
    background-color: #ffffff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 15px;
}

.btn-oauth:hover {
    background-color: #f1f1f1;
}

.login-help {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 15px;
}

.login-signup-now {
    margin-top: 40px;
    font-size: 16px;
    color: var(--text-secondary);
}

.login-signup-now a {
    color: var(--text-primary);
    font-weight: 500;
}

.login-signup-now a:hover {
    text-decoration: underline;
}

/* Profiles Select Page */
.profile-selection-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.profile-selection-container h1 {
    font-size: 48px;
    margin-bottom: 40px;
    font-weight: 500;
}

.profiles-list {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-card {
    text-align: center;
    cursor: pointer;
    width: 130px;
}

.profile-avatar {
    width: 130px;
    height: 130px;
    border-radius: 4px;
    background-color: #333;
    margin-bottom: 15px;
    border: 3px solid transparent;
    transition: var(--transition-smooth);
    background-position: center;
    background-size: cover;
}

.profile-card:hover .profile-avatar {
    border-color: var(--text-primary);
}

.profile-name {
    font-size: 16px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.profile-card:hover .profile-name {
    color: var(--text-primary);
}

.manage-profiles-btn {
    border: 1px solid var(--text-secondary);
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 1px;
}

.manage-profiles-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Dashboard & Billboard */
.billboard {
    height: 85vh;
    position: relative;
    background-position: center center;
    background-size: cover;
    display: flex;
    align-items: center;
    padding: 0 4%;
}

.billboard::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(20,20,20,0) 100%);
}

.billboard-content {
    max-width: 600px;
    z-index: 10;
}

.billboard-title {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.billboard-desc {
    font-size: 18px;
    margin-bottom: 25px;
    color: #e5e5e5;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.billboard-actions {
    display: flex;
    gap: 15px;
}

.btn-billboard-play {
    background-color: #ffffff;
    color: #000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-billboard-play:hover {
    background-color: rgba(255, 255, 255, 0.75);
}

.btn-billboard-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-billboard-info:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

/* Rows & Carousels */
.main-container {
    padding: 0 4% 50px 4%;
    margin-top: -80px;
    position: relative;
    z-index: 20;
}

.category-row {
    margin-bottom: 40px;
}

.row-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.row-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.row-cards::-webkit-scrollbar {
    display: none; /* Esconder a barra de rolagem nos carrosséis */
}

.video-card {
    min-width: 250px;
    width: 250px;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.video-card:hover {
    transform: scale(1.08);
    z-index: 50;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
}

.video-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
}

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

.video-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.video-card-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Page Streaming Player */
.player-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.player-back-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: transparent;
    border: none;
    color: #fff;
    transition: var(--transition-smooth);
}

.player-back-btn:hover {
    transform: translateX(-5px);
}

.video-player {
    width: 100%;
    height: 100%;
    outline: none;
}

/* Admin Dashboard CSS */
.admin-layout {
    display: flex;
    min-height: 100vh;
    margin-top: 80px;
}

.admin-sidebar {
    width: 250px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
}

.admin-sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-sidebar-item a {
    display: block;
    padding: 12px 15px;
    border-radius: 4px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.admin-sidebar-item.active a, .admin-sidebar-item a:hover {
    background-color: var(--accent-gray);
    color: var(--text-primary);
}

.admin-content {
    flex: 1;
    padding: 40px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.admin-table th, .admin-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    background-color: var(--accent-gray);
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-admin {
    background-color: var(--accent-red);
    color: #fff;
}

.badge-user {
    background-color: var(--accent-gray-hover);
    color: #fff;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    overflow-y: auto;
    padding: 40px 20px;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    border: 1px solid var(--border-color);
    margin: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Responsividade Geral */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
        margin-top: 60px;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 15px;
    }
    .admin-content {
        padding: 20px;
    }
    .navbar {
        padding: 15px 20px;
    }
    .nav-links {
        display: none; /* Em sistemas mobile reais, usaria hambúrguer, mas simplificado aqui */
    }
    .billboard-title {
        font-size: 40px;
    }
}


/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-red);
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 5000;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
}
