/* ==========================================
   1. GLOBAL LAYOUT & SCROLLING FIXES
   ========================================== */
html, body {
    margin: 0;
    padding: 0;
    background-color: #0b0908;
    color: #e2d9c5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    overscroll-behavior: none;
}

/* ==========================================
   2. FULL-SCREEN IMMERSIVE LOUNGE VIEWPORT
   ========================================== */
.room-viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
}

.image-map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.image-map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    pointer-events: none;
}

/* Interactive Doorway Hotspots */
.pub-door {
    position: absolute;
    background: rgba(0, 255, 0, 0.0);
    border: 1px dashed rgba(255, 255, 255, 0.0);
    transition: background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    z-index: 10;
    animation: doorIntroPulse 1.2s ease-in-out 3;
}

.pub-door:hover {
    background: rgba(212, 175, 55, 0.4);
    border-color: rgba(212, 175, 55, 1.0);
    animation: none;
}

@keyframes doorIntroPulse {
    0%, 100% {
        background: rgba(212, 175, 55, 0.0);
        border-color: rgba(212, 175, 55, 0.0);
        box-shadow: 0 0 0 rgba(212, 175, 55, 0.0);
    }
    50% {
        background: rgba(212, 175, 55, 0.28);
        border: 1px solid rgba(212, 175, 55, 0.85);
        box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
    }
}

/* Calibrated Doorway Regions */
.door-arcade    { top: 40.5%; left: 19.8%; width: 7.2%; height: 16.5%; }
.door-listening { top: 41.0%; left: 31.0%; width: 6.8%; height: 16.5%; }
.door-tabletop  { top: 38.5%; left: 40.2%; width: 6.0%; height: 19.0%; }
.door-library   { top: 39.5%; left: 54.2%; width: 6.5%; height: 17.5%; }
.door-tasting   { top: 38.0%; left: 63.8%; width: 9.0%; height: 19.0%; }
.door-study     { top: 29.5%; left: 81.8%; width: 14.5%; height: 57.0%; }

/* ==========================================
   3. MOBILE SCROLLBAR TRACK & ANIMATED TOOLTIP (Hidden on Desktop)
   ========================================== */
.lounge-scrollbar-track,
.scroll-tooltip {
    display: none;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
    .image-map-container img {
        width: auto;
        height: 100%;
        object-fit: fill;
    }

    .lounge-scrollbar-track {
        display: block;
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 240px;
        height: 10px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 5px;
        z-index: 100;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.6);
        cursor: pointer;
        touch-action: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .lounge-scrollbar-track::before {
        content: '';
        position: absolute;
        top: -15px;
        bottom: -15px;
        left: -10px;
        right: -10px;
    }

    .lounge-scrollbar-thumb {
        position: absolute;
        top: 0;
        left: 0;
        width: 70px;
        height: 100%;
        background: linear-gradient(90deg, #d4af37, #f3e5ab);
        border-radius: 5px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.5);
        cursor: grab;
        touch-action: none;
    }

    .scroll-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.5);
        font-size: 13px;
        font-weight: 900;
        pointer-events: none;
        user-select: none;
    }

    .scroll-arrow-left { left: 8px; }
    .scroll-arrow-right { right: 8px; }

    .scroll-tooltip {
        display: block;
        position: absolute;
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(212, 175, 55, 0.92);
        color: #0b0908;
        padding: 6px 14px;
        border-radius: 16px;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        z-index: 101;
        pointer-events: none;
        white-space: nowrap;
        box-shadow: 0 4px 15px rgba(0,0,0,0.6);
        animation: tooltipPulse 1.2s ease-in-out infinite, fadeOutTooltip 0.5s ease 3.5s forwards;
    }

    .scroll-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 5px;
        border-style: solid;
        border-color: rgba(212, 175, 55, 0.92) transparent transparent transparent;
    }
}

/* ==========================================
   4. TECHTURE PUB SIDEBAR MENU
   ========================================== */
