:root {
      --primary-bg: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
      --secondary-bg: rgba(30, 30, 46, 0.95);
      --accent-color: #6366f1;
      --accent-hover: #4f46e5;
      --text-primary: #ffffff;
      --text-secondary: #a1a1aa;
      --border-color: rgba(255, 255, 255, 0.1);
      --shadow-color: rgba(0, 0, 0, 0.3);
      --glass-bg: rgba(255, 255, 255, 0.05);
      --glass-border: rgba(255, 255, 255, 0.1);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      padding: 0;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: var(--primary-bg);
      background-attachment: fixed;
      color: var(--text-primary);
      overflow-x: hidden;
      overflow-y: auto;
      min-height: 100vh;
    }    /* Header */
    .header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--glass-border);
      padding: 0.5rem 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 45px;
      margin: 0.25rem 0.5rem;
      border-radius: 12px;
      top: 0.25rem;
      right: 0.5rem;
      left: 0.5rem;
      width: calc(100% - 1rem);
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 1.5rem;
    }    .logo {
      font-size: 1.2rem;
      font-weight: 700;
      background: linear-gradient(45deg, var(--accent-color), #8b5cf6);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .header-controls {
      display: flex;
      gap: 1rem;
      align-items: center;
    }

    #muteButton {
      display: flex; /* Ensure the button is visible */
      justify-content: center;
      align-items: center;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      padding: 0.5rem;
      color: var(--text-primary);
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 1.2rem;
      width: 40px;
      height: 40px;
    }

    #muteButton:hover {
      background: var(--glass-bg);
      border-color: var(--accent-color);
      transform: translateY(-2px);
    }

    #muteButton.muted {
      background: linear-gradient(135deg, #ef4444, #dc2626);
      border-color: #ef4444;
      color: white;
    }

    #muteButton.muted:hover {
      background: linear-gradient(135deg, #dc2626, #b91c1c);
    }

    #volumeSlider {
      -webkit-appearance: none;
      appearance: none;
      width: 100px;
      height: 6px;
      border-radius: 3px;
      background: var(--glass-border);
      outline: none;
      cursor: pointer;
      transition: opacity 0.2s ease;
    }

    #volumeSlider:hover {
      opacity: 1;
    }

    #volumeSlider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--accent-color);
      cursor: pointer;
      border: 2px solid rgba(255, 255, 255, 0.3);
      transition: transform 0.2s ease;
    }

    #volumeSlider::-webkit-slider-thumb:hover {
      transform: scale(1.2);
    }

    #volumeSlider::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--accent-color);
      cursor: pointer;
      border: 2px solid rgba(255, 255, 255, 0.3);
    }

    #volumeSlider::-moz-range-track {
      height: 6px;
      border-radius: 3px;
      background: var(--glass-border);
    }

    /* Main Layout */
    .main-container {
      display: flex;
      margin-top: 55px;
      min-height: calc(100vh - 55px);
    }.side-menu {
      position: fixed;
      left: 0;
      top: 55px;
      width: 280px;
      height: calc(100vh - 55px);
      background: var(--glass-bg);
      backdrop-filter: blur(15px);
      border-right: 1px solid var(--glass-border);
      padding: 1.5rem;
      overflow-y: auto;
      z-index: 50;
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }    .side-menu.hidden {
      transform: translateX(-100%);
    }

    /* Mobile side menu overlay */
    @media screen and (max-width: 768px) {
      .side-menu {
        z-index: 150;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
      }
      
      .side-menu:not(.hidden) {
        transform: translateX(0);
      }
    }

    .content-area {
      flex: 1;
      margin-left: 280px;
      transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .content-area.expanded {
      margin-left: 0;
    }

    #channelPicker {
      z-index: 3;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 1.5rem;
      padding: 2rem;
      max-width: 1400px;
      margin: 0 auto;
      position: relative;
    }    #videoContainer {
      z-index: 1;
      position: fixed;
      top: 55px;
      left: 0;
      width: 100%;
      height: calc(100vh - 55px);
      background: #000;
      display: none;
    }

    .video-element {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .channel-button img {
      width: 100%;
      height: 80px;
      object-fit: cover;
      border-radius: 12px;
      margin-bottom: 0.5rem;
      transition: transform 0.3s ease;
    }    .channel-button-support {
      background: linear-gradient(135deg, #8b5cf6, #6366f1);
      border: none;
      border-radius: 8px;
      padding: 0.5rem 1rem;
      color: white;
      font-weight: 600;
      font-size: 0.8rem;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    }    .channel-button-support:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
      background: linear-gradient(135deg, #7c3aed, #6d28d9);
    }

    .channel-button {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      padding: 1rem;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      color: var(--text-primary);
      text-align: center;
      font-size: 0.85rem;
      font-weight: 500;
      position: relative;
      overflow: hidden;
      min-height: 120px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .channel-button::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
      transition: left 0.5s;
    }

    .channel-button:hover::before {
      left: 100%;
    }

    .channel-button:hover {
      transform: translateY(-4px);
      background: var(--glass-bg);
      border-color: var(--accent-color);
      box-shadow: 0 8px 32px var(--shadow-color);
    }

    .channel-button:hover img {
      transform: scale(1.05);
    }    /* Mobile optimizations */
    @media screen and (max-width: 768px) {
      .header {
        padding: 0.75rem 1rem;
        height: 55px;
        margin: 0.25rem;
        width: calc(100% - 0.5rem);
      }
      
      .header-left {
        gap: 1rem;
      }
      
      .logo {
        font-size: 1.1rem;
      }
      
      #backButton {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        font-weight: 600;
        min-width: 120px;
        border-radius: 16px;
        background: var(--accent-color);
        border-color: var(--accent-color);
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
      }
      
      #backButton:hover {
        background: var(--accent-hover);
        border-color: var(--accent-hover);
        transform: scale(1.05);
      }
      
      .channel-button-support {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
      }
      
      .side-menu {
        width: 100%;
        transform: translateX(-100%);
        top: 65px;
        height: calc(100vh - 65px);
      }
      
      .side-menu.visible {
        transform: translateX(0);
      }
      
      .content-area {
        margin-left: 0;
      }
      
      .main-container {
        margin-top: 65px;
        min-height: calc(100vh - 65px);
      }
      
      #videoContainer {
        top: 65px;
        height: calc(100vh - 65px);
      }
      
      #channelPicker {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
        padding: 1rem;
      }
      
      .channel-button {
        padding: 0.75rem;
        min-height: 110px;
        font-size: 0.8rem;
      }
      
      .channel-button img {
        height: 65px;
      }
    }    @media screen and (max-width: 480px) {
      .header {
        padding: 0.5rem 0.75rem;
        height: 50px;
        margin: 0.2rem;
        width: calc(100% - 0.4rem);
      }
      
      .logo {
        font-size: 1rem;
      }
      
      #backButton {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: 100px;
      }
      
      .channel-button-support {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
      }
      
      .side-menu {
        top: 60px;
        height: calc(100vh - 60px);
        padding: 1rem;
      }
      
      .main-container {
        margin-top: 60px;
        min-height: calc(100vh - 60px);
      }
      
      #videoContainer {
        top: 60px;
        height: calc(100vh - 60px);
      }
      
      #channelPicker {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
        padding: 0.75rem;
      }
      
      .channel-button {
        padding: 0.5rem;
        min-height: 95px;
        font-size: 0.75rem;
      }
      
      .channel-button img {
        height: 55px;
      }
      
      .channel-menu-item {
        padding: 1rem 0.75rem;
        font-size: 0.85rem;
      }
      
      .channel-menu-item img {
        width: 25px !important;
        height: 25px !important;
      }
    }

    @media screen and (max-height: 600px) {
      .channel-button {
        min-height: 80px;
        font-size: 0.75rem;
      }
      
      .channel-button img {
        height: 50px;
      }
    }    /* Mobile touch improvements */
    @media (hover: none) and (pointer: coarse) {
      .channel-button {
        min-height: 130px;
        padding: 1rem;
      }
      
      .channel-button img {
        height: 75px;
      }
      
      .channel-menu-item {
        padding: 1rem;
        min-height: 50px;
        font-size: 1rem;
      }
      
      #backButton {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        min-width: 140px;
        min-height: 48px;
      }
      
      .channel-button-support {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 40px;
      }
    }

    @media screen and (orientation: portrait) and (min-height: 600px) and (min-width: 600px) {
      #channelPicker {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      }
      
      .channel-button {
        min-height: 140px;
        font-size: 0.9rem;
      }
      
      .channel-button img {
        height: 90px;
      }
    }    @media screen and (orientation: landscape) and (min-width: 900px) {
      #channelPicker {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      }
      
      .channel-button {
        min-height: 110px;
      }
      
      .channel-button img {
        height: 70px;
      }
    }

    /* Extra small mobile devices */
    @media screen and (max-width: 375px) {
      .header {
        padding: 0.4rem 0.6rem;
        height: 48px;
      }
      
      .logo {
        font-size: 0.9rem;
      }
      
      #backButton {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
        font-weight: 700;
        min-width: 110px;
        background: var(--accent-color);
        border: 2px solid var(--accent-color);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
      }
      
      .channel-button-support {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
      }
      
      #channelPicker {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
      }
      
      .channel-button {
        padding: 0.4rem;
        min-height: 85px;
        font-size: 0.7rem;
      }
      
      .channel-button img {
        height: 45px;
      }
      
      .channel-menu-item {
        padding: 0.8rem 0.6rem;
        font-size: 0.8rem;
      }
    }/* Control buttons */
    #backButton {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      padding: 0.5rem 1rem;
      color: var(--text-primary);
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      display: none;
      font-size: 0.9rem;
    }    #backButton:hover {
      background: var(--glass-bg);
      border-color: var(--accent-color);
      transform: translateY(-2px);
    }

    #muteButton {
      display: flex; /* Ensure the button is visible */
      justify-content: center;
      align-items: center;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      padding: 0.5rem;
      color: var(--text-primary);
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 1.2rem;
      width: 40px;
      height: 40px;
    }

    #muteButton:hover {
      background: var(--glass-bg);
      border-color: var(--accent-color);
      transform: translateY(-2px);
    }

    #muteButton.muted {
      background: linear-gradient(135deg, #ef4444, #dc2626);
      border-color: #ef4444;
      color: white;
    }

    #muteButton.muted:hover {
      background: linear-gradient(135deg, #dc2626, #b91c1c);
    }

