/* roboto-300 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/roboto-v47-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* roboto-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/roboto-v47-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* roboto-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/roboto-v47-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* roboto-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/roboto-v47-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

:root {
    --bg-color: #121212;
    --container-bg-color: #1E1E1E;
    --panel-bg-color: #282828;
    --item-bg-color: #333333;
    --item-hover-bg-color: #444444;
    --text-color: #E0E0E0;
    --text-secondary-color: #B0B0B0;
    --accent-color: #E43F5A;
    --accent-hover-color: #D3364A;
    --border-color: #404040;
    --box-shadow-light: 0 2px 5px rgba(0,0,0,0.2);
    --box-shadow-medium: 0 4px 8px rgba(0,0,0,0.25);
    --global-border-radius: 8px;
    --accent-color-transparent: rgba(228, 63, 90, 0.3); /* ADDED for focus rings */
    --font-family: 'Roboto', Arial, sans-serif;
    --focus-ring-color: var(--accent-color-transparent);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-size: 16px;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: none;
    height: 100%;
    background-color: var(--container-bg-color);
    border-radius: 0;
    padding: 0;
    box-shadow: none; /* Fullscreen container doesn't need shadow */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

h1 {
    color: var(--text-color); /* Changed from accent to primary text for subtlety */
    text-align: center;
    font-weight: 500; /* Reduced weight */
    letter-spacing: 0.5px;
    margin: 0;
    padding: 20px 0;
    font-size: 2.2em;
    flex-shrink: 0;
    /* text-shadow: 0 1px 2px rgba(0,0,0,0.1); */
    border-bottom: 1px solid var(--border-color);
}

.main-content {
    display: flex;
    flex-direction: row;
    gap: 16px; /* Reduced gap */
    flex-grow: 1;
    padding: 16px; /* Reduced padding */
    overflow: hidden;
}

.sidebar {
    flex: 0.5;
    background-color: var(--panel-bg-color);
    padding: 16px;
    border-radius: var(--global-border-radius);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-light);
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.25em; /* Adjusted size */
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color); /* More subtle border */
    padding-bottom: 10px;
    margin-bottom: 12px;
    font-weight: 500;
}

#stats {
    font-size: 0.9em;
    margin-bottom: 16px;
    color: var(--text-secondary-color);
}
#stats b {
    color: #71232d; /* Keep accent for emphasis on numbers */
    font-weight: 500;
}

#channel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

#channel-list li {
    margin-bottom: 6px; /* Reduced margin */
}

#channel-list li a {
    display: block;
    padding: 10px 12px;
    background-color: transparent; /* Or var(--item-bg-color) if more separation needed */
    color: var(--text-secondary-color);
    text-decoration: none;
    border-radius: 6px; /* Consistent smaller radius */
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 400;
}

#channel-list li a:hover,
#channel-list li a:focus {
    background-color: var(--item-hover-bg-color);
    color: var(--text-color);
    /* transform: none; */ /* Removed transform */
    outline: none;
}

#channel-list li a.active {
    background-color: var(--accent-color);
    color: #fff;
    font-weight: 500; /* Slightly bolder for active */
    /* transform: none; */
}

.player-area {
    flex: 2.5;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    background-color: var(--panel-bg-color);
    padding: 10px;
    border-radius: var(--global-border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow-light);
}

video {
    width: 100%;
    height: 100%;
    border: none; /* Border moved to player-area */
    border-radius: 6px; /* Inner radius to fit padding */
    background-color: #000;
    object-fit: contain;
}

.player-button {
    background-color: var(--item-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-top: 10px; /* Space above the button */
    align-self: center; /* Center it if player-area is flex column and align-items center */
}

.player-button:hover, .player-button:focus {
    background-color: var(--item-hover-bg-color);
    border-color: var(--accent-color);
    color: var(--accent-color);
    outline: none;
}

.player-button:focus,
.sidebar-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring-color);
}

/* Hidden original controls for stream key input */
.hidden-controls {
    display: none;
}

/* Style for the new button in the sidebar */
.sidebar-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
}

.sidebar-button:hover, .sidebar-button:focus {
    background-color: var(--accent-hover-color);
    outline: none;
}

/* Styles for the video message overlay */
.video-message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--panel-bg-color, #282828); /* Fallback if CSS var not loaded */
    color: var(--text-color, #e0e0e0);
    display: none; /* Initially hidden */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    font-size: 1.2em;
    z-index: 10; /* Ensure it's above the video element if video is not hidden */
}

.video-message-overlay.visible {
    display: flex;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        gap: 15px;
    }
    .sidebar {
        margin-bottom: 15px;
        flex-basis: auto;
    }
    .player-area {
        flex-basis: auto;
    }
    h1 {
        font-size: 2em;
    }
}

/* Custom scrollbar for webkit browsers */
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: var(--panel-bg-color); /* Track to match panel bg */
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color); /* Thumb a bit more subtle */
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--item-hover-bg-color);
}
