/* Conettam TV - Estilos personalizados para interfaz Smart TV */

:root {
    --primary-color: #800080;     /* Morado corporativo Conettam */
    --secondary-color: #f00000;   /* Rojo corporativo Conettam */
    --background-dark: #000000;
    --background-card: #181818;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --focus-color: #800080;       /* Morado para el foco */
    --hover-color: #f00000;       /* Rojo para hover */
    --transition-speed: 0.3s;
    --gradient-purple: linear-gradient(135deg, #800080 0%, #a020a0 100%);
    --gradient-red: linear-gradient(135deg, #f00000 0%, #ff3333 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.6;
    min-height: 100vh;
}

/* Ocultar scrollbar pero mantener funcionalidad */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

/* Header/Navbar */
.navbar-conettam {
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 35px;
    width: auto;
    transition: transform var(--transition-speed);
}

.navbar-brand:hover img,
.navbar-brand.focused img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-primary) !important;
    margin: 0 0.8rem;
    transition: color var(--transition-speed);
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.focused {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-top: 60px;
    padding: 1.5rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 45vh;
    background: linear-gradient(to bottom, transparent 0%, var(--background-dark) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23141414"/></svg>');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.hero-buttons .btn {
    margin-right: 1rem;
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
}

/* Secciones de contenido */
.content-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-left: 0.5rem;
    background: linear-gradient(90deg, transparent 0%, rgba(128, 0, 128, 0.1) 100%);
    padding: 0.4rem 0 0.4rem 0.8rem;
    border-radius: 0 4px 4px 0;
    border-left: 3px solid var(--secondary-color);
}

/* Carrusel de contenidos */
.content-carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1rem;
    padding: 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.content-carousel::-webkit-scrollbar {
    height: 6px;
}

/* Cards de contenido */
.content-card {
    min-width: 200px;
    max-width: 200px;
    background-color: var(--background-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    position: relative;
}

.content-card:hover,
.content-card.focused {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(128, 0, 128, 0.5);
    z-index: 10;
}

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

.content-card-body {
    padding: 0.8rem;
}

.content-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-card-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Cards de plataforma (más grandes) */
.platform-card {
    min-width: 240px;
    max-width: 240px;
    background: linear-gradient(135deg, var(--background-card) 0%, rgba(128, 0, 128, 0.15) 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    border: 2px solid transparent;
}

.platform-card:hover,
.platform-card.focused {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(128, 0, 128, 0.6);
    border-color: var(--primary-color);
}

.platform-card img {
    width: 100%;
    height: 135px;
    object-fit: contain;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
}

.platform-card-body {
    padding: 1rem;
    text-align: center;
}

.platform-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

/* Botones */
.btn-conettam {
    background: var(--gradient-purple);
    border: none;
    color: white;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(128, 0, 128, 0.3);
}

.btn-conettam:hover,
.btn-conettam.focused {
    background: var(--gradient-red);
    box-shadow: 0 4px 15px rgba(240, 0, 0, 0.5);
    transform: translateY(-2px);
}

.btn-outline-conettam {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
    cursor: pointer;
    font-weight: 600;
}

.btn-outline-conettam:hover,
.btn-outline-conettam.focused {
    background: var(--gradient-purple);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(128, 0, 128, 0.4);
}

/* Focus visible para navegación con mando */
.focusable {
    outline: none;
    position: relative;
}

.focusable.focused::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 3px solid var(--primary-color);
    border-radius: inherit;
    pointer-events: none;
    animation: pulse-conettam 1.5s infinite;
}

@keyframes pulse-conettam {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(128, 0, 128, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 15px 5px rgba(128, 0, 128, 0.4);
    }
}

/* Badges */
.badge-new {
    background: var(--gradient-red);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    box-shadow: 0 2px 8px rgba(240, 0, 0, 0.5);
}

.badge-live {
    background-color: #00ff00;
    color: black;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 10px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Login/Register Forms */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, var(--background-dark) 0%, var(--secondary-color) 100%); */
    background: var(--primary-color);
    padding: 2rem;
}

.auth-card {
    /* background: linear-gradient(135deg, rgba(24, 24, 24, 0.95) 0%, rgba(128, 0, 128, 0.1) 100%); */
    background: var(--background-dark);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(128, 0, 128, 0.3);
    border: 1px solid rgba(128, 0, 128, 0.2);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(128, 0, 128, 0.35);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 8px rgba(128, 0, 128, 0.3);
}

.user-avatar:hover,
.user-avatar.focused {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(128, 0, 128, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .navbar-conettam {
        padding: 0.5rem 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Messages */
.alert-conettam {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.alert-success {
    background-color: rgba(0, 255, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.5);
    color: #00ff00;
}

.alert-danger {
    background-color: rgba(240, 0, 0, 0.2);
    border: 1px solid rgba(240, 0, 0, 0.5);
    color: #ff6b6b;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.5);
    color: #3498db;
}

/* Efectos adicionales de marca Conettam */
.conettam-gradient-bg {
    background: linear-gradient(135deg, rgba(128, 0, 128, 0.2) 0%, rgba(240, 0, 0, 0.2) 100%);
}

.conettam-glow {
    box-shadow: 0 0 20px rgba(128, 0, 128, 0.3), 0 0 40px rgba(240, 0, 0, 0.2);
}

.conettam-text-gradient {
    background: linear-gradient(135deg, #800080 0%, #f00000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading con colores corporativos */
.loading-conettam {
    border: 4px solid rgba(128, 0, 128, 0.2);
    border-top: 4px solid #800080;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/* Degradado animado de fondo */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(270deg, #800080, #f00000, #800080);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}
