/* Global Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #181818;
    color: #e0e0e0;
}

body {
    overflow: hidden;
}

hr {
    border: 0.5px #222 solid;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Navigation Panel */
.nav-panel {
    width: 64px;
    background-color: #161616;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 0 0;
    gap: 12px;
}

.nav-panel>.material-symbols-rounded {
    background-color: transparent;
}

.material-symbols-rounded {
    font-size: 24px;
    color: #e0e0e0;
    cursor: pointer;
    transition: color 0.3s, background-color 0.3s;
    border-radius: 50%;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    font-variation-settings: 'FILL' 1;
    user-select: none;
    -moz-user-select: none;
}

.material-symbols-rounded:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-panel .active {
    color: inherit; /* Allow JavaScript to set the color */
}

/* Channel List Panel */
.channel-list-panel {
    width: 256px;
    background-color: #111;
    overflow-y: auto;
    overflow-x: hidden;
}

.channel-list-panel h2, .settings-panel h2, .dvr-list-panel h2 {
    margin: 0;
    width: 100%;
    text-align: center;
}

#channel-list {
    list-style: none;
    padding: 0;
    margin: 8px;
}

.channel-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    margin: 0;
}

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

.channel-content {
    display: flex;
    align-items: center;
}


.channel-logo-container {
    width: 48px;
    height: 48px;
    min-width: 48px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 8px;
}

.channel-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
    border-radius: 4px;
}
/*
.channel-logo {
    height: 48px;
    width: 48px;
    margin-right: 8px;
    border-radius: 4px;
}
img.channel-logo {
    height: auto;
    width: auto;
    max-height: 48px;
    max-width: 48px;
    border-radius: 4px;
}*/

.channel-name {
    color: #e0e0e0;
}

/* Player Panel */
.player-panel {
    position: relative;
    flex-grow: 1;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(100% - 280px);
}

#video-player {
    width: 100%;
    height: 100%;
    background-color: #000;
    outline: none;
    controls: false;
}

.controls {
    position: absolute;
    bottom: 0px;
    padding: 32px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    transition: opacity 0.3s;
    background: #111111bf;
    z-index: inherit;
}

.player-panel:hover .controls {
    opacity: 1;
}

.controls .material-symbols-rounded {
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.controls button {
    background-color: #00bcd4;
    border: none;
    padding: 10px;
    color: #fff;
    cursor: pointer;
    margin: 0 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #0097a7;
}

#record-btn.recording {
    color: #fff;
    background: red;
}

.settings-panel {
    position: relative;
    width: 256px;
    background-color: #111;
    color: #e0e0e0;
    overflow: hidden;
    overflow-y: auto;
    height: 100vh;
}

.settings-subpage {
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.settings-subpage h3 {
    width: 100%;
    text-align: center;
}

.settings-panel nav ul {
    list-style: none;
    padding: 0;
    margin: 8px;
}

.settings-panel nav li {
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.settings-panel nav li:hover {
    background-color: #222;
}

.settings-panel nav li .material-symbols-rounded {
    margin-right: 8px;
    font-size: 24px;
    color: var(--accent-color);
}

.dvr-list-panel {
    width: 256px;
    background-color: #111;
    overflow-y: scroll;
    overflow-x: hidden;
}

#dvr-list {
    list-style: none;
    padding: 0;
    margin: 8px;
}

.dvr-item {
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    margin: 0;
}

.dvr-item:hover {
    background-color: #222;
}

.settings-subpage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    display: none;
    border-radius: 8px;
}

.settings-subpage {
    display: none; /* Ensure all subpages are hidden by default */
}

.back-button {
    cursor: default;
    background: none;
    border: none;
    font-size: 24px;
    margin-right: 8px;
    transition: color 0.3s;
    margin-left: 10px;
}
.back-button:hover {
    background: none
}

.topbar {
    position: sticky;
    top: 0;
    background-color: #141414;
    height: 60px;
    display: flex;
    padding: 0;
    z-index: 1;
    align-items: center;
    justify-content: space-between;
}

.ui-card {
    background: transparent;
    border-radius: 8px;
    margin: 8px;
    padding: 8px;
}

.ui-card:hover {
    background: #222;
}

.spacer {
    cursor: default;
    background: none;
    border: none;
    font-size: 24px;
    color: transparent;
    margin-right: 8px;
    transition: color 0.3s;
    margin-right: 10px;
}

.spacer:hover {
    cursor: default;
    background: none;
    border: none;
    font-size: 24px;
    color: transparent;
    margin-right: 8px;
    transition: color 0.3s;
    margin-right: 10px;
}

#playlist-list {
    list-style: none;
    padding: 0;
    margin: 8px;
}

.playlist-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    margin: 0;
    justify-content: space-between;
}

.playlist-item:hover {
    background-color: #222;
}

.playlist-content {
    display: flex;
    align-items: center;
}

.playlist-name {
    color: #e0e0e0;
    flex-grow: 1; /* Allow the name to take available space */
}

.playlist-item button {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 0 0 4px;
}

:root {
    --accent-color: #fb3e40; /* Default accent color */
}

/* Subtitle styling */
video::cue {
    font-size: var(--subtitle-font-size, 16px); /* Default font size */
    color: var(--subtitle-color, #ffffff); /* Default color */
    white-space: pre-wrap;
}

input#accent-color, input#subtitle-color {
    width: 32px;
    height: 32px;
    border: none;
    outline: 7px solid #222;
    border-radius: 50%;
    outline-offset: -6px;
}

.two-column {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input#subtitle-font-size {
    background: none;
    border: none;
    color: #e0e0e0;
    font-family: 'Inter';
    font-size: inherit;
    outline: none;
    text-align: right;
}

.tc-label {
    display: flex;
    align-items: center;
}

.tc-label i {
    margin-right: 8px;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

h5 {
    margin: 16px;
}