/* ===== RESPONSIVE CSS FOR LIVE PAGE ===== */
/* Mobile First Approach */

/* Extra Small Devices (Portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        padding-top: 0;
    }

    /* Main Container */
    .main-container {
        margin: 60px auto 16px;
        padding: 0 8px;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Video Container */
    .video-container {
        border-radius: 0;
        margin-bottom: 8px;
    }

    /* Video Info */
    .video-title {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .video-meta {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .video-stats {
        font-size: 13px;
    }

    .video-actions {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 4px;
    }

    .action-button {
        font-size: 13px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    /* Channel Info */
    .channel-info {
        padding: 12px 0;
        gap: 12px;
    }

    .channel-avatar {
        width: 36px;
        height: 36px;
    }

    .channel-name {
        font-size: 14px;
    }

    .channel-subscribers {
        font-size: 12px;
    }

    .subscribe-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Description */
    .video-description {
        padding: 12px;
        margin-bottom: 16px;
        border-radius: 8px;
    }

    .description-content {
        font-size: 13px;
    }

    .show-more {
        font-size: 13px;
        margin-top: 6px;
    }

    /* Comments */
    .comments-section {
        margin-top: 16px;
        padding-top: 16px;
    }

    .comments-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .comments-count {
        font-size: 16px;
    }

    .comment-form {
        padding: 12px;
        gap: 12px;
    }

    .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .comment-input {
        font-size: 14px;
        padding: 8px 0;
    }

    .comment-actions {
        gap: 8px;
    }

    .comment-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .comment {
        gap: 12px;
        margin-bottom: 16px;
    }

    .comment .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .comment-author {
        font-size: 13px;
    }

    .comment-time {
        font-size: 11px;
    }

    .comment-text {
        font-size: 13px;
        line-height: 1.4;
    }

    .comment-actions-row {
        gap: 16px;
    }

    .comment-action {
        font-size: 12px;
    }

    /* Playlist Panel */
    .playlist-panel {
        order: 2;
        position: static;
        max-height: none;
        border-radius: 8px;
        padding: 8px;
    }

    .playlist-header {
        font-size: 15px;
        padding: 8px;
    }

    .playlist-item {
        padding: 8px;
        gap: 8px;
        border-radius: 8px;
    }

    .playlist-thumbnail {
        width: 120px;
        height: 68px;
        min-width: 120px;
    }

    .playlist-title {
        font-size: 13px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }

    .playlist-channel,
    .playlist-views {
        font-size: 11px;
    }

    .playlist-duration {
        font-size: 11px;
        padding: 2px 4px;
    }

    /* Ad Section */
    .ad-section {
        margin-bottom: 16px;
    }

    .ad-label {
        font-size: 10px;
    }

    .ad-content {
        padding: 12px;
    }

    .ad-title {
        font-size: 13px;
    }

    .ad-description {
        font-size: 12px;
    }

    /* Sidebar */
    .sidebar {
        width: 90%;
        max-width: 280px;
        top: 56px;
        height: calc(100vh - 56px);
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
    }

    .sidebar-title {
        font-size: 10px;
        padding: 8px 15px;
        letter-spacing: 0.8px;
    }

    .sidebar-section {
        padding: 10px 0;
        margin-bottom: 6px;
    }

    .menu-item {
        padding: 10px 15px;
        font-size: 13px;
    }

    .menu-item i {
        font-size: 15px;
        margin-right: 12px;
    }

    .submenu {
        margin-left: 15px;
    }

    .submenu .menu-item {
        padding-left: 40px;
        font-size: 12px;
    }

    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    /* Video Controls */
    .video-controls {
        padding: 8px;
    }

    .control-buttons {
        gap: 8px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

    .control-btn .icon {
        width: 18px;
        height: 18px;
    }

    .time-display {
        font-size: 12px;
    }

    /* Live Indicator */
    .live-indicator {
        padding: 4px 8px;
        font-size: 11px;
        top: 8px;
        right: 8px;
    }

    /* Player Logo */
    .player-logo {
        width: 40px;
        height: 40px;
        top: 8px;
        left: 8px;
    }

    .logo-text {
        font-size: 6px;
    }

    /* Settings Button */
    .settings-btn {
        width: 36px;
        height: 36px;
        bottom: 60px;
        right: 8px;
    }

    /* Quality Selector */
    .quality-selector {
        padding: 4px 8px;
        font-size: 11px;
        bottom: 60px;
        left: 8px;
    }

    /* Daily Verse Notification */
    .daily-verse-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 16px;
    }

    .verse-title {
        font-size: 13px;
    }

    .verse-content {
        font-size: 12px;
    }

    .verse-reference {
        font-size: 11px;
    }

    /* Autoplay Controls */
    .autoplay-controls {
        padding: 8px;
    }

    .autoplay-toggle {
        font-size: 13px;
    }
}

/* Small Devices (Landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .main-container {
        margin: 70px auto 20px;
        padding: 0 12px;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .video-title {
        font-size: 18px;
    }

    .playlist-panel {
        order: 2;
        position: static;
        max-height: none;
    }

    .playlist-item {
        padding: 10px;
    }

    .playlist-thumbnail {
        width: 140px;
        height: 79px;
    }

    .sidebar {
        width: 280px;
    }

    .comment-form {
        padding: 14px;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-container {
        margin: 75px auto 24px;
        padding: 0 16px;
        grid-template-columns: 1fr 340px;
        gap: 20px;
    }

    .video-title {
        font-size: 19px;
    }

    .playlist-panel {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
    }

    .playlist-item {
        padding: 10px;
    }

    .playlist-thumbnail {
        width: 140px;
        height: 79px;
    }

    .video-actions {
        flex-wrap: wrap;
    }

    .sidebar {
        width: 280px;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .main-container {
        margin: 80px auto 24px;
        padding: 0 20px;
        grid-template-columns: 1fr 380px;
        gap: 24px;
    }

    .video-title {
        font-size: 20px;
    }

    .playlist-panel {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
    }

    .playlist-thumbnail {
        width: 160px;
        height: 90px;
    }
}

/* Extra Large Devices (Large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .main-container {
        margin: 80px auto 24px;
        padding: 0 24px;
        grid-template-columns: minmax(0, 1fr) 402px;
        gap: 24px;
    }

    .playlist-panel {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
    }
}

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .main-container {
        margin-top: 60px;
    }

    .sidebar {
        top: 50px;
        height: calc(100vh - 50px);
    }

    .playlist-panel {
        position: static;
        max-height: none;
    }

    .daily-verse-notification {
        display: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .video-container {
        image-rendering: -webkit-optimize-contrast;
    }

    .playlist-thumbnail img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .sidebar-overlay,
    .video-controls,
    .comment-form,
    .action-button,
    .subscribe-button,
    .daily-verse-notification {
        display: none !important;
    }

    .main-container {
        grid-template-columns: 1fr;
        margin: 0;
        padding: 0;
    }

    .video-container {
        border-radius: 0;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .sidebar {
        transition: none;
    }

    .submenu {
        transition: none;
    }

    .menu-item .arrow {
        transition: none;
    }
}

/* Accessibility: High Contrast Mode */
@media (prefers-contrast: high) {
    .menu-item {
        border: 1px solid currentColor;
    }

    .action-button,
    .subscribe-button,
    .comment-btn {
        border: 2px solid currentColor;
    }

    .sidebar {
        border-right: 2px solid currentColor;
    }
}