/* Remove toggle button styles - using only side menu */

    /* Special button styling */
    #showUSChannels {
      background: linear-gradient(135deg, #f59e0b, #d97706);
      color: white;
      font-weight: 600;
      border: none;
      box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }

    #showUSChannels:hover {
      background: linear-gradient(135deg, #d97706, #b45309);
      box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    }

    /* Loading animation */
    .loading {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 200px;
      font-size: 1.1rem;
      color: var(--text-secondary);
    }

    .loading::after {
      content: '';
      width: 20px;
      height: 20px;
      margin-left: 10px;
      border: 2px solid var(--accent-color);
      border-top: 2px solid transparent;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* Iframe container */
    .iframe-container {
      position: relative;
      width: 100%;
      height: 100%;
      background: #000;
    }
    
    .iframe-container iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
    }

    /* Scrollbar styling */
    ::-webkit-scrollbar {
      width: 8px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: var(--glass-bg);
      border-radius: 4px;
      border: 1px solid var(--glass-border);
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent-color);
    }
    
    .channel-menu-item {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        color: var(--text-secondary);
        font-weight: 500;
        border: 1px solid transparent;
        font-size: 0.9rem;
    }
    .channel-menu-item:hover, .channel-menu-item.active {
        background: var(--glass-bg);
        border-color: var(--accent-color);
        color: var(--text-primary);
        transform: translateX(4px);
    }
    .channel-menu-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #channel-input-display {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 2em;
    z-index: 1001;
    font-family: 'Courier New', Courier, monospace;
}

#channel-input-display.hidden {
    display: none;
}

#channel-input-display span {
    margin: 0 5px;
}

#channel-info-overlay {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    font-size: 1.2em;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.5s ease;
}

#channel-info-overlay.hidden {
    display: none;
}

#channel-info-overlay.fade-out {
    opacity: 0;
}

.channel-info-number {
    font-weight: 700;
    font-size: 1.4em;
    color: var(--accent-color);
}

.channel-info-name {
    font-weight: 500;
}

/* Help Button */
#helpButton {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    font-family: inherit;
}

#helpButton:hover {
    background: var(--glass-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Help Modal */
.help-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-backdrop.hidden {
    display: none;
}

.help-modal {
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.help-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.help-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.help-modal-close:hover {
    color: var(--text-primary);
}

.help-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.help-shortcut {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
}

.help-shortcut kbd {
    display: inline-block;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-family: 'Inter', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    min-width: 28px;
    text-align: center;
}

.help-shortcut span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
