/* =======================
   Base Body Styling
======================= */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Press Start 2P', cursive;
    background: url('livewallpaper.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #dfcc6c;
}

/* Dark Overlay to Enhance Neon Colors */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* =======================
   Font Import
======================= */
@import url('https://fonts.googleapis.com/css2?family=Lexend+Giga&display=swap');

/* ========================================================================== 
   Window Bar – Balanced Program-Style
========================================================================== */

.window-top-bar {
    font-family: 'Lexend Giga', sans-serif;
    background-color: #1e1e1e;
    display: flex;
    align-items: center;
    padding: 6px 16px;
    color: #d6cb72;
    border-bottom: 2px solid #d6cb72;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    height: 42px;
    box-sizing: border-box;
}

.window-title {
    font-size: 16px;
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-controls button {
    background-color: #1e1e1e;
    color: #d6cb72;
    border: none;
    font-size: 16px;
    padding: 0;
    cursor: pointer;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 3px;
}

.window-controls button:hover {
    background-color: #c67cf4;
    color: #fff;
}

.window-controls button.mute {
    background-color: transparent;
    color: #04ef04;
    font-size: 16px;
}

.window-controls button.mute:hover {
    color: #FF4500;
}

.window-controls .volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    border-radius: 10px;
    background: linear-gradient(90deg, #dfcc6c, #c67cf4);
    box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.2), 0 0 5px rgba(198, 124, 244, 0.4);
    outline: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    margin-top: 12px;
}

.window-controls .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #d6cb72;
    box-shadow: 0 0 5px #d6cb72, 0 0 2px #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.window-controls .volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px #d6cb72, 0 0 4px #fff;
}

.window-controls .volume-slider::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #d6cb72;
    box-shadow: 0 0 5px #d6cb72, 0 0 2px #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.window-controls .volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px #d6cb72, 0 0 4px #fff;
}

/* =======================
   Stream Container Layout
======================= */
.stream-container {
    display: flex;
    gap: 20px;
    padding: 70px 20px 20px 20px;
    max-width: 1800px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
    box-sizing: border-box;
}

/* =======================
   Main Content (Video)
======================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 20px rgba(198, 124, 244, 0.2), 0 0 20px rgba(223, 204, 108, 0.6);
    border: 2px solid rgba(223, 204, 108, 0.3);
    backdrop-filter: blur(10px);
}

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

/* Glowing Border Effect */
.video-wrapper::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 15px;
    background: linear-gradient(45deg, #c67cf4, #dfcc6c, #c67cf4);
    background-size: 400% 400%;
    animation: neonGlow 6s linear infinite;
    z-index: -1;
}

@keyframes neonGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.stream-info {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(223, 204, 108, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(198, 124, 244, 0.3);
}

.stream-title {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 24px;
    color: #dfcc6c;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(223, 204, 108, 0.8);
}

.stream-description {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 14px;
    color: #c67cf4;
    margin: 0;
    line-height: 1.6;
}

/* =======================
   Sidebar (Chat & Info)
======================= */
.sidebar {
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(223, 204, 108, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(198, 124, 244, 0.3);
}

.panel-title {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 16px;
    color: #dfcc6c;
    margin: 0 0 15px 0;
    text-shadow: 0 0 8px rgba(223, 204, 108, 0.8);
    text-align: center;
}

/* =======================
   Custom Chat Styling
======================= */
.custom-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.chat-embed {
    flex: 1;
    overflow: hidden;
    margin-bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(223, 204, 108, 0.2);
    min-height: 500px;
    display: flex;
}

.chat-embed iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
    border-radius: 8px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(223, 204, 108, 0.2);
    max-height: 600px;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 6px;
    border-left: 3px solid #c67cf4;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.system-message {
    border-left-color: #dfcc6c;
    text-align: center;
}

.username {
    font-family: 'Lexend Giga', sans-serif;
    color: #04ef04;
    font-weight: bold;
    font-size: 12px;
    margin-right: 8px;
    text-shadow: 0 0 5px rgba(4, 239, 4, 0.6);
}

.message-text {
    font-family: 'Lexend Giga', sans-serif;
    color: #ffffff;
    font-size: 12px;
    word-wrap: break-word;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(223, 204, 108, 0.4);
    border-radius: 6px;
    color: #dfcc6c;
    font-family: 'Lexend Giga', sans-serif;
    font-size: 12px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.chat-input input:focus {
    border-color: #c67cf4;
    box-shadow: 0 0 10px rgba(198, 124, 244, 0.5);
}

.chat-input input::placeholder {
    color: rgba(223, 204, 108, 0.5);
}

.chat-input button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #c67cf4, #dfcc6c);
    color: #1e1e1e;
    border: none;
    border-radius: 6px;
    font-family: 'Lexend Giga', sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: none;
}

.chat-input button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(198, 124, 244, 0.6);
}

.chat-input button:active {
    transform: translateY(0);
}

/* =======================
   Info Panel Styling
======================= */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(223, 204, 108, 0.2);
}

.info-label {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 12px;
    color: #dfcc6c;
}

.info-value {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 12px;
    color: #c67cf4;
    font-weight: bold;
}

.status-live {
    color: #04ef04;
    text-shadow: 0 0 8px rgba(4, 239, 4, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

.status-offline {
    color: #ff4500;
    text-shadow: 0 0 8px rgba(255, 69, 0, 0.6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* =======================
   Offline State Styling
======================= */
.offline-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.offline-message {
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid rgba(223, 204, 108, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(198, 124, 244, 0.4);
    max-width: 600px;
}

.offline-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.offline-title {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 32px;
    color: #dfcc6c;
    margin: 0 0 15px 0;
    text-shadow: 0 0 15px rgba(223, 204, 108, 0.8);
}

.offline-text {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 16px;
    color: #c67cf4;
    margin: 0 0 30px 0;
}

.stream-schedule {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(223, 204, 108, 0.2);
    margin-bottom: 30px;
}

.stream-schedule h3 {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 18px;
    color: #dfcc6c;
    margin: 0 0 20px 0;
    text-shadow: 0 0 10px rgba(223, 204, 108, 0.8);
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(30, 30, 30, 0.6);
    border-radius: 8px;
    border-left: 3px solid #c67cf4;
}

.schedule-item:last-child {
    margin-bottom: 0;
}

.schedule-day {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 14px;
    color: #dfcc6c;
    font-weight: bold;
}

.schedule-time {
    font-family: 'Lexend Giga', sans-serif;
    font-size: 14px;
    color: #c67cf4;
}

.refresh-button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #c67cf4, #dfcc6c);
    color: #1e1e1e;
    border: none;
    border-radius: 8px;
    font-family: 'Lexend Giga', sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: none;
}

.refresh-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(198, 124, 244, 0.6);
}

.refresh-button:active {
    transform: translateY(0);
}

.live-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =======================
   Scrollbar Styling
======================= */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c67cf4, #dfcc6c);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #dfcc6c, #c67cf4);
}

/* =======================
   Responsive Design
======================= */
@media (max-width: 1200px) {
    .stream-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .custom-chat {
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 12px;
    }

    .window-title {
        font-size: 12px;
    }
    
    .stream-title {
        font-size: 18px;
    }
    
    .stream-description {
        font-size: 12px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .custom-chat {
        min-height: 300px;
    }
}
