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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100% !important; /* Override Bootstrap's .container max-width */
    max-width: 100% !important; /* Ensure no Bootstrap constraints */
    margin: 0 !important; /* Remove Bootstrap's auto margins */
    padding: 0 !important; /* Remove Bootstrap's default padding */
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: block; /* Always visible */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    /*background-color: #0066cc;*/
    background-color: transparent;
    border: none;
    border-radius: 3px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hamburger-menu:hover {
    background-color: #0e467e;
    transform: scale(1.05);
}

.hamburger-menu:active {
    transform: scale(0.95);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sidebar Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.sidebar-overlay.active {
    display: block;
}

/* Sidebar - collapsed by default, expands via hamburger menu */
.sidebar {
    width: 350px;
    background-color: #252525;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
    transition: transform 0.3s ease;
    /* Hidden by default - slide-out behavior */
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px 15px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 600;
}

/* Logo styling */
.sidebar-logo {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 45px;
}

.logo-dark-only {
    width: 180px;
    height: 90px;
    display: block;
    /* Show only bottom half by shifting up */
    margin-top: -45px;
    object-fit: contain;
    object-position: center bottom;
}

/* Pin button */
.pin-button {
    background: none;
    border: 1px solid #555;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #888;
}

.pin-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #777;
}

.pin-icon::before {
    content: '📌';
    font-size: 14px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.2s ease;
}

/* Pin icon - pinned state */
.pin-button.pinned .pin-icon::before {
    filter: grayscale(0%);
    opacity: 1;
}

.pin-button.pinned {
    background-color: rgba(74, 158, 255, 0.2);
    border-color: #4a9eff;
}

/* Sidebar pinned - make sidebar take up space in document flow */
body.sidebar-pinned .sidebar {
    position: relative;
    transform: none;
    height: auto;
    min-height: 100vh;
    flex-shrink: 0;
}

/* Hide overlay when pinned */
body.sidebar-pinned .sidebar-overlay {
    display: none;
}

/* Ensure body uses flexbox for pinned layout */
body.sidebar-pinned {
    display: flex;
    flex-direction: row;
}

/* Container needs to shrink when sidebar is pinned */
body.sidebar-pinned .container {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Controls */
.controls {
    padding: 15px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #333;
}

.search-input {
    /*width: 100%;*/
    padding: 10px;
    margin-bottom: 10px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #ffffff;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
}

.view-select, .filter-select, .sort-select {
    padding: 8px 12px;
    background-color: #2a2a2a;
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}

.group-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #ffffff;
    font-size: 14px;
}

.group-select:focus {
    outline: none;
    border-color: #0066cc;
}

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

.favorites-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
}

.favorites-toggle input {
    cursor: pointer;
}

.btn-refresh {
    padding: 8px 15px;
    background-color: #0066cc;
    border: none;
    border-radius: 3px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-refresh:hover {
    background-color: #0052a3;
}

/* Channel List */
.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #888;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 5px;
    background-color: #2d2d2d;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.channel-item:hover {
    background-color: #3a3a3a;
}

.channel-item.active {
    background-color: #0066cc;
}

.channel-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 3px;
    object-fit: contain;
    background-color: #1a1a1a;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-group {
    font-size: 12px;
    color: #888;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.favorite-btn.favorited {
    opacity: 1;
}

.favorite-btn:hover {
    opacity: 0.8;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #0a0a0f; /* Very dark gray outer background */
    min-width: 0;
    padding: 0; /* No padding - full width */
}

.video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    padding: 20px;
}

.video-js {
    width: 100%;
    height: 100%;
}

.program-info {
    padding: 20px;
    background-color: #252525;
    border-top: 1px solid #333;
}

#channel-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.program-details {
    font-size: 14px;
    color: #cccccc;
}

.program-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.program-time {
    color: #888;
    font-size: 13px;
    margin-bottom: 5px;
}

.program-description {
    color: #aaa;
    line-height: 1.5;
}

.program-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.btn-popout {
    padding: 8px 16px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-popout:hover {
    background-color: #0052a3;
}

.btn-popout.hidden {
    display: none;
}

/* Scrollbar */
.channel-list::-webkit-scrollbar {
    width: 8px;
}

.channel-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.channel-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.channel-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-bottom: 1px solid #333;
}

.nav-item {
    padding: 12px 15px;
    margin-bottom: 5px;
    background-color: #2d2d2d;
    border-radius: 3px;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 14px;
}

