:root {
    --primary-color: #343cdb;
    --secondary-color: #FFD700;
    --background-color: #FFFFFF;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --card-shadow: 0 2px 10px rgba(0,0,0,0.05);
    --header-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.logo-title {
    display: flex;
    align-items: center;
    margin-right: auto; /* Esto empuja el logo y título hacia la izquierda */
}

.logo-title h1 {
    margin-left: 15px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
}

/* HEADER Y FOOTER FIJOS */
#header-component,
#navigation-component {
    flex-shrink: 0;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white; /* Añade fondo para que el contenido no se vea detrás */
}

#footer-player-component,
#footer-content,
footer.footer {
    flex-shrink: 0;
    width: 100%;
}

.main-content {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0; /* Importante para que flexbox calcule bien el alto */
}

/* Responsive Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px 0;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}
/* CONTENEDOR PRINCIPAL */
.app-main-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Importante para scroll interno */
}

/* WRAPPER CON SIDEBARS */
.main-wrapper {
    display: flex;
    flex: 1;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
    min-height: 0; /* Permite scroll interno */
}

/* CONTENIDO PRINCIPAL - CORREGIDO */
.main-content-area {
    flex: 1;
    order: 2;
    padding: 20px;
    min-height: 500px;
    overflow-y: auto; /* Scroll interno si es necesario */
}


