/* TUVES - Channel Show Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override body styles for channel page */
body {
    background: #000 !important;
    color: #fff !important;
    overflow-x: hidden;
}

/* Hide default layout elements on channel page */
body .container.my-4 {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

body footer {
    background: #000 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section with Player (SOLO EL PLAYER) */
.hero-section {
    margin-top: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-bottom: 0;
    width: 100vw;
    background: #000;
    position: relative;
}

.hero-background {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Video Player Section */

.player-container {
    position: relative;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    width: 100%;
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    max-height: calc(100vh - 60px);
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        transparent 30%,
        transparent 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    pointer-events: auto;
}

.live-indicator {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ff0000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: pulse 2s infinite;
    z-index: 10;
}

.viewer-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.player-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.player-loader .loading {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.offline-state, .premium-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    height: 100%;
    text-align: center;
    padding: 3rem;
    background: #0a0a0a;
}

.offline-state i, .premium-lock i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
    color: #666;
}

.offline-state h3, .premium-lock h3 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: #fff;
}

.offline-state p, .premium-lock p {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Channel Info Section (DEBAJO del player) */
.channel-info-section {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    background: #000;
    padding: 2rem 0;
}

.channel-info-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.channel-main-info {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: start;
}

.channel-avatar {
    width: 80px;
    height: 80px;
}

.avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.channel-details {
    flex: 1;
}

.channel-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.channel-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-premium {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
}

.badge-live {
    background: #ff0000;
    color: #fff;
    animation: pulse 2s infinite;
}

.badge-offline {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.channel-meta {
    display: flex;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.meta-separator {
    color: rgba(255, 255, 255, 0.3);
}

.channel-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

.channel-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.action-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 20px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #e50914;
    color: #fff;
}

.btn-primary:hover {
    background: #f40612;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* Stream Controls (for owners) */
.stream-controls {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.stream-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-block {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 10px;
}

.info-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.3rem;
}

.info-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
    word-break: break-all;
}

.control-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* Related Channels Section */
.related-section {
    padding: 3rem 1rem;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: none;
    background: #000;
}

.related-section .section-title,
.related-section .channels-grid {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.channel-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 107, 0.3);
}

.card-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    overflow: hidden;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-live-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(45deg, #ff4757, #ff6b6b);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-content {
    padding: 1rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 3rem;
}

.error-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.error-state h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.error-state p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
    .channel-main-info {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }
    
    .channel-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .channel-avatar {
        width: 60px;
        height: 60px;
    }
    
    .avatar-circle {
        font-size: 1.5rem;
    }
    
    .channel-title {
        font-size: 1.5rem;
    }
    
    .channel-info-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .channel-main-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .channel-avatar {
        width: 50px;
        height: 50px;
        grid-row: 1;
    }
    
    .channel-details {
        grid-row: 1;
    }
    
    .channel-actions {
        grid-row: 2;
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .stream-controls {
        padding: 1rem;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    .info-value {
        font-size: 0.8rem;
    }
    
    .channel-meta {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
    }
    
    .meta-separator {
        display: none;
    }
}

/* Fix for line-clamp */
.card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}