.nav-item:hover {
    background-color: #3a3a3a;
}

.nav-item.active {
    background-color: #0066cc;
}

/* Settings Page */
.settings-container {
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.settings-container h1 {
    margin-bottom: 30px;
    font-size: 32px;
}

.settings-form {
    background-color: #252525;
    padding: 30px;
    border-radius: 3px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #ffffff;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #0066cc;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #0066cc;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.btn-secondary {
    background-color: #444;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Guide modal button overrides */
#details-play-btn {
    background-color: #28a745;  /* green for Play */
}

#details-play-btn:hover {
    background-color: #218838;
}

#details-record-btn {
    background-color: #dc3545;  /* red for Record */
}

#details-record-btn:hover {
    background-color: #c82333;
}

#details-cancel-btn {
    background-color: #0066cc;  /* blue for Cancel Recording */
}

#details-cancel-btn:hover {
    background-color: #0052a3;
}

.message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 3px;
    font-size: 14px;
}

.message.success {
    background-color: #1a5928;
    color: #90ee90;
    border: 1px solid #2d7a3e;
}

.message.error {
    background-color: #5d1a1a;
    color: #ff6b6b;
    border: 1px solid #8b2e2e;
}

.message.info {
    background-color: #1a3d5d;
    color: #6bb6ff;
    border: 1px solid #2e5d8b;
}

.message.hidden {
    display: none;
}

.info-box {
    background-color: #252525;
    padding: 20px;
    border-radius: 3px;
    border-left: 4px solid #0066cc;
}

.info-box h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.info-box ul {
    margin-left: 20px;
    line-height: 1.8;
}

.info-box code {
    background-color: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Modal - Bootstrap overrides for custom styling */
#player-modal .modal-content {
    background-color: #252525;
    border-radius: 3px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
}

#player-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    background-color: #1a1a1a;
}

#player-modal .modal-header h2 {
    font-size: 18px;
    margin: 0;
    color: #ffffff;
}

#player-modal .modal-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

#player-modal .btn-close {
    opacity: 1;
}

#player-modal .btn-close:hover {
    opacity: 0.75;
}

#player-modal .modal-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    background-color: #000;
}

/* Video.js player container wrapper */
#player-modal .modal-body .video-js {
    /*width: 100% !important;
    height: 100% !important;*/ /* Fill the entire modal body */
    background-color: #000 !important;
    position: relative !important;
    display: block !important;
}

/* Modal footer for program info */
#player-modal .modal-footer {
    padding: 15px 20px !important;
    background-color: #1a1a1a !important;
    border-top: 1px solid #333 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    visibility: visible !important;
    min-height: 60px !important;
}

/* Poster and text track displays */
#player-modal .modal-body .video-js .vjs-poster,
#player-modal .modal-body .video-js .vjs-text-track-display {
    position: absolute !important;
}

/* Video element inside video.js */
#player-modal .modal-body .video-js .vjs-tech {
    /*width: 100% !important;
    height: 100% !important;*/
    display: block !important;
    object-fit: contain !important; /* Maintain aspect ratio, fit within bounds */
}

/* Control bar positioning */
#player-modal .modal-body .video-js .vjs-control-bar {
    position: relative !important;
    /*width: 100% !important;*/
    display: flex !important;
}

/* Modal footer content layout */
#player-modal .modal-footer .modal-footer-content {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

/* TMDb poster in modal footer */
#player-modal .modal-footer .modal-poster {
    flex-shrink: 0;
}

#player-modal .modal-footer .modal-poster img {
    width: 120px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

/* Program details inside modal footer */
#player-modal .modal-footer .program-details {
    flex: 1;
    color: #ffffff;
    min-width: 0;
}

#player-modal .modal-footer .program-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

#player-modal .modal-footer .program-details p {
    margin: 0;
    color: #cccccc;
    line-height: 1.5;
}

/* Program Details Modal */
#program-details-modal .modal-content {
    background-color: #252525;
    color: #ffffff;
    border: 1px solid #333;
}

#program-details-modal .modal-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

#program-details-modal .modal-body {
    background-color: #1a1a1a;
}

/* Program details content with poster */
#program-details-modal .program-details-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

#program-details-modal .details-poster {
    flex-shrink: 0;
}

#program-details-modal .details-poster img {
    width: 150px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

