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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    font-size: 16px;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.help-text {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #999;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 24px;
    color: #667eea;
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* TV Selection */
.tv-selection {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tv-selection h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.tv-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tv-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 30px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.tv-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.tv-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: scale(1.05);
}

.tv-btn .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.tv-btn .label {
    font-size: 20px;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.tv-btn .desc {
    font-size: 13px;
    opacity: 0.9;
}

/* Search Section */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-box label {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.search-box input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

/* Results Section */
.results-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h3 {
    color: #667eea;
    font-size: 20px;
}

.results-content {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

.results-content h4 {
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

.results-content p {
    margin-bottom: 15px;
}

.results-content ul, .results-content ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.results-content li {
    margin-bottom: 8px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .tv-buttons {
        grid-template-columns: 1fr;
    }
    
    .tv-btn {
        padding: 25px 15px;
    }
    
    .tv-btn .icon {
        font-size: 40px;
    }
    
    .tv-btn .label {
        font-size: 18px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 15px;
    }
    
    .tv-selection, .search-section, .results-section {
        padding: 20px;
    }
}
/* ============================================
   LOGOS
   ============================================ */

/* Logo principal en página de login */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-main {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    animation: fadeInDown 0.8s ease-out;
}

/* Logo pequeño en el header */
.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-header {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Animación suave de entrada */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive: ajustar tamaños en móviles */
@media (max-width: 768px) {
    .logo-main {
        max-width: 140px;
    }
    
    .logo-header {
        width: 38px;
        height: 38px;
    }
    
    header h1 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .logo-main {
        max-width: 120px;
    }
    
    .logo-header {
        width: 32px;
        height: 32px;
    }
    
    .header-logo {
        gap: 8px;
    }
    
    header h1 {
        font-size: 16px;
    }
}
/* ============================================
   HEADER MEJORADO
   ============================================ */

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0; /* Permite que el texto se recorte si es muy largo */
}

.header-left h1 {
    margin: 0;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .header-content {
        flex-wrap: nowrap;
    }
    
    .header-left h1 {
        font-size: 15px;
    }
    
    .logo-header {
        width: 32px;
        height: 32px;
    }
    
    .btn-logout {
        padding: 6px 12px;
        font-size: 13px;
    }
}