:root {
    --primary-color: #e50914;
    --primary-hover: #f40612;
    --dark-bg: #000000;
    --dark-secondary: #141414;
    --dark-tertiary: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header estilo Netflix */
.main-header {
    background: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 100%);
    padding: 0 4%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

.main-header.scrolled {
    background: var(--dark-bg);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    cursor: pointer;
    margin-right: 15px;
    transition: transform 0.2s ease;
}

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

.site-title {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    margin-left: 50px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
}

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

.nav-link.active {
    background: var(--primary-color);
    color: var(--text-primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-width: 200px;
    padding: 10px 0;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-top: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.user-menu:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: background 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--dark-tertiary);
}

/* Main Content */
.main-content {
    margin-top: 70px;
    padding: 40px 4%;
    min-height: calc(100vh - 70px);
}

/* Cards */
.card {
    background: var(--dark-secondary);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.card-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: var(--dark-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: #dc3545;
    color: var(--text-primary);
}

.btn-danger:hover {
    background: #c82333;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    background: var(--dark-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7));
    padding: 20px;
}

.login-box {
    background: rgba(0, 0, 0, 0.85);
    padding: 60px 68px 40px;
    border-radius: 4px;
    max-width: 450px;
    width: 100%;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    color: var(--primary-color);
    font-size: 32px;
}

.login-title {
    font-size: 32px;
    margin-bottom: 28px;
}

/* Grid */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Media Card */
.media-card {
    background: var(--dark-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(229, 9, 20, 0.3);
}

.media-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

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

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    opacity: 0.95;
    transition: all 0.3s ease;
}

.play-overlay svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.media-card:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.media-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.media-title {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 44px;
}

.media-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
    flex: 1;
}

.media-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.media-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.media-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--dark-tertiary);
}

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

.table th {
    font-weight: 600;
    color: var(--text-primary);
}

.table td {
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: var(--dark-tertiary);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal-content {
    position: relative;
    background: var(--dark-secondary);
    padding: 30px;
    border-radius: 8px;
    max-width: 1200px;
    width: 100%;
    border: 1px solid var(--border-color);
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.video-modal-close:hover {
    color: var(--primary-color);
}

/* Footer */
.main-footer {
    background: var(--dark-secondary);
    padding: 30px 4%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .main-content {
        padding: 20px 4%;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 40px 30px;
    }
}