.sidebar-container {
    width: 100%;
    background: linear-gradient(180deg, #15110e 0%, #0d0a08 100%);
    border-left: 2px solid #36291e;
    border-right: 1px solid #1a1410;
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
    box-shadow: inset 4px 0 15px rgba(0, 0, 0, 0.7);
}

.menu-header {
    padding: 24px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #d4af37;
    text-align: center;
    border-bottom: 2px solid #2b2016;
    background: radial-gradient(circle at center, #1f1712 0%, #120e0b 100%);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-transform: uppercase;
}

.menu-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1d1612 0%, #140f0c 100%);
    border: 1px solid #33251c;
    border-radius: 6px;
    color: #c5bba8;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    cursor: pointer;
}

.menu-item:hover {
    background: linear-gradient(135deg, #281e17 0%, #1b130f 100%);
    border-color: #d4af37;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
}

.menu-item.active {
    background: linear-gradient(135deg, #33261c 0%, #211710 100%);
    border-color: #d4af37;
    color: #f3e5ab;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), 0 0 10px rgba(212, 175, 55, 0.2);
}

.menu-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item-arrow {
    color: #6b5844;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.menu-item:hover .menu-item-arrow {
    color: #d4af37;
}

.menu-footer {
    padding: 16px 20px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #6b5844;
    text-align: center;
    border-top: 1px solid #211710;
    background-color: #0d0a08;
    text-transform: uppercase;
}

/* ==========================================
   5. ROOM SHELL, CHAT & STREAM LAYOUT
   ========================================== */
html, body.room-body {
    min-height: 100vh !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: #09090f !important;
    background-image: linear-gradient(rgba(9, 9, 15, 0.68), rgba(9, 9, 15, 0.72)), url("room.png") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #e2d9c5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100%;
    overflow: hidden !important;
}

.media-stream-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    flex-shrink: 0;
}

.media-stream-container iframe,
.twitch-stream-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.twitch-stream-container {
    width: 100%;
    background: #000;
}

.chat-wrapper {
    flex-grow: 1;
    width: 100%;
    background: #120e0b;
    position: relative;
    overflow: hidden;
}

.chat-wrapper widgetbot {
    width: 100%;
    height: 100%;
    display: block;
}

.mixcloud-popup-btn {
    background-color: #500050;
    color: white;
    border: 1px solid #700070;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 15px;
    flex-shrink: 0;
}

.mixcloud-popup-btn:hover {
    background-color: #700070;
}

/* ==========================================
   6. SHARED TOP NAVIGATION BAR & HAMBURGER DRAWER
   ========================================== */
.room-top-nav,
.room-shared-nav {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
    background: rgba(9, 9, 15, 0.68) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    font-family: sans-serif !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
    flex-shrink: 0;
}

.room-nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.room-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-user-pill {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 5px 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.85rem;
}

.room-user-pill img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.room-logout-link {
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.room-logout-link:hover {
    text-decoration: underline;
}

.room-hamburger-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.room-hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.38);
}

.room-hamburger-btn span {
    display: block;
    width: 16px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.room-hamburger-btn.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.room-hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.room-hamburger-btn.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.room-nav-drawer {
    position: fixed;
    top: 68px;
    right: 16px;
    z-index: 1099;
    width: 240px;
    background: rgba(12, 12, 18, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 10px 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
    font-family: sans-serif;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.room-nav-drawer.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.room-nav-section-label {
    padding: 6px 16px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.room-nav-drawer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: #f0f0f5;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.room-nav-drawer a:hover,
.room-nav-drawer a.active-room {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
}

.room-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 6px 0;
}

.room-nav-drawer a.nav-logout {
    color: #ff6b6b;
    font-weight: 600;
}

@media (max-width: 540px) {
    .room-user-pill span {
        display: none;
    }
}

.back-to-lounge-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid #4a3826;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.25s ease;
}

.back-to-lounge-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #ffffff;
}

.room-title-indicator {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #6b5844;
    text-transform: uppercase;
}

/* ==========================================
   7. FRONT DOOR SPLIT-SCREEN & LOGIN STYLES
   ========================================== */
.login-body {
    margin: 0;
    padding: 0;
    background-color: #0b0908;
    color: #e2d9c5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
}

.login-viewport {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1410 0%, #0b0908 100%);
    padding: 20px;
    box-sizing: border-box;
}

.login-container-split {
    display: flex;
    flex-direction: row;
    background: linear-gradient(135deg, #15110e 0%, #0d0a08 100%);
    border: 1px solid #33251c;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(74, 222, 128, 0.05);
    overflow: hidden;
    box-sizing: border-box;
}

.login-left-col {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #281e17;
    background: rgba(13, 10, 8, 0.5);
}

.login-right-col {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left-col h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: #d4af37;
    margin: 0 0 15px 0;
}

.logo-container {
    width: 140px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.pub-logo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 12px rgba(74, 222, 128, 0.2);
    border: 1px solid #283830;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #a89a84;
    margin-bottom: 25px;
    line-height: 1.5;
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #5865F2;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 20px;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.discord-btn:hover {
    background-color: #4752C4;
    box-shadow: 0 6px 16px rgba(88, 101, 242, 0.5);
    transform: translateY(-1px);
}

.discord-icon {
    flex-shrink: 0;
}

.login-right-col h2 {
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.room-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room-features-list li {
    font-size: 0.85rem;
    color: #c5bba8;
    line-height: 1.4;
}

.room-features-list strong {
    color: #e2d9c5;
}

/* Mobile Stacked Layout Fix for Front Door */
@media (max-width: 768px) {
    .login-viewport {
        padding: 10px;
        align-items: flex-start;
    }

    .login-container-split {
        flex-direction: column;
        max-width: 100%;
        background: linear-gradient(135deg, #15110e 0%, #0d0a08 100%);
        border: 1px solid #33251c;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    }

    .login-left-col {
        border-right: none;
        border-bottom: 1px solid #281e17;
        padding: 30px 20px;
        background: transparent;
    }

    .login-right-col {
        padding: 30px 20px;
        background: transparent;
    }
}

/* ==========================================
   8. STREAM SCHEDULE INSIDE LEFT DRAWER
   ========================================== */
#schedule-placeholder {
    background: rgba(13, 10, 8, 0.96);
}

.stream-schedule {
    width: 100%;
    padding: 14px 4px 24px;
    box-sizing: border-box;
    font-family: sans-serif;
    color: #f0f0f5;
    display: flex;
    flex-direction: column;
}

.schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.schedule-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 184, 77, 0.14);
    border: 1px solid rgba(255, 184, 77, 0.42);
    color: #ffd28a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.schedule-header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
}

.schedule-header p {
    margin: 0;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.65);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.schedule-day {
    background: rgba(22, 22, 32, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.schedule-day.is-live-day {
    border-color: rgba(255, 184, 77, 0.55);
    background: linear-gradient(180deg, rgba(255, 184, 77, 0.14), rgba(22, 22, 32, 0.92));
}

.schedule-day.is-off-day {
    opacity: 0.58;
}

.day-top {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.day-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.day-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffd28a;
}

.schedule-day.is-off-day .day-time {
    color: rgba(255, 255, 255, 0.5);
}

.stream-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #f0f0f5;
    line-height: 1.3;
}

.stream-desc {
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.65);
}

.day-event-item + .day-event-item {
    border-top: 1px dashed rgba(255, 255, 255, 0.16);
    padding-top: 6px;
    margin-top: 2px;
}

.schedule-day.is-today {
    opacity: 1 !important;
    border-color: #4ecdc4;
    box-shadow: 0 0 16px rgba(78, 205, 196, 0.25);
}

.today-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.65);
    color: #8cf2eb;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}