/* TV Page Specific Styles */

/* TV Indicator Bar */
.tv-indicator-bar {
    background: #1a1a1a;
    padding: 15px 0;
    border-bottom: 3px solid var(--primary-color);
}

.indicator-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.live-indicator-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-name {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    flex: 1;
    text-align: center;
}

.btn-share-tv {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-share-tv:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Main TV Content */
.tv-main {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px 0;
}

/* Live Player */
.live-player-wrapper {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.live-player {
    position: relative;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-placeholder-live {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,122,77,0.9), rgba(255,205,0,0.9)),
                url('https://via.placeholder.com/1920x1080/000000/ffffff?text=FUN+Media+TV') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-overlay {
    text-align: center;
}

.btn-play-main {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    color: var(--primary-color);
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.btn-play-main:hover {
    transform: scale(1.1);
    background: var(--white);
}

.play-overlay p {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Live Badge Overlay */
.live-badge-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.badge-live {
    background: var(--accent-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.viewer-count {
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.control {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.control:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.volume-slider {
    width: 100px;
}

.volume-slider input {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    outline: none;
}

.volume-slider input::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
}

.time-display {
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
}

.spacer {
    flex: 1;
}

.control.quality span {
    font-size: 14px;
    font-weight: 600;
}

/* Comments Ticker */
.comments-ticker {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

.ticker-label {
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ticker-scroll {
    flex: 1;
    overflow: hidden;
}

.ticker-items {
    display: flex;
    animation: scroll-comments 30s linear infinite;
    white-space: nowrap;
}

@keyframes scroll-comments {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.comment-item {
    color: var(--white);
    padding: 0 40px;
    font-size: 14px;
}

.comment-item strong {
    color: var(--secondary-color);
    margin-right: 5px;
}

/* Video Info Section */
.video-info-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.program-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.program-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-item i {
    color: var(--primary-color);
}

/* Engagement Stats */
.engagement-stats {
    display: flex;
    gap: 10px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.stat-btn {
    background: transparent;
    border: 1px solid #e0e0e0;
    padding: 8px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-btn:hover {
    background: var(--light-color);
    transform: translateY(-2px);
}

.stat-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Program Description */
.program-description {
    margin-top: 30px;
}

.program-description h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.program-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.description-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Comment Form Section */
.comment-form-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comment-form-section h3 {
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.comment-form .form-header {
    display: flex;
    gap: 20px;
}

.user-avatar {
    font-size: 3rem;
    color: #c0c0c0;
}

.form-inputs {
    flex: 1;
}

.comment-input-wrapper {
    position: relative;
}

.comment-input-wrapper textarea {
    padding-bottom: 60px;
    resize: vertical;
}

.comment-form-actions {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-emoji, .btn-attach {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-emoji:hover, .btn-attach:hover {
    color: var(--primary-color);
}

/* Comments Section */
.comments-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.comment-filters {
    display: flex;
    gap: 10px;
}

.comment-filters button {
    background: transparent;
    border: 1px solid #e0e0e0;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-filters button:hover,
.comment-filters .filter-active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.comments-list .comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-header h5 {
    margin: 0;
    font-size: 1rem;
    color: var(--dark-color);
}

.badge-verified {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.comment-time {
    color: var(--text-secondary);
    font-size: 13px;
}

.comment-content p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.comment-item-actions {
    display: flex;
    gap: 15px;
}

.action-like, .action-reply {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.action-like:hover, .action-reply:hover {
    color: var(--primary-color);
}

.action-like.active {
    color: var(--primary-color);
}

.comment-replies {
    margin-left: 50px;
    margin-top: 20px;
}

.comment-item.reply {
    background: var(--light-color);
    padding: 15px;
    border-radius: 10px;
    border-bottom: none;
}

.comment-item.reply .comment-avatar img {
    width: 40px;
    height: 40px;
}

.btn-load-more {
    width: 100%;
    padding: 12px;
    background: var(--light-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-load-more:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Live Chat Box */
.live-chat-box {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.chat-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.online-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-messages {
    height: 350px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-message {
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: var(--white);
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-message strong {
    color: var(--primary-color);
    margin-right: 5px;
}

.chat-message.system {
    background: #e0e0e0;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.chat-message.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.chat-message.highlight strong {
    color: var(--white);
}

.chat-input {
    padding: 15px;
    background: var(--white);
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
}

.btn-send-chat {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-send-chat:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
}

/* Schedule Box - Corrigido */
.schedule-box {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.schedule-box h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule-timeline {
    position: relative;
    padding-left: 70px;
}

.schedule-timeline::before {
    content: '';
    position: absolute;
    left: 53px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.schedule-item {
    position: relative;
    padding-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.schedule-item::before {
    content: '';
    position: absolute;
    left: 47px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 2px solid var(--white);
}

.schedule-item.past {
    opacity: 0.5;
}

.schedule-item.current::before {
    background: var(--accent-color);
    width: 16px;
    height: 16px;
    left: 45px;
    animation: pulse 2s infinite;
}

.schedule-time {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    width: 40px;
}

.program-details {
    margin-left: 0;
}

.program-details h6 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.program-details p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.badge-now {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    animation: pulse 2s infinite;
}

/* Social Feed Box */
.social-feed-box {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.social-feed-box h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-post {
    padding: 15px;
    background: var(--light-color);
    border-radius: 10px;
    margin-bottom: 15px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
}

.social-post p {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.btn-follow-social {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    text-decoration: none;
}

.btn-follow-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,122,77,0.3);
    color: var(--white);
}

/* Related Programs */
.related-programs {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.related-programs h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.program-card-mini {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.program-card-mini:hover {
    background: var(--light-color);
}

.program-thumb {
    position: relative;
    flex-shrink: 0;
}

.program-thumb img {
    width: 120px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.program-thumb .duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.program-info-mini h6 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.program-info-mini p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

/* Share Modal */
.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border-radius: 10px;
    background: var(--light-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.share-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.share-option i {
    font-size: 1.5rem;
}

.share-option.facebook { color: #1877F2; }
.share-option.twitter { color: #1DA1F2; }
.share-option.whatsapp { color: #25D366; }
.share-option.linkedin { color: #0077B5; }
.share-option.telegram { color: #0088CC; }
.share-option.email { color: var(--primary-color); }

.share-link label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.link-input-group {
    display: flex;
    gap: 10px;
}

.link-input-group input {
    flex: 1;
}

.btn-copy {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
}

/* Responsive Design - Corrigido */
@media (max-width: 1199px) {
    .schedule-timeline {
        padding-left: 55px;
    }
    
    .schedule-timeline::before {
        left: 43px;
    }
    
    .schedule-item::before {
        left: 37px;
    }
    
    .schedule-item.current::before {
        left: 35px;
    }
}

@media (max-width: 991px) {
    /* Mantém a ordem correta no mobile - video primeiro */
    .order-1 { order: 1 !important; }
    .order-2 { order: 2 !important; }
    
    .live-chat-box {
        margin-top: 30px;
    }
    
    .indicator-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .channel-name {
        order: 2;
    }
    
    .tv-indicator-bar {
        padding: 10px 0;
    }
}

@media (max-width: 767px) {
    .tv-nav .btn-share span {
        display: none !important;
    }
    
    .program-title {
        font-size: 1.5rem;
    }
    
    .engagement-stats {
        justify-content: center;
    }
    
    .comment-form .form-header {
        flex-direction: column;
    }
    
    .user-avatar {
        display: none;
    }
    
    .comments-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-filters {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .schedule-timeline {
        padding-left: 50px;
    }
    
    .schedule-time {
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .btn-play-main {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .meta-item {
        width: 100%;
    }
    
    .stat-btn {
        flex: 1;
        min-width: 0;
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .stat-btn span {
        display: none;
    }
    
    .stat-btn i {
        font-size: 1.2rem;
    }
    
    .comment-replies {
        margin-left: 20px;
    }
    
    .comment-form-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .comment-form-actions .btn {
        width: 100%;
    }
    
    .action-buttons {
        order: 2;
        justify-content: center;
    }
}

/* Scrollbar Styles */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Dark Mode Support */
body.dark-mode .tv-main {
    background: #121212;
}

body.dark-mode .tv-indicator-bar {
    background: #000;
}

body.dark-mode .video-info-section,
body.dark-mode .comment-form-section,
body.dark-mode .comments-section,
body.dark-mode .live-chat-box,
body.dark-mode .schedule-box,
body.dark-mode .social-feed-box,
body.dark-mode .related-programs {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .program-title,
body.dark-mode .comment-header h5,
body.dark-mode .program-details h6 {
    color: #e0e0e0;
}

body.dark-mode .chat-messages {
    background: #2a2a2a;
}

body.dark-mode .chat-message {
    background: #333;
    color: #e0e0e0;
}

body.dark-mode .social-post,
body.dark-mode .comment-item.reply {
    background: #2a2a2a;
}

body.dark-mode .form-control {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}