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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #2d2d2d;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #404040;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Header link styles */
.header-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
}

/* Stream150 heading styles */
.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    background: linear-gradient(90deg, #ffffff, #ff9966);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    animation: fadeInDown 0.8s ease-out forwards;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-logo {
    height: 1.8rem;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.header h1:hover .header-logo {
    transform: rotate(10deg);
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff4d4d, #ff9966);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.header h1:hover {
    transform: translateY(-2px);
}

.header h1:hover::after {
    transform: scaleX(1);
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    min-width: 0;
    position: relative;
}

.video-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.video-player {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.video-element {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: contain;
    background: #000;
    display: block;
}

/* Disable seeking in video controls */
.video-element::-webkit-media-controls-timeline {
    display: none !important;
}

.video-element::-webkit-media-controls-current-time-display,
.video-element::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

/* For Firefox */
.video-element::-moz-range-thumb {
    display: none;
}

.video-element::-moz-range-track {
    display: none;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: contain;
    background: #000;
    display: none;
}

.status-bar {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    pointer-events: none;
}

.status-indicator, .viewer-count {
    pointer-events: auto;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.online .status-dot, .live .status-dot {
    background: #ff4444;
    box-shadow: 0 0 6px #ff4444;
}

.offline .status-dot {
    background: #666;
}

.viewer-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.controls {
    padding: 10px;
    background: transparent;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    justify-content: flex-end;
}

.fullscreen-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    color: white;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.fullscreen-btn svg {
    width: 20px;
    height: 20px;
}

/* Volume button styles */
.volume-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    color: white;
}

.volume-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.volume-btn svg {
    width: 20px;
    height: 20px;
}

.volume-btn.muted .volume-on {
    display: none;
}

.volume-btn.muted .volume-off {
    display: block;
}

.pip-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    color: white;
}

.pip-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.pip-btn.active {
    background: rgba(0, 255, 0, 0.2);
}

.pip-btn svg {
    width: 20px;
    height: 20px;
}

/* Hide PiP button on mobile devices */
@media (max-width: 768px) {
    .pip-btn {
        display: none;
    }
}

/* Mobile styles for donation buttons */
@media (max-width: 768px) {
    .donation-buttons {
        padding: 10px;
    }
    
    .donation-btn {
        flex: 1;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

.donation-tracker {
    display: none;
}

#progress-container {
    width: 100%;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 15px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

#progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    text-align: center;
    line-height: 28px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.milestone {
    position: absolute;
    bottom: -25px;
    width: 2px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
}

.milestone-label {
    position: absolute;
    bottom: -25px;
    transform: translateX(-50%);
    text-align: center;
    font-size: clamp(0.6rem, 2vw, 0.875rem);
    white-space: nowrap;
    color: #ffffff;
    transition: color 0.3s ease;
}

.stream-time {
    font-size: clamp(0.5rem, 1.5vw, 0.75rem);
    color: #aaaaaa;
    display: block;
    margin-top: 2px;
}

.chat-container {
    width: 100%;
    background: #252525;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.chat-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(to right, #1a1a1a, #252525);
    border-bottom: 1px solid #333;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    flex-wrap: nowrap;
}

.chat-header h3 {
    margin: 0;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #1E90FF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.chat-status {
    margin-left: auto;
    flex-shrink: 0;
}

/* Custom scrollbar for chat box */
.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #1e1e1e;
    margin: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    scrollbar-width: thin;
    scrollbar-color: #1E90FF #2d2d2d;
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #1E90FF;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

/* Improved chat input container */
.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #1e1e1e;
    border-radius: 6px;
    margin: 0 10px 10px 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset;
    flex-shrink: 0; /* Prevent shrinking */
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #2d2d2d;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset;
}

.chat-input:focus {
    border-color: #1E90FF;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

.chat-send-btn {
    padding: 10px 16px;
    background: #1E90FF;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-send-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.chat-send-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.chat-message {
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 8px;
    word-break: break-word;
    max-width: 100%;
    animation: fadeIn 0.3s ease;
}

.chat-message.twitch {
    border-left: 3px solid #9146FF;
    background-color: rgba(145, 70, 255, 0.1);
}

.chat-message.youtube {
    border-left: 3px solid #FF0000;
    background-color: rgba(255, 0, 0, 0.1);
}

.chat-message.web {
    border-left: 3px solid #1E90FF;
    background-color: rgba(30, 144, 255, 0.1);
}

.platform-indicator {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-right: 5px;
    font-weight: bold;
}

.platform-indicator.twitch {
    background-color: #9146FF;
    color: white;
}

.platform-indicator.youtube {
    background-color: #FF0000;
    color: white;
}

.platform-indicator.web {
    background-color: #1E90FF;
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-username {
    font-weight: bold;
    margin-right: 5px;
}

.chat-text {
    word-break: break-word;
}

.mobile-chat-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    flex-direction: column;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden; /* Prevent overflow */
}

.mobile-chat-overlay.active {
    display: flex !important;
    height: 100%;
    width: 100%;
    overflow: hidden;
    flex-direction: column;
}

#mobileChatBox {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    box-sizing: border-box;
}

/* Ensure mobile chat input container stays within bounds */
.mobile-chat-overlay .chat-input-container {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 10px;
}

.mobile-chat-overlay .chat-input {
    min-width: 0;
    flex: 1;
}

.mobile-chat-overlay .chat-send-btn {
    flex-shrink: 0;
}

.mobile-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

.close-chat-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

/* Mobile section divider - hidden by default */
.mobile-section-divider {
    display: none;
}

/* Hide mobile highlights on desktop */
.mobile-highlights {
    display: none;
}

/* Desktop layout */
@media (min-width: 768px) {
    .main-container {
        display: flex;
        flex-direction: row;
        padding: 20px;
        gap: 25px;
        position: relative;
        min-height: 100vh;
    }
    
    .video-container {
        flex: 4;
        width: auto;
        display: flex;
        flex-direction: column;
        position: relative;
        z-index: 2;
    }
    
    /* Left column container for video and highlights */
    .video-container {
        display: flex;
        flex-direction: column;
        flex: 4;
        min-width: 0; /* Allow container to shrink if needed */
    }
    
    .desktop-highlights {
        display: block;
        margin-top: 20px;
        margin-bottom: 60px;
        position: relative;
        z-index: 1;
        width: 100%;
    }
    
    .mobile-highlights {
        display: none;
    }
    
    .chat-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        height: calc(100vh - 112px);
        position: sticky;
        top: 72px;
        max-width: 320px;
        z-index: 3;
    }
    
    .poll-container {
        position: relative;
        z-index: 4; /* Keep polls above all other content */
    }
    
    .stream-footer {
        position: relative;
        z-index: 4; /* Keep footer above stream highlights */
        margin-top: auto; /* Push footer to the bottom */
    }
    
    /* Ensure proper spacing for iPad/tablet */
    @media (max-width: 1024px) {
        .main-container {
            padding: 15px;
            gap: 20px;
        }
        
        .chat-container {
            max-width: 280px;
        }
        
        .desktop-highlights {
            margin-bottom: 80px;
        }
    }
    
    .chat-box {
        max-height: none;
    }
    
    .chat-toggle {
        display: none;
    }
    
    .mobile-chat-overlay {
        display: none !important;
    }
    
    .status-bar {
        padding: 15px;
    }
    
    .controls {
        padding: 15px;
    }
    
    .donation-buttons {
        padding: 0 15px 15px;
    }
    
    .donation-tracker {
        padding: 15px;
    }
}

/* Add desktop-specific video container size */
@media (min-width: 1200px) {
    .video-container {
        flex: 1.5 !important; /* Make video container about half size on desktop */
    }
    
    .chat-container {
        flex: 1;
    }
}

/* Mobile layout */
@media (max-width: 767px) {
    .main-container {
        display: flex;
        flex-direction: column;
        padding: 5px;
    }
    
    .video-container {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Hide desktop highlights on mobile */
    .desktop-highlights {
        display: none;
    }
    
    /* Show mobile highlights */
    .mobile-highlights {
        display: block;
    }
    
    .chat-container {
        width: 100%;
        margin-top: 15px;
        display: block;
    }
    
    /* Show mobile section divider */
    .mobile-section-divider {
        display: block;
        height: 1px;
        background: linear-gradient(to right, transparent, #444, transparent);
        margin: 15px 0;
        width: 100%;
    }
    
    .status-bar {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .below-chat-countdown {
        margin: 10px;
        transform: none !important;
        transition: none;
        position: relative;
        bottom: 0;
        width: calc(100% - 20px);
    }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .video-container {
        margin-bottom: 10px;
        position: relative;
    }
    
    .chat-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        height: auto;
        flex: 0 0 auto; /* Prevent growing */
    }
    
    .chat-box {
        max-height: 300px;
        height: 300px;
        overflow-y: auto;
        font-size: 0.85rem;
        padding: 10px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .chat-message {
        padding: 8px;
        margin-bottom: 8px;
        border-radius: 8px;
        word-break: break-word;
        max-width: 100%;
    }
    
    .chat-username {
        font-size: 0.9rem;
    }
    
    .chat-text {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .chat-toggle {
        display: none;
    }
    
    .mobile-chat-overlay.active {
        display: flex !important;
        height: 100%;
        overflow: hidden;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    #mobileChatBox {
        height: 300px; /* Fixed height */
        max-height: 300px; /* Fixed max height */
        overflow-y: auto;
        padding: 10px;
        margin: 0;
        flex: 0 0 auto; /* Prevent growing */
        display: flex;
        flex-direction: column;
        font-size: 0.9rem;
    }
    
    .chat-input-container {
        padding: 10px;
        background: #1a1a1a;
        border-top: 1px solid #333;
        display: flex;
        align-items: center;
        position: relative;
        bottom: 0;
        width: 100%;
        flex-shrink: 0; /* Prevent shrinking */
        box-sizing: border-box;
        margin: 0; /* Remove margin to prevent overflow */
    }
    
    .chat-input {
        min-width: 0; /* Allow input to shrink */
        font-size: 0.9rem; /* Slightly smaller font for mobile */
    }
    
    .chat-send-btn {
        padding: 8px 12px; /* Slightly smaller padding */
        white-space: nowrap; /* Prevent button text from wrapping */
        font-size: 0.9rem; /* Slightly smaller font for mobile */
    }
    
    .donation-tracker {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    /* Reposition controls for mobile */
    .controls {
        width: 100%;
        justify-content: center;
        padding: 10px 5px;
        gap: 8px;
        position: static;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 0 0 8px 8px;
    }
    
    /* Make buttons slightly smaller on mobile */
    .fullscreen-btn, .volume-btn, .live-btn {
        width: 36px;
        height: 36px;
    }
    
    .fullscreen-btn svg, .volume-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Show all buttons on mobile */
    .fullscreen-btn {
        display: flex !important;
    }
    
    /* Reposition quality selector for mobile */
    .quality-select {
        position: static;
        margin: 0 5px;
    }
}

/* Ensure fullscreen button is visible on desktop */
@media (min-width: 769px) {
    .fullscreen-btn {
        display: flex;
    }
}

/* iPad/Tablet specific styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .controls {
        padding: 12px;
        gap: 12px;
        bottom: 15px;
        right: 15px;
    }
    
    /* Slightly larger buttons for better touch targets on iPad */
    .fullscreen-btn, .volume-btn, .pip-btn {
        width: 44px;
        height: 44px;
    }
    
    .fullscreen-btn svg, .volume-btn svg, .pip-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* Make the live button more prominent and consistent with other controls */
    .live-btn {
        height: 44px;
        padding: 0 14px;
        font-size: 0.9rem;
        border-radius: 22px;
        background: rgba(255, 0, 0, 0.7);
    }
    
    .live-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .live-btn.inactive {
        background: rgba(128, 128, 128, 0.7);
    }
    
    /* Larger quality selector for easier touch */
    .quality-select {
        height: 44px;
        padding: 6px 28px 6px 12px;
        font-size: 0.9rem;
        background-position: right 10px center;
        background-size: 10px auto;
    }
    
    /* Ensure controls are properly spaced in landscape mode */
    @media (orientation: landscape) {
        .controls {
            bottom: 10px;
            right: 10px;
        }
    }
}

.below-chat-countdown {
    margin: 0 8px 8px;
    padding: 10px;
    text-align: center;
    background: linear-gradient(to right, #1e1e1e, #252525, #1e1e1e);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
    transition: all 0.3s ease;
    width: calc(100% - 16px);
    max-width: 100%;
    box-sizing: border-box;
}

.countdown-value {
    background: rgba(30, 144, 255, 0.15);
    padding: 5px 6px;
    border-radius: 4px;
    border: 1px solid rgba(30, 144, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    min-width: 1.6em;
    text-align: center;
    display: inline-block;
    position: relative;
}

.countdown-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    color: #1E90FF;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.countdown-time {
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.countdown-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
    margin-bottom: 4px;
}

.countdown-unit:hover .countdown-value {
    background: rgba(30, 144, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.countdown-separator {
    font-size: 1rem;
    color: #666;
    margin: 0 1px;
    align-self: center;
}

.countdown-unit-label {
    font-size: 0.6rem;
    color: #999;
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.countdown-milliseconds {
    font-size: 0.5rem;
    color: #888;
    display: inline-block;
    font-family: 'Courier New', monospace;
    vertical-align: baseline;
    margin-left: 0;
    position: relative;
    top: -0.1em;
}

.countdown-status {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #1E90FF, #64B5F6, #1E90FF);
    animation: pulse-animation 2s infinite;
    width: 100%;
}

.countdown-ended {
    color: #FF5555;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Mobile chat improvements */
@media (max-width: 767px) {
    .mobile-chat-overlay {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    #mobileChatBox {
        scrollbar-width: thin;
        scrollbar-color: #1E90FF #2d2d2d;
        overflow-y: auto;
        flex: 0 0 auto; /* Prevent growing */
        height: 300px; /* Fixed height */
        min-height: 300px; /* Fixed min height */
        max-height: 300px; /* Fixed max height */
    }
    
    #mobileChatBox::-webkit-scrollbar {
        width: 8px;
    }
    
    #mobileChatBox::-webkit-scrollbar-track {
        background: #2d2d2d;
        border-radius: 4px;
    }
    
    #mobileChatBox::-webkit-scrollbar-thumb {
        background: #1E90FF;
        border-radius: 4px;
    }
    
    #mobileChatBox::-webkit-scrollbar-thumb:hover {
        background: #1976D2;
    }
    
    .below-chat-countdown {
        margin: 10px;
        transform: none !important;
        transition: none;
    }
    
    .below-chat-countdown:hover {
        transform: none !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    }
    
    .countdown-unit:hover .countdown-value {
        transform: none;
        background: rgba(30, 144, 255, 0.15);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
}

/* Update fullscreen styles */
.video-player:fullscreen {
    padding-bottom: 100vh;
}

.video-player:fullscreen .donation-section,
.video-player:fullscreen .donation-buttons,
.video-player:fullscreen .donation-tracker {
    display: none;
}

/* For webkit browsers */
.video-player:-webkit-full-screen {
    padding-bottom: 100vh;
}

.video-player:-webkit-full-screen .donation-section,
.video-player:-webkit-full-screen .donation-buttons,
.video-player:-webkit-full-screen .donation-tracker {
    display: none;
}

.quality-select {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 5px;
    outline: none;
    min-width: 65px;
    width: auto;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px auto;
    padding-right: 24px;
}

.quality-select:hover {
    background-color: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}

.quality-select option {
    background: #1a1a1a;
    color: white;
    padding: 8px;
    font-size: 0.8rem;
    border: none;
    min-width: 100px;
}

/* Style the dropdown when opened */
.quality-select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Mobile quality selector adjustments */
@media (max-width: 768px) {
    .quality-select {
        min-width: 60px;
        padding: 4px 24px 4px 8px;
        font-size: 0.75rem;
    }
}

.autoplay-prompt {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 1000;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.autoplay-message {
    color: white;
    font-size: 14px;
    margin-bottom: 8px;
}

.unmute-button {
    background: #1E90FF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.unmute-button:hover {
    background: #1976D2;
}

.live-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.live-btn:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.05);
}

.live-btn svg {
    width: 16px;
    height: 16px;
}

.live-btn.inactive {
    background: rgba(128, 128, 128, 0.7);
}

.live-btn.pulse {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Username Modal Styles */
.username-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.username-modal-content {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.username-modal h2 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 15px;
}

.username-modal p {
    color: #ccc;
    margin-bottom: 20px;
}

.username-modal .input-group {
    position: relative;
    margin-bottom: 20px;
}

.username-modal input {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.2s;
}

.username-modal input:focus {
    outline: none;
    border-color: #ff4d4d;
}

.username-modal input.error {
    border-color: #ff3333;
    background-color: rgba(255, 51, 51, 0.1);
}

.username-modal .error-message {
    color: #ff3333;
    font-size: 14px;
    margin-top: 5px;
    text-align: left;
    display: none;
}

.username-modal .remember-me {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #ccc;
}

.username-modal .remember-me input {
    width: auto;
    margin-right: 8px;
    margin-bottom: 0;
}

.username-modal .button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.username-modal .primary-button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
    min-width: 100px;
}

.username-modal .primary-button:hover {
    background-color: #ff3333;
}

.username-modal .secondary-button {
    background-color: #333;
    color: #ccc;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    min-width: 100px;
}

.username-modal .secondary-button:hover {
    background-color: #444;
    color: #fff;
}

/* Username display in chat */
.chat-username {
    font-weight: bold;
    color: #ff4d4d;
}

/* Username change button */
.username-change-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 5px;
    margin-left: 5px;
    border-radius: 3px;
    transition: all 0.2s;
}

.username-change-btn:hover {
    background-color: #333;
    color: #fff;
}

/* Username display in chat header */
.username-display {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 10px;
    font-size: 14px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.current-username {
    font-weight: bold;
    color: #ff4d4d;
    margin: 0 5px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Animation for username updates */
.username-updated {
    animation: highlight-username 1.5s ease;
}

@keyframes highlight-username {
    0% {
        background-color: rgba(255, 77, 77, 0);
    }
    30% {
        background-color: rgba(255, 77, 77, 0.3);
    }
    100% {
        background-color: rgba(255, 77, 77, 0);
    }
}

/* Mobile username display */
.mobile-username-display {
    display: flex;
    align-items: center;
    margin-right: auto;
    margin-left: 10px;
    font-size: 14px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Mobile chat header layout */
.mobile-chat-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 15px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    flex-wrap: nowrap;
}

.mobile-chat-header h3 {
    margin: 0;
    flex-shrink: 0;
}

.close-chat-btn {
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .username-change-btn {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .current-username {
        font-size: 0.8rem;
    }
    
    /* Responsive header styles */
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header-logo {
        height: 1.5rem;
        margin-right: 8px;
    }
}

/* Footer Styles */
.stream-footer {
    background-color: #1a1a1a;
    padding: 20px 0;
    border-top: 1px solid #333;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 4;
    margin-top: auto; /* Push footer to the bottom */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: center;
}

.social-link svg {
    margin-right: 8px;
    flex-shrink: 0;
}

.social-link.twitch {
    background-color: #6441a5;
}

.social-link.twitch:hover {
    background-color: #7d5bbe;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-link.youtube {
    background-color: #ff0000;
}

.social-link.youtube:hover {
    background-color: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-link.twitter {
    background-color: #000000;
}

.social-link.twitter:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-copyright {
    color: #999;
    font-size: 14px;
    margin-top: 15px;
}

@media (max-width: 767px) {
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .social-link {
        width: 80%;
        max-width: 250px;
    }
    
    .stream-footer {
        margin-top: 20px;
        padding: 15px 0;
    }
}

/* Stream Highlights Section */
.stream-highlights {
    margin-top: 20px;
    margin-bottom: 60px;
    background: #2d2d2d;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1; /* Ensure proper stacking context */
}

.highlights-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 2px solid #404040;
    padding-bottom: 10px;
}

.highlights-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
}

.highlight-card {
    background: #333333;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
}

.highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.highlight-thumbnail {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #222;
    background-image: linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444), 
                      linear-gradient(45deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.highlight-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.highlight-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.highlight-play-button svg {
    fill: white;
    width: 24px;
    height: 24px;
}

.highlight-card:hover .highlight-play-button {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.highlight-info {
    padding: 10px;
}

.highlight-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
}

.highlight-date {
    color: #aaa;
    font-size: 0.8rem;
    display: block;
    margin-top: 5px;
    font-style: italic;
}

/* Add a hover effect to show the full date */
.highlight-card:hover .highlight-date {
    color: #fff;
    transition: color 0.2s ease;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    .stream-highlights {
        margin-top: 15px;
        padding: 10px;
    }
    
    .highlights-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .highlights-container {
        grid-template-columns: 1fr;
    }
    
    .highlight-card {
        margin-bottom: 10px;
    }
    
    .highlight-info h4 {
        font-size: 0.9rem;
    }
    
    .highlight-date {
        font-size: 0.7rem;
    }
    
    .admin-message {
        font-size: 0.8rem;
    }
    
    /* Make play button always visible on mobile for better UX */
    .highlight-play-button {
        opacity: 0.8;
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .stream-highlights {
        position: relative;
        z-index: 1;
        margin-bottom: 20px; /* Add space for footer */
        width: 100%;
        clear: both; /* Ensure it clears other floating elements */
    }
    
    .highlights-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Ensure poll container is properly positioned */
    .poll-container {
        position: relative;
        z-index: 2; /* Higher than stream-highlights */
    }
    
    /* Ensure footer stays on top */
    .stream-footer {
        position: relative;
        z-index: 2; /* Higher than stream-highlights */
    }
}

/* Desktop styles */
@media (min-width: 1025px) {
    .highlights-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* YouTube Embed Styles */
.youtube-embed {
    position: relative;
}

.youtube-preview {
    cursor: pointer;
    overflow: hidden;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-embed:hover .youtube-thumbnail {
    transform: scale(1.05);
}

.youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.youtube-modal.active {
    opacity: 1;
    visibility: visible;
}

.youtube-modal-content {
    width: 80%;
    max-width: 800px;
    position: relative;
}

.youtube-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.youtube-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Upload Card Styles */
.upload-card {
    background: linear-gradient(135deg, #3a3a3a, #2d2d2d);
    border: 2px dashed #555;
    transition: all 0.3s ease;
}

.upload-card:hover {
    border-color: #ff9966;
    background: linear-gradient(135deg, #3a3a3a, #333);
}

.upload-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    transition: color 0.3s ease;
}

.upload-card:hover .upload-icon {
    color: #ff9966;
}

/* Upload Modal Styles */
.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.upload-modal.active {
    opacity: 1;
    visibility: visible;
}

.upload-modal-content {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.upload-modal h2 {
    margin-top: 0;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.upload-form-group {
    margin-bottom: 20px;
}

.upload-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ddd;
    font-weight: 500;
}

.upload-form-group input[type="text"],
.upload-form-group input[type="url"] {
    width: 100%;
    padding: 10px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.upload-form-group input:focus {
    outline: none;
    border-color: #ff9966;
}

.file-upload-area {
    border: 2px dashed #555;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.file-upload-area:hover {
    border-color: #ff9966;
    background: rgba(255, 153, 102, 0.05);
}

.file-upload-area svg {
    width: 40px;
    height: 40px;
    color: #aaa;
    margin-bottom: 10px;
}

.file-upload-area p {
    margin: 0;
    color: #aaa;
}

.file-upload-area input[type="file"] {
    display: none;
}

.upload-preview {
    margin-top: 15px;
    display: none;
}

.upload-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
}

.upload-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.upload-modal-buttons button {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-cancel {
    background: transparent;
    border: 1px solid #555;
    color: #ddd;
}

.upload-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.upload-submit {
    background: linear-gradient(to right, #ff4d4d, #ff9966);
    border: none;
    color: white;
}

.upload-submit:hover {
    opacity: 0.9;
}

.upload-submit:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

.upload-or-text {
    text-align: center;
    margin: 15px 0;
    color: #777;
    position: relative;
}

.upload-or-text::before,
.upload-or-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #444;
}

.upload-or-text::before {
    left: 0;
}

.upload-or-text::after {
    right: 0;
}

.youtube-url-input {
    position: relative;
}

.youtube-url-input input {
    padding-left: 35px;
}

.youtube-url-input svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #ff0000;
}

/* Admin Controls for Highlights */
.highlight-admin-controls {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Always show admin controls on mobile for better usability */
@media (max-width: 767px) {
    .highlight-admin-controls {
        opacity: 0.8;
    }
}

.highlight-card:hover .highlight-admin-controls {
    opacity: 1;
}

.highlight-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.highlight-delete-btn:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Position fix for highlight cards */
.highlight-card {
    position: relative;
}

/* Admin message for non-admin users */
.admin-message {
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

/* Highlight count indicator */
.highlights-count {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 0.8rem;
    color: #aaa;
}

.count-limit {
    color: #ff4d4d;
    font-weight: bold;
}

/* Admin highlight effect */
@keyframes admin-highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 153, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 153, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 153, 102, 0); }
}

.admin-highlight {
    animation: admin-highlight-pulse 1s ease-out 2;
    border: 2px solid #ff9966 !important;
}

/* Admin message styles */
.admin-message-active {
    color: #ff9966;
    font-weight: 500;
    font-style: normal;
}

/* Debug button styles */
.debug-btn {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.debug-btn:hover {
    background: #444;
    border-color: #555;
}

/* Add responsive scaling for countdown on different desktop sizes */
@media (min-width: 1200px) {
    .chat-container {
        max-width: 350px;
        width: 350px;
    }
    
    .main-container {
        gap: 30px;
    }
    
    .below-chat-countdown {
        max-width: 100%;
        width: calc(100% - 16px);
        margin: 0 8px 8px;
    }
}

@media (min-width: 1600px) {
    .chat-container {
        max-width: 380px;
        width: 380px;
    }
    
    .main-container {
        gap: 35px;
    }
    
    .below-chat-countdown {
        max-width: 100%;
        width: calc(100% - 16px);
        margin: 0 8px 8px;
    }
    
    .countdown-time {
        gap: 6px;
    }
    
    .countdown-unit {
        min-width: 42px;
    }
    
    .countdown-value {
        padding: 6px 7px;
    }
    
    .countdown-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) and (min-width: 768px) {
    .countdown-unit {
        min-width: 40px;
    }
    
    .countdown-value {
        padding: 5px 7px;
    }
    
    .countdown-time {
        gap: 5px;
    }
}

/* Update footer positioning for tablet */
@media (max-width: 1024px) {
    .stream-footer {
        padding: 25px 0;
        margin-top: 40px;
    }
}

/* Main content wrapper */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Video Overlay Countdown Styles */
.video-overlay-countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 8px;
    overflow: hidden;
}

.video-overlay-countdown.active {
    opacity: 1;
    visibility: visible;
}

.video-overlay-countdown .countdown-label {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-overlay-countdown .countdown-time {
    font-size: 1.8rem;
    gap: 10px;
}

.video-overlay-countdown .countdown-value {
    background: rgba(30, 144, 255, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 2.5em;
    font-size: 2rem;
}

.video-overlay-countdown .countdown-unit-label {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 8px;
}

.video-overlay-countdown .countdown-separator {
    font-size: 2rem;
    color: #999;
}

.video-overlay-countdown .countdown-status {
    height: 5px;
    background: linear-gradient(to right, #1E90FF, #64B5F6, #1E90FF);
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.5);
}

@media (max-width: 768px) {
    .video-overlay-countdown .countdown-label {
        font-size: 1.2rem;
    }
    
    .video-overlay-countdown .countdown-time {
        font-size: 1.4rem;
    }
    
    .video-overlay-countdown .countdown-value {
        padding: 8px 10px;
        font-size: 1.6rem;
    }
}

.donation-buttons {
    display: flex;
    gap: 10px;
    padding: 15px;
    justify-content: center;
}

.donation-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.donation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.donation-btn svg {
    width: 20px;
    height: 20px;
}

.donation-btn.tangia {
    background-color: #ff6b00;
}

.donation-btn.tangia:hover {
    background-color: #ff7d1a;
}

.donation-btn.paypal {
    background-color: #0070ba;
}

.donation-btn.paypal:hover {
    background-color: #005ea6;
}

/* Email Subscription Form */
.email-subscription {
    background: linear-gradient(to bottom, #2d2d2d, #252525);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #404040;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.email-subscription-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.email-subscription h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(90deg, #ffffff, #ff9966);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.email-subscription p {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}

.email-form {
    display: flex;
    gap: 15px;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.email-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #404040;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.8);
    color: #fff;
    font-size: 1rem;
    min-width: 200px;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: #ff9966;
    box-shadow: 0 0 10px rgba(255, 153, 102, 0.2);
    background: rgba(26, 26, 26, 0.95);
}

.subscribe-btn {
    padding: 12px 30px;
    background: linear-gradient(90deg, #ff4d4d, #ff9966);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

.subscribe-btn:active {
    transform: translateY(0);
}

.subscribe-btn:disabled {
    background: linear-gradient(90deg, #666, #888);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.subscription-message {
    margin-top: 15px;
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.subscription-message.success {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.subscription-message.error {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.2);
}

@media (max-width: 767px) {
    .email-subscription {
        padding: 30px 15px;
    }

    .email-subscription h3 {
        font-size: 1.5rem;
    }

    .email-subscription p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .email-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .email-input {
        width: 100%;
        padding: 10px 15px;
    }
    
    .subscribe-btn {
        width: 100%;
        padding: 10px 20px;
    }
}