/* ======================
   Global Styles
   ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --text-primary: #e8e8e8;
    --text-secondary: #999;
    --accent: #6b7280;
    --accent-hover: #9ca3af;
    --border: #2a2a2a;
    --active: #4ade80;
    --panel-width: 140px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ======================
   Layout
   ====================== */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background: var(--bg-secondary);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ======================
   Timeline Scrubber
   ====================== */
.timeline-container {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 0.75rem;
}

.timeline-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.current-time-display {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.stream-time-display {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.timeline-wrapper {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
}

.timeline-scrubber {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.timeline-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--active);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

.timeline-scrubber::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--active);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

.timeline-scrubber:hover::-webkit-slider-thumb {
    transform: scale(1.15);
}

.timeline-scrubber:hover::-moz-range-thumb {
    transform: scale(1.15);
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: var(--active);
    border-radius: 3px;
    pointer-events: none;
    z-index: 1;
    width: 0%;
    transition: width 0.1s linear;
}

/* ======================
   Video Container
   ====================== */
.video-container {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    height: 100%;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.video-wrapper {
    position: relative;
    width: 270px !important;
    height: 480px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    min-height: 480px !important;
    max-height: 480px !important;
    margin: 0;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.video-container .video-js,
.video-js,
#videoPlayer {
    position: relative !important;
    width: 270px !important;
    height: 480px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    min-height: 480px !important;
    max-height: 480px !important;
    object-fit: contain !important;
}

/* Force all Video.js internal elements to respect container size */
.vjs-tech,
video {
    width: 270px !important;
    height: 480px !important;
    max-width: 270px !important;
    max-height: 480px !important;
    object-fit: contain !important;
}

.vjs-poster {
    width: 270px !important;
    height: 480px !important;
    max-width: 270px !important;
    max-height: 480px !important;
}

/* Hide the horizontal progress bar / scrubber */
.video-js .vjs-progress-control {
    display: none !important;
}

.switch-video-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.switch-video-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.switch-video-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ======================
   Layout Columns
   ====================== */

.panel-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inner-column {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    border-right: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0 !important;
}

.outer-column {
    flex: 1 !important;
    min-width: 400px;
    border-left: 1px solid var(--border);
    background: var(--bg-secondary);
}

.panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.panel.pins-panel,
.panel.giveaways-panel {
    flex: 1;
}

/* Horizontal panels container */
.panels-horizontal {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--border);
}

.panels-horizontal .panel {
    flex: 1 1 50%;
    min-width: 0;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.panels-horizontal .panel:first-child {
    border-right: 1px solid var(--border);
}

.panel-header {
    background: var(--bg-secondary);
    padding: 0.6rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

/* Resize Handle */
.resize-handle {
    height: 8px;
    background: var(--bg-secondary);
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.resize-handle:hover {
    background: var(--bg-tertiary);
}

.resize-line {
    width: 40px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    opacity: 0.5;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 0;
}

.panel.collapsed .panel-content {
    display: none;
}

/* ======================
   Captions
   ====================== */
.caption-item {
    padding: 0.5rem 0.6rem;
    margin-bottom: 0.35rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
    overflow-x: hidden;
}

.caption-item:hover {
    background: var(--bg-secondary);
    border-left-color: var(--text-secondary);
}

.caption-item.active {
    background: var(--bg-secondary);
    border-left-color: var(--active);
}

.caption-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.2rem;
    font-family: 'Courier New', monospace;
}

.caption-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* ======================
   Chat
   ====================== */
.chat-message {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.35rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.chat-message:hover {
    background: var(--bg-secondary);
    border-left-color: var(--text-secondary);
}

.chat-message.active {
    background: var(--bg-secondary);
    border-left-color: var(--active);
}

.chat-username {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
}

.chat-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.chat-timestamp {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    opacity: 0.6;
    font-family: 'Courier New', monospace;
}

/* ======================
   Search
   ====================== */
.search-container {
    position: relative;
    display: flex;
    flex: 1;
    gap: 0.5rem;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.search-filters {
    display: flex;
    gap: 0.35rem;
}

.filter-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--bg-secondary);
    border-color: var(--active);
    color: var(--active);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 6px;
    margin-top: 0.5rem;
    z-index: 200;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-primary);
}

.search-result-type {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0.2rem;
    letter-spacing: 0.05em;
}

.search-result-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
    font-family: 'Courier New', monospace;
}

.search-result-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.search-result-text mark {
    background: var(--active);
    color: var(--bg-primary);
    padding: 0 0.15rem;
    border-radius: 2px;
    font-weight: 500;
}

.search-result-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* ======================
   Giveaways
   ====================== */
.giveaway-item {
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.35rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.giveaway-item:hover {
    background: var(--bg-secondary);
    border-left-color: var(--text-secondary);
}

.giveaway-item.active {
    background: var(--bg-secondary);
    border-left-color: var(--active);
}

.giveaway-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.giveaway-stats {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.stat-item {
    display: inline;
}

.stat-separator {
    margin: 0 0.3rem;
}

/* ======================
   Product Pins
   ====================== */
.pin-item {
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem;
    margin-bottom: 0.35rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.pin-item:hover {
    background: var(--bg-secondary);
    border-left-color: var(--text-secondary);
}

.pin-item.active {
    background: var(--bg-secondary);
    border-left-color: var(--active);
}

.pin-image-container {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--bg-primary);
}

.pin-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pin-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.pin-name {
    font-size: 0.7rem;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ======================
   Loading & Error States
   ====================== */
.loading-message,
.error-message,
.no-data {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.error-message {
    color: #ff6b6b;
}

/* ======================
   Panel Layout Updates
   ====================== */
.giveaways-panel,
.pins-panel {
    flex: 1;
}

/* ======================
   Scrollbar
   ====================== */
.panel-content::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.panel-content::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ======================
   Fixed Layout - No Responsive Breakpoints
   ====================== */
/* Responsive design removed to maintain fixed layout */