/* Responsive Grid */
.grid-container {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-container.publicidad-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Common Components */
.card {
    border-radius: 15px;
    border: none;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.now-playing {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.now-playing i {
    font-size: 1.5rem;
}

.now-playing-text {
    flex: 1;
}

.now-playing-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.now-playing-desc {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.playing-animation {
    animation: pulse 2s infinite;
}
body {
    background-image: url('../img/CieloFondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
  html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
  }

  /* Contenedor del fondo */
  body {
    position: relative;
  }

  /* Fondo principal */
  .background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: -1;
  }

  /* Fondo visible */
  .background.active {
    opacity: 1;
  }

.footer {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}
        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        .footer p {
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
            font-weight: 500;
            letter-spacing: 0.5px;
        }
        
        .footer-logo {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.8rem;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
        }
        
        .footer-copyright {
            font-size: 0.95rem;
            opacity: 0.9;
        }
        
        .footer-divider {
            width: 80px;
            height: 3px;
            background-color: #2980b9;
            margin: 0.8rem auto;
            border-radius: 2px;
        }
        
        @media (max-width: 768px) {
            .footer p {
                font-size: 1rem;
            }
            
            .footer-logo {
                font-size: 1.3rem;
            }
        }

        

         /* Contenedor principal con sidebars laterales */
        .main-wrapper {
            display: flex;
            flex: 1;
            max-width: 1800px;
            margin: 0 auto;
            width: 100%;
        }

        /* Sidebars laterales */
       .sidebar {
    width: 280px;
    padding: 20px 15px;
    position: sticky;
    top: 140px; /* Ajusta según la altura de tu header */
    height: calc(100vh - 200px);
    overflow-y: auto;
}

        .sidebar-left {
    order: 1;
}
        .main-content {
            flex: 1;
            order: 2;
            padding: 20px;
            min-height: 500px;
        }

        .sidebar-right {
    order: 3;
}
        .sidebar-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}
        .qr-code {
            width: 100%;
            max-width: 200px;
            margin: 0 auto 15px;
            display: block;
        }

        .social-links {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 15px;
        }

        .social-link {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 15px;
            background: #f8f9fa;
            border-radius: 8px;
            text-decoration: none;
            color: var(--text-color);
            transition: all 0.3s ease;
        }

        .social-link:hover {
            background: var(--primary-color);
            color: white;
            transform: translateX(5px);
        }

        .social-link i {
            font-size: 1.2rem;
            width: 20px;
        }

        .content-section {
            display: none;
            animation: fadeIn 0.3s ease-in;
        }

        .content-section.active {
            display: block;
        }

        /* Responsive Grid */
        .grid-container {
            display: grid;
            gap: 20px;
            grid-template-columns: 1fr;
        }

        @media (min-width: 768px) {
            .grid-container {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .grid-container.publicidad-grid {
                grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            }
        }

        @media (min-width: 1024px) {
            .grid-container {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* Common Components */
        .card {
            border-radius: 15px;
            border: none;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            overflow: hidden;
            background: white;
        }

        .card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .card-header {
            background-color: white;
            border-bottom: 1px solid var(--border-color);
            padding: 15px 20px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .card-header i {
            color: var(--primary-color);
            font-size: 1.2rem;
        }

        .loading {
            text-align: center;
            padding: 40px 20px;
            color: #666;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .empty-state i {
            font-size: 3rem;
            margin-bottom: 15px;
            color: #ddd;
        }

        .now-playing {
            background: linear-gradient(135deg, var(--primary-color), #2980b9);
            color: white;
            padding: 15px 20px;
            border-radius: 10px;
            margin: 20px 0;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .now-playing i {
            font-size: 1.5rem;
        }

        .now-playing-text {
            flex: 1;
        }

        .now-playing-title {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 5px;
        }

        .now-playing-desc {
            font-size: 0.85rem;
            opacity: 0.9;
        }

       
        /* Responsive adjustments */
        @media (max-width: 1200px) {
            .sidebar {
                width: 250px;
            }
        }

        @media (max-width: 992px) {
            .sidebar {
                display: none;
            }
            
            .main-content {
                padding: 20px 10px;
            }
        }

        @media (max-width: 768px) {
            .logo-text {
                font-size: 1.4rem;
            }
            
            .nav-link {
                padding: 12px 10px;
                font-size: 0.9rem;
            }
            
            .player-container {
                flex-direction: column;
                gap: 10px;
            }
            
            .player-info {
                text-align: center;
            }
        }


.download-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.download-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Video Player Styles */
.video-app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.video-loading {
    text-align: center;
    padding: 40px 20px;
}

.video-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.video-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.video-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Video Section */
.video-section {
    flex: 1;
    min-width: 0;
}

.video-info {
    margin-bottom: 15px;
}

.video-info h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.video-info p {
    color: #666;
    margin-bottom: 0;
}

.video-player-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.video-player-container video {
    width: 100%;
    height: auto;
    display: block;
}

.video-status {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.video-format-info {
    padding: 0 15px 10px;
}

/* Chat Section */
.chat-section {
    width: 350px;
    min-width: 350px;
}

.chat-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.chat-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.auth-section {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.auth-prompt {
    margin-bottom: 15px;
    text-align: center;
    color: #666;
}

.btn-google {
    background: #db4437;
    border: none;
    color: white;
}

.btn-google:hover {
    background: #c23321;
    color: white;
}

.btn-facebook {
    background: #4267B2;
    border: none;
    color: white;
}

.btn-facebook:hover {
    background: #365899;
    color: white;
}

.user-info-section {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.chat-messages-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    max-width: 85%;
}

.chat-message.own-message {
    align-self: flex-end;
}

.chat-message.other-message {
    align-self: flex-start;
}

.message-content {
    background: #f1f3f5;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.own-message .message-content {
    background: #007bff;
    color: white;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.message-avatar-default {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #6c757d;
}

.message-sender {
    font-weight: 500;
    font-size: 0.85rem;
}

.own-message .message-sender {
    color: rgba(255, 255, 255, 0.9);
}

.other-message .message-sender {
    color: #495057;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.message-text {
    word-wrap: break-word;
    line-height: 1.4;
}

.chat-input-section {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-app-container {
        padding: 15px;
    }
    
    .video-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .chat-section {
        width: 100%;
        min-width: auto;
        order: 2;
    }
    
    .video-section {
        order: 1;
    }
    
    .chat-sidebar {
        height: 400px;
    }
    
    .video-info h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .video-app-container {
        padding: 10px;
    }
    
    .chat-sidebar {
        height: 350px;
    }
    
    .chat-messages {
        padding: 10px;
    }
    
    .chat-header,
    .auth-section,
    .user-info-section,
    .chat-input-section {
        padding: 12px 15px;
    }
}

/* Scrollbar personalizado */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Estados de carga */
.d-none {
    display: none !important;
}

.browser-help {
    text-align: center;
}
        