#program-details-modal .details-text {
    flex: 1;
    min-width: 0;
}

#program-details-modal .modal-body h3 {
    color: #5ba3e0;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

#program-details-modal .modal-body p {
    color: #cccccc;
    line-height: 1.5;
    margin: 0;
}

#program-details-modal .modal-footer {
    background-color: #1a1a1a;
    border-top: 1px solid #333;
}

/* Responsive */
@media (max-width: 1024px) {
    /* Mobile-specific adjustments */

    /* Guide page specific adjustments */

    .btn-time {
        width: 100%;
    }

    .time-display {
        width: 100%;
        text-align: center;
        margin: 8px 0;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .video-container {
        padding: 10px;
    }

    .program-info {
        padding: 15px;
    }

    .settings-container {
        padding: 15px;
    }

    /* Guide player modal - mobile sizing */
    #player-modal .modal-content {
        /*width: 95%;
        max-height: 95vh;*/
    }

    .modal-body .video-js {
        /*height: 40vh !important;
        max-height: 40vh !important;
        min-height: 250px !important;*/
    }

    .modal-body .video-js .vjs-tech {
        /*height: 100% !important;
        max-height: 40vh !important;
        min-height: 250px !important;*/
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }

    /* Even narrower channels on small phones */
    }

    /* Providers grid - single column on mobile */
    .providers-grid {
        grid-template-columns: 1fr;
    }
}

/* Provider Management */
.providers-list {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 200px);
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.provider-card {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 3px;
    padding: 20px;
    transition: all 0.2s;
}

.provider-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.provider-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.provider-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background-color: #0066cc;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.provider-details {
    margin-bottom: 15px;
}

.provider-detail {
    margin-bottom: 8px;
    font-size: 14px;
}

.provider-detail strong {
    color: #999;
    margin-right: 8px;
}

.provider-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    background-color: #444;
    color: white;
    transition: all 0.2s;
}

.btn-sm:hover {
    background-color: #555;
}

.btn-sm.btn-primary {
    background-color: #0066cc;
}

.btn-sm.btn-primary:hover {
    background-color: #0052a3;
}

.btn-sm.btn-success {
    background-color: #28a745;
}

.btn-sm.btn-success:hover {
    background-color: #218838;
}

.btn-sm.btn-danger {
    background-color: #dc3545;
}

.btn-sm.btn-danger:hover {
    background-color: #c82333;
}

.provider-type-fields {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Floating Player */
.floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    min-width: 320px;
    min-height: 240px;
    background-color: #1a1a1a;
    border: 2px solid #0066cc;
    border-radius: 3px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.floating-player.hidden {
    display: none;
}

.floating-player.dragging {
    cursor: move;
    opacity: 0.9;
}

.floating-player.minimized {
    width: 300px;
}

.floating-player.minimized .floating-player-body {
    display: none;
}

.floating-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #0066cc;
    border-radius: 6px 6px 0 0;
    cursor: move;
    user-select: none;
}

.floating-player-title {
    font-weight: 600;
    font-size: 14px;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.floating-player-controls {
    display: flex;
    gap: 8px;
}

.player-control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.player-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.floating-player-body {
    padding: 20px;
    flex: 1;
    overflow: hidden;
    position: relative;
}

#floating-video-player {
    width: 100%;
    height: auto;
    border-radius: 3px;
    margin-bottom: 10px;
}

.floating-program-info {
    font-size: 13px;
}

.floating-program-info .program-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #ffffff;
}

.floating-program-info .program-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    max-height: 60px;
    overflow-y: auto;
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    background-color: transparent;
    z-index: 10000;
    transition: background-color 0.2s;
    pointer-events: all;
}

.resize-handle:hover {
    background-color: rgba(0, 102, 204, 0.3);
}

.resize-se {
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    cursor: nwse-resize;
    border-bottom-right-radius: 6px;
}

/* Add a visible corner indicator */
.resize-se::after {
    content: '⋰';
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.resize-s {
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 15px;
    cursor: ns-resize;
}

.resize-e {
    right: 0;
    top: 30px;
    bottom: 30px;
    width: 15px;
    cursor: ew-resize;
}

/* EPG Grid Timeline Styles */
/* Cards View */
.recordings-list.cards-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.recording-card {
    background-color: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.recording-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 102, 204, 0.3);
}

