@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --bg-base: #141414;
    --bg-overlay: rgba(0, 0, 0, 0.75);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #e50914;
    --accent-hover: #f40612;
    --input-bg: #333333;
    --font-main: 'Poppins', sans-serif;
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-secondary);
}

/* =========================================
   LOGIN PAGE
   ========================================= */
.login-bg {
    background-image: linear-gradient(var(--bg-overlay), var(--bg-overlay)), url('../img/login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-header {
    padding: 20px 40px;
}

.logo {
    color: var(--accent);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    background-color: rgba(0, 0, 0, 0.75);
    padding: 60px 68px 40px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.login-box h2 {
    font-size: 2rem;
    margin-bottom: 28px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px 0;
    height: 50px;
    background-color: var(--input-bg);
    border: 0;
    border-radius: var(--border-radius);
    color: white;
    font-size: 1rem;
    outline: none;
}

.input-group input:focus {
    background-color: #454545;
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    color: #8c8c8c;
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: 12px;
    font-size: 0.7rem;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

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

.btn-block {
    width: 100%;
    margin-top: 24px;
    padding: 16px;
}

.login-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 0.8rem;
    color: #b3b3b3;
}

.login-help a {
    color: #b3b3b3;
}

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

.login-footer {
    margin-top: 50px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.alert-error {
    background-color: #e87c03;
    color: white;
}

/* =========================================
   DASHBOARD & CAROUSEL (Netflix Style)
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    transition: background-color 0.4s;
}

.navbar.scrolled {
    background-color: var(--bg-base);
}

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

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
}

.main-content {
    padding: 40px;
}

.carousel-section {
    margin-bottom: 40px;
}

.carousel-title {
    font-size: 1.4vw;
    color: #e5e5e5;
    margin-bottom: 10px;
    font-weight: 500;
}

.carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
    padding-bottom: 30px; /* Space for scrollbar */
}

/* Custom Scrollbar for Carousel */
.carousel::-webkit-scrollbar {
    height: 8px;
}
.carousel::-webkit-scrollbar-track {
    background: #111;
    border-radius: 4px;
}
.carousel::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
.carousel::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.card {
    flex: 0 0 calc(100% / 5 - 10px); /* 5 cards per view approx */
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #222;
    aspect-ratio: 16 / 9;
}

@media (max-width: 1200px) {
    .card { flex: 0 0 calc(100% / 4 - 10px); }
}
@media (max-width: 800px) {
    .card { flex: 0 0 calc(100% / 3 - 10px); }
}
@media (max-width: 500px) {
    .card { flex: 0 0 calc(100% / 2 - 10px); }
}

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

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
    z-index: 10;
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}
.badge-success { background: #46d369; color: #fff; }
.badge-warning { background: #fbc02d; color: #000; }

/* Formulários Admin Gerais */
.admin-container {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.table th {
    background-color: #1a1a1a;
    font-weight: 600;
}

.table tr:hover {
    background-color: #2a2a2a;
}

/* Responsividade Mobile (Estilo Netflix) */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    .navbar {
        padding: 15px 20px;
    }
    .logo {
        font-size: 1.8rem;
    }
    .main-content {
        padding: 20px;
    }
    .card {
        flex: 0 0 45%; /* Mostra 2 cards e um pedaço do 3º para instigar o swipe */
    }
    .carousel {
        margin: 0 -20px; /* Borda a borda (edge-to-edge) */
        padding: 10px 20px 20px 20px;
        gap: 8px;
    }
    .carousel-title {
        font-size: 1.5rem;
    }
}
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }
    .user-menu {
        font-size: 0.9rem;
    }
    .card {
        flex: 0 0 60%; /* Mostra 1 card grande e um pedaço do 2º */
    }
    .carousel-title {
        font-size: 1.3rem;
    }
}