.recording-card.watched {
    /* Removed opacity - keep colors normal */
}

.recording-thumbnail {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #666;
    position: relative;
}

.watched-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #00cc66;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.recording-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.badge-scheduled { background-color: #0066cc; }
.badge-recording { background-color: #cc0000; animation: pulse 1.5s infinite; }
.badge-converting { background-color: #cc8800; animation: pulse 1.5s infinite; }
.badge-completed { background-color: #00cc66; }
.badge-failed { background-color: #cc6600; }
.badge-cancelled { background-color: #666666; }
.badge-movie { background-color: #9d4edd; color: #000; }
.badge-series { background-color: #ff006e; color: #000; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Duration badge on thumbnail */
.duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

/* Episode count badge on series thumbnail */
.episode-count-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 0, 110, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

/* Thumbnail image styling */
.recording-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recording-thumbnail .no-thumbnail {
    font-size: 48px;
}

/* Storage stats container */
#storage-stats {
    background-color: #2a2a2a;
    border-radius: 3px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.storage-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.storage-info:last-child {
    margin-bottom: 0;
}

.storage-label {
    color: #999;
    font-size: 14px;
}

.storage-value {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.storage-bar {
    height: 8px;
    background-color: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.storage-used {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #00cc66);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.active-badge {
    background-color: #cc0000;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    animation: pulse 1.5s infinite;
}

/* Recording meta info row */
.recording-meta {
    display: flex;
    gap: 15px;
    margin: 8px 0;
    font-size: 13px;
    color: #888;
}

.recording-meta .duration {
    color: #0066cc;
}

.recording-meta .file-size {
    color: #888;
}

.recording-info {
    padding: 15px;
}

.recording-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recording-channel {
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.recording-time {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

.recording-description {
    color: #aaa;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recording-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-play {
    background-color: #0066cc;
    color: white;
    flex: 1;
}

.btn-play:hover {
    background-color: #0052a3;
}

.btn-delete {
    background-color: #cc3333;
    color: white;
}

.btn-delete:hover {
    background-color: #aa2222;
}

.btn-watched {
    background-color: #444;
    color: white;
}

.btn-watched:hover {
    background-color: #555;
}

/* Grid/Table View */
.recordings-list.grid-view {
    display: block;
}

.recordings-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
}

.recordings-table th {
    background-color: #1a1a1a;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #444;
}

.recordings-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
}

.recordings-table tr:hover {
    background-color: #333;
}

.recordings-table tr.watched {
    /* Removed opacity - keep colors normal */
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.file-size {
    color: #999;
    font-size: 13px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

@media (max-width: 1024px) {
    .recordings-list.cards-view {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .recordings-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .recordings-controls {
        flex-direction: column;
    }
    
    .recordings-list.cards-view {
        grid-template-columns: 1fr;
    }
    
    .recordings-table {
        font-size: 14px;
    }
    
    .recordings-table th,
    .recordings-table td {
        padding: 8px;
    }
}

/* ==========================================================================
   Logs Page Styles
   ========================================================================== */

.logs-container {
    padding: 60px 0 20px; /* Top padding for hamburger menu, no side padding */
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.logs-container h1 {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

/* Filters Panel */
.filters-panel {
    background-color: #252525;
    border-radius: 3px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: 150px 150px 1fr 1fr 2fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    grid-template-columns: unset;
}

.filter-select,
.filter-input {
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #0066cc;
}

.filter-select {
    cursor: pointer;
}

.filter-input::placeholder {
    color: #666;
}

/* Log Stats */
.logs-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #252525;
    border-radius: 3px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #999;
}

.logs-stats span {
    font-weight: 500;
}

/* Logs Table Container */
#logs-table-container {
    flex: 1;
    overflow: auto;
    background-color: #252525;
    border-radius: 3px;
    margin-bottom: 15px;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.logs-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #1a1a1a;
}

.logs-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #0066cc;
    color: #ffffff;
    white-space: nowrap;
}

.logs-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    vertical-align: top;
}

.logs-table tbody tr {
    transition: background-color 0.2s;
}

.logs-table tbody tr:hover {
    background-color: #2d2d2d;
}

/* Log Level Rows */
.log-debug {
    background-color: rgba(128, 128, 128, 0.05);
}

.log-information {
    background-color: rgba(0, 102, 204, 0.05);
}

.log-warning {
    background-color: rgba(255, 193, 7, 0.08);
}

.log-error {
    background-color: rgba(220, 53, 69, 0.08);
}

.log-critical {
    background-color: rgba(139, 0, 0, 0.15);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-debug {
    background-color: #6c757d;
    color: #ffffff;
}

.badge-information {
    background-color: #0066cc;
    color: #ffffff;
}

.badge-warning {
    background-color: #ffc107;
    color: #000000;
}

.badge-error {
    background-color: #dc3545;
    color: #ffffff;
}

.badge-critical {
    background-color: #8b0000;
    color: #ffffff;
    animation: pulse-critical 2s ease-in-out infinite;
}

@keyframes pulse-critical {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Exception Details */
.logs-table details {
    margin-top: 5px;
}

.logs-table summary {
    cursor: pointer;
    color: #0066cc;
    font-weight: 500;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.logs-table summary:hover {
    background-color: rgba(0, 102, 204, 0.1);
}

.logs-table pre {
    margin-top: 8px;
    padding: 10px;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 3px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
    color: #ff6b6b;
    max-width: 600px;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #252525;
    border-radius: 3px;
}

.pagination-controls button {
    padding: 8px 16px;
    background-color: #444;
    border: none;
    border-radius: 3px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #555;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-indicator {
    font-size: 14px;
    font-weight: 500;
    color: #999;
    min-width: 80px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .filter-row {
        grid-template-columns: 140px 140px 1fr 1fr 1.5fr auto auto auto;
    }
}

@media (max-width: 1200px) {
    .filter-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .filter-row button {
        grid-column: span 1;
    }

    .logs-table {
        font-size: 12px;
    }

    .logs-table th,
    .logs-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {
    .logs-container {
        padding: 60px 10px 10px;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .logs-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .logs-table {
        font-size: 11px;
    }

    .logs-table th,
    .logs-table td {
        padding: 8px 6px;
    }

    .logs-table pre {
        max-width: 100%;
        font-size: 10px;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }

    .pagination-controls button {
        width: 100%;
    }
}

/* Loading State */
.logs-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

/* Empty State */
.logs-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.logs-empty h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #888;
}

.logs-empty p {
    font-size: 14px;
    color: #666;
}

/* Scrollbar Styling for Logs Table */
#logs-table-container::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#logs-table-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#logs-table-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    max-width: none; /* Full width */
    margin: 0;
}

.dashboard-header {
    text-align: center;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.dashboard-header p {
    font-size: 1.1rem;
    color: #999;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.dashboard-icon {
    font-size: 3rem;
    line-height: 1;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.dashboard-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.dashboard-description {
    font-size: 0.85rem;
    color: #aaa;
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
        gap: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card {
        padding: 1rem;
        min-height: 80px;
    }

    .dashboard-icon {
        font-size: 2rem;
        min-width: 60px;
    }

    .dashboard-label {
        font-size: 0.95rem;
    }

    .dashboard-header h1 {
        font-size: 1.8rem;
    }
}


#logs-table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== MODERN DASHBOARD V2 STYLES ===== */
.modern-dashboard-v2 {
    padding: 0;
    margin: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header Section */
.dashboard-header-section {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 102, 204, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 2rem;
    backdrop-filter: blur(20px);
}

.header-content {
    max-width: none; /* Full width */
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #0066cc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-text p {
    font-size: 0.95rem;
    color: #aaa;
    margin: 0;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.status-indicator.online {
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ff4444;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.status-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.uptime-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ccc;
}

.uptime-icon {
    font-size: 1rem;
}

/* Main Dashboard Grid */
.dashboard-main-grid {
    max-width: none; /* Full width */
    margin: 0;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.column-header {
    margin-bottom: 1rem;
}

.column-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #ffffff;
}

.column-subtitle {
    font-size: 1rem;
    color: #888;
    margin: 0;
}

/* System Stats Grid */
.system-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out both;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0066cc, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover,
.stat-card.stat-hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-icon {
    font-size: 2rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.stat-info {
    flex-grow: 1;
}

.stat-title {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    transition: all 0.3s ease;
}

.stat-value.stat-animate {
    transform: scale(1.1);
    color: #0066cc;
}

.stat-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #0066cc);
    border-radius: 3px;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 0.5rem;
    font-weight: 500;
}

.network-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.network-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #ccc;
}

.network-arrow {
    color: #0066cc;
    font-weight: bold;
}

/* Action Cards */
.primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.action-card {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: slideInUp 0.6s ease-out both;
    position: relative;
}

.primary-card {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 102, 204, 0.05) 100%);
    border: 1px solid rgba(0, 102, 204, 0.3);
}

.secondary-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.primary-card:hover {
    box-shadow: 0 16px 48px rgba(0, 102, 204, 0.2);
    border-color: rgba(0, 102, 204, 0.5);
}

.secondary-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.action-link {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    gap: 1.25rem;
    height: 100%;
    min-height: 90px;
}

.primary-card .action-link {
    min-height: 120px;
}

.action-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.primary-card .action-icon {
    font-size: 3rem;
}

.action-content {
    flex-grow: 1;
}

.action-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.primary-card .action-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.action-description {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
}

.action-arrow {
    flex-shrink: 0;
    color: #0066cc;
    transition: transform 0.3s ease;
}

.action-card:hover .action-arrow {
    transform: translateX(4px);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .system-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .primary-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modern-dashboard-v2 {
        padding-top: 0;
    }

    .dashboard-header-section {
        padding: 1.5rem 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-text h1 {
        font-size: 2rem;
    }

    .dashboard-main-grid {
        padding: 1rem;
        gap: 1.5rem;
    }

    .system-stats-grid {
        grid-template-columns: 1fr;
    }

    .primary-actions,
    .secondary-actions {
        grid-template-columns: 1fr;
    }

    .header-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header-section {
        padding: 1rem;
    }

    .dashboard-main-grid {
        padding: 0.5rem;
    }

    .stat-card,
    .action-link {
        padding: 1rem;
    }

    .header-text h1 {
        font-size: 1.75rem;
    }
}
/* ===== REUSABLE PAGE HEADER COMPONENT ===== */
.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 102, 204, 0.05) 100%);
    /*border-bottom: 1px solid rgba(255, 255, 255, 0.1);*/
    padding: 1.25rem 2rem;
    backdrop-filter: blur(20px);
    /*border-radius: 12px 12px 0 0;  Round top corners to match wrapper */
    border-bottom: 1px solid lime !important;
    margin-bottom: 15px;
}

.page-header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.page-header-text {
    justify-self: start;
}

.page-header-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    background-clip: text;
    -webkit-background-clip: text;
    color: #00a4dc;
}

.page-header-text p {
    font-size: 0.95rem;
    color: #aaa;
    margin: 0;
}

.page-header-brand {
    justify-self: center;
    font-size: 2rem;
    font-weight: 800;
    color: #00a4dc;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #0066cc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header-actions {
    justify-self: end;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.page-header-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: #fff;
}

.page-header-stat-icon {
    font-size: 1.2rem;
}

.page-header-stat-label {
    color: #aaa;
    font-size: 0.85rem;
}

.page-header-stat-value {
    font-weight: 600;
    color: #00ff88;
}

/* Make main content area work with page header */
/* Reusable page container class - wrap your page content in this */
.page-container {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    border-radius: 12px;
    /* min-height: calc(100vh - 40px); */
    padding: 5px;
}

/* Shared Search Controls Container */
/* Used by Guide, Movies, Series pages for consistent dark background styling */
.search-controls {
    padding: 1.5rem;
    background-color: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.search-controls .form-control,
.search-controls .form-select {
    background-color: #252525;
    border: 1px solid #444;
    color: #ffffff;
    height: 42px;
}

.search-controls .form-control:focus,
.search-controls .form-select:focus {
    background-color: #2d2d2d;
    border-color: #0066cc;
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
}

.search-controls .form-control::placeholder {
    color: #888;
}

.search-controls .form-check-label {
    color: #ffffff;
}

/* Guide search field takes most space */
.search-controls .col-md-6 {
    flex: 1;
}

.search-controls .btn-group {
    gap: 0.5rem;
}

/* Fix page header text hidden behind hamburger menu */
.page-header-text {
    margin-left: 60px; /* Space for hamburger button */
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .page-header-text {
        margin-left: 50px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
    }

    .page-header-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .page-header-text {
        margin-left: 50px;
    }

    .page-header-text h1 {
        font-size: 1.75rem;
    }

    .page-header-brand {
        justify-self: center;
        order: 2;
    }

    .page-header-actions {
        justify-self: start;
        width: 100%;
        flex-wrap: wrap;
    }
}
