:root[data-theme="himalayan"] { --bg-base: #121212; --bg-gradient: radial-gradient(circle at 10% 20%, #2a1a1a 0%, #050505 90%); --sidebar-bg: rgba(20, 20, 20, 0.85); --primary: #ff5722; --glass-border: rgba(255, 255, 255, 0.08); --text-main: #f5f5f5; --text-muted: #9e9e9e; --shadow-soft: 0 10px 30px rgba(0,0,0,0.5); --radius-main: 20px; }
:root[data-theme="midnight"] { --bg-base: #050510; --bg-gradient: radial-gradient(circle at 10% 20%, #0f0c29 0%, #020205 90%); --sidebar-bg: rgba(20, 20, 30, 0.85); --primary: #0a84ff; --glass-border: rgba(255, 255, 255, 0.08); --text-main: #f5f5f7; --text-muted: #86868b; --shadow-soft: 0 10px 30px rgba(0,0,0,0.3); --radius-main: 20px; }
:root[data-theme="daybreak"] { --bg-base: #f0f4f8; --bg-gradient: linear-gradient(135deg, #e0f7fa 0%, #ffffff 50%, #f0f4f8 100%); --sidebar-bg: rgba(255, 255, 255, 0.65); --primary: #ff5722; --glass-border: rgba(255, 255, 255, 0.4); --text-main: #333333; --text-muted: #8e8e93; --shadow-soft: 0 10px 30px rgba(0,0,0,0.05); --radius-main: 20px; }

* { box-sizing: border-box; outline: none; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg-base); color: var(--text-main); margin: 0; width: 100vw; height: 100vh; overflow: hidden; }
#app-container { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg-gradient); transition: background 0.5s ease; }

.icon-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 8px; border-radius: 50%; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: rgba(125, 125, 125, 0.1); color: var(--primary); }
.logo-svg { width: 48px; height: 40px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sub-icon { width: 12px; height: 12px; fill: #ffd700; margin-left: 4px; display: inline-block; vertical-align: middle; filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5)); }

#chat-view { display: none; flex-direction: row; width: 100%; height: 100%; }
#sidebar { width: 300px; background: var(--sidebar-bg); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; padding: 24px; z-index: 10; box-shadow: var(--shadow-soft); position: relative; min-width: 250px; max-width: 600px; }
#sidebar-resizer { position: absolute; top: 0; bottom: 0; right: 0; width: 8px; cursor: col-resize; background: transparent; z-index: 100; }

.vibe-card { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--glass-border); position: relative; }
#album-art { width: 180px; height: 180px; border-radius: var(--radius-main); margin-bottom: 16px; box-shadow: var(--shadow-soft); object-fit: cover; background: rgba(125,125,125,0.05); transition: transform 0.3s ease; }
#album-art:hover { transform: scale(1.02); }
#song-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
#album-name { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
#artist-name { font-size: 13px; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.hierarchy-nav { display: flex; background: rgba(125, 125, 125, 0.1); border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.nav-item { flex: 1; padding: 8px 0; font-size: 11px; font-weight: 700; text-transform: uppercase; cursor: pointer; border-radius: 9px; color: var(--text-muted); text-align: center; transition: all 0.2s; }
.nav-item:hover { color: var(--text-main); }
.nav-item.active { background: var(--bg-base); color: var(--text-main); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
:root[data-theme="midnight"] .nav-item.active { background: var(--primary); color: #fff; }

.trend-header { font-size: 10px; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid rgba(125,125,125,0.1); }
.trend-header:first-child { padding-top: 0; border-top: none; }
.trend-item { padding: 10px; margin-bottom: 8px; background: rgba(255,255,255,0.05); border-radius: 12px; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; cursor: default; }
:root[data-theme="daybreak"] .trend-item { background: rgba(255,255,255,0.6); }
.trend-icon { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; opacity: 0.5; }
.search-icon { width: 16px; height: 16px; opacity: 0; cursor: pointer; transition: opacity 0.2s; margin-left: auto; color: var(--text-muted); }
.trend-item:hover .search-icon { opacity: 1; }
.search-icon:hover { color: var(--primary); transform: scale(1.1); }

main { flex: 1; display: flex; flex-direction: column; position: relative; }
#room-header { padding: 20px 30px; border-bottom: 1px solid var(--glass-border); display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.01); backdrop-filter: blur(10px); }
.room-info { display: flex; align-items: center; gap: 10px; }
.profile-area { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 10px; border-radius: 20px; transition: background 0.2s; }
.profile-area:hover { background: rgba(125,125,125,0.1); }
.profile-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
.profile-avatar { width: 28px; height: 28px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--bg-base); font-size: 12px; font-weight: 800; }

#chat-box { flex-grow: 1; overflow-y: auto; padding: 30px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
#load-more-btn { display: none; margin: 0 auto 15px auto; background: rgba(125,125,125,0.1); border: none; color: var(--text-muted); padding: 8px 16px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; }
#load-more-btn:hover { background: rgba(125,125,125,0.2); color: var(--text-main); }

.message-group { display: flex; flex-direction: column; max-width: 70%; align-self: flex-start; }
.message-group.mine { align-self: flex-end; align-items: flex-end; }
.message-meta { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; margin-left: 12px; display: flex; align-items: center; gap: 5px; }
.message-group.mine .message-meta { margin-right: 12px; margin-left: 0; justify-content: flex-end; }
.message-bubble { background: rgba(255,255,255,0.08); padding: 10px 16px; border-radius: 18px; border-bottom-left-radius: 4px; font-size: 14px; line-height: 1.5; color: var(--text-main); position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
:root[data-theme="daybreak"] .message-bubble { background: #fff; }
.message-group.mine .message-bubble { background: var(--primary); color: var(--bg-base); border-radius: 18px; border-bottom-right-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.message-time { opacity: 0; transition: opacity 0.2s; font-size: 9px; color: var(--text-muted); margin-top: 4px; text-align: right; }
.message-bubble:hover + .message-time { opacity: 1; }

.msg-delete-btn { display: none; cursor: pointer; color: #ff5252; margin-left: 8px; font-weight: bold; font-size: 12px; }
.message-group:hover .msg-delete-btn { display: inline; }

/* SYSTEM MESSAGES */
.system-message { text-align: center; padding: 15px; margin: 10px 0; border-radius: 12px; font-size: 12px; font-weight: 700; opacity: 0.9; }
.system-first { background: rgba(255, 87, 34, 0.1); color: var(--primary); border: 1px dashed var(--primary); }
.system-slow { background: rgba(125, 125, 125, 0.1); color: var(--text-muted); font-style: italic; }

#input-area { padding: 24px 30px; display: flex; gap: 12px; background: transparent; }
input:not([type="checkbox"]) { flex: 1; background: rgba(125,125,125,0.08); border: 1px solid transparent; color: var(--text-main); padding: 12px 20px; border-radius: 20px; font-size: 14px; transition: all 0.2s; }
input:not([type="checkbox"]):focus { background: var(--bg-base); box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-color: var(--primary); }
input[type="checkbox"] { flex: none; width: auto; margin: 0; cursor: pointer; }

@keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } 100% { transform: translateX(0); } }
.shake { animation: shake 0.3s ease-in-out; background-color: #ff5252 !important; color: white !important; }
button.send-btn { background: var(--text-main); color: var(--bg-base); border: none; padding: 0 24px; border-radius: 20px; cursor: pointer; font-weight: 700; transition: transform 0.1s; }
button.send-btn:active { transform: scale(0.95); }

.report-input { width: 100%; height: 120px; background: rgba(125,125,125,0.08); border: 1px solid transparent; color: var(--text-main); padding: 12px; border-radius: 12px; font-family: inherit; font-size: 14px; resize: none; margin-bottom: 10px; }
.report-input:focus { background: var(--bg-base); border-color: var(--primary); }

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 15px; }
.footer-controls { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.auto-switch-container { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 5px; margin-bottom: 5px; }
.auto-switch-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 100; align-items: center; justify-content: center; }
.modal-card { background: var(--bg-base); border: 1px solid var(--glass-border); padding: 30px; border-radius: 24px; width: 100%; max-width: 450px; box-shadow: 0 20px 60px rgba(0,0,0,0.4); text-align: center; position: relative; max-height: 90vh; overflow-y: auto; }
.close-btn { position: absolute; top: 15px; right: 20px; cursor: pointer; color: var(--text-muted); font-size: 20px; }
.auth-title { font-size: 20px; font-weight: 800; margin-bottom: 20px; color: var(--text-main); }
.auth-input { width: 100%; padding: 12px; margin-bottom: 12px; background: rgba(125,125,125,0.1); border: none; border-radius: 12px; color: var(--text-main); font-size: 14px; }
.auth-btn { width: 100%; padding: 12px; background: var(--primary); color: var(--bg-base); font-weight: 700; border: none; border-radius: 12px; cursor: pointer; margin-top: 10px; transition: all 0.2s; }
button.auth-btn[disabled] { background-color: var(--text-muted); opacity: 0.5; cursor: not-allowed; }

.auth-options { display: flex; justify-content: center; font-size: 12px; color: var(--text-muted); margin-top: 15px; }
.auth-link { cursor: pointer; text-decoration: underline; }
.remember-box { display: flex; align-items: center; gap: 8px; cursor: pointer; justify-content: center; margin-top: 5px; }

.toast-container { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: var(--sidebar-bg); border: 1px solid var(--glass-border); padding: 12px 20px; border-radius: 30px; display: none; align-items: center; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 200; backdrop-filter: blur(10px); overflow: hidden; }
.toast-text { font-size: 12px; font-weight: 700; color: var(--text-main); }
.toast-btn { background: rgba(255,255,255,0.1); border: none; color: var(--text-muted); padding: 5px 12px; border-radius: 15px; font-size: 10px; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.toast-btn:hover { background: rgba(255,255,255,0.2); color: var(--text-main); }
.toast-progress { position: absolute; bottom: 0; left: 20px; right: 20px; height: 2px; background: var(--primary); width: 0%; border-radius: 2px; }

.step-row { display: flex; align-items: flex-start; text-align: left; margin-bottom: 20px; gap: 15px; }
.step-num { min-width: 24px; height: 24px; background: var(--primary); color: var(--bg-base); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; margin-top: 2px; }
.step-content { flex: 1; }
.step-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--text-main); }
.step-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.download-link { color: var(--primary); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; transition: border 0.2s; }
.download-link:hover { border-bottom-color: var(--primary); }
.troubleshoot-box { margin-top: 20px; padding: 15px; background: rgba(125,125,125,0.05); border-radius: 12px; text-align: left; font-size: 11px; color: var(--text-muted); }
.ts-title { font-weight: 700; margin-bottom: 5px; color: var(--text-main); text-transform: uppercase; }
.ts-item { margin-bottom: 5px; display: flex; gap: 6px; }
#landing-view { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 20px; }
h1.hero { font-size: 3rem; font-weight: 800; margin-bottom: 10px; background: linear-gradient(45deg, var(--primary), var(--text-muted)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
p.sub-hero { color: var(--text-muted); margin-bottom: 10px; font-size: 16px; max-width: 400px; line-height: 1.5; }
#welcome-msg { height: 20px; color: var(--primary); font-weight: 600; font-size: 14px; margin-bottom: 20px; transition: color 0.2s; user-select: none; }
.settings-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--glass-border); }
.settings-label { font-size: 13px; font-weight: 600; color: var(--text-main); }
.theme-dots { display: flex; gap: 8px; }
.theme-dot { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(125,125,125,0.2); transition: transform 0.2s; }
.theme-dot:hover { transform: scale(1.1); }
.toggle-switch { position: relative; display: inline-block; width: 34px; height: 18px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(125,125,125,0.3); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(16px); }

.history-list { margin-top: 20px; max-height: 150px; overflow-y: auto; text-align: left; }
.history-item { background: rgba(125,125,125,0.05); padding: 8px; border-radius: 8px; margin-bottom: 6px; font-size: 11px; color: var(--text-muted); }
.history-date { font-weight: 700; color: var(--text-main); margin-bottom: 2px; }

/* NEW STATUS INDICATOR */
#switch-status { font-size: 12px; color: var(--primary); margin-left: 10px; display: none; font-weight: 700; cursor: pointer; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

/* GUEST BUTTON */
.guest-btn { background: transparent; border: 1px solid var(--text-muted); color: var(--text-muted); margin-top: 10px; }
.guest-btn:hover { background: rgba(125,125,125,0.1); color: var(--text-main); border-color: var(--text-main); }

/* BADGES */
.badge { font-size: 9px; padding: 2px 6px; border-radius: 10px; margin-left: 5px; font-weight: 800; text-transform: uppercase; }
.badge-admin { background: #ff5252; color: white; }
.badge-mod { background: #4caf50; color: white; }
.badge-sub { background: #ffd700; color: #333; }

/* ABOUT MODAL STYLES */
#about-display { text-align: center; white-space: normal; }
.donate-btn { display: inline-block; background-color: #FFDD00; color: #000; padding: 10px 20px; border-radius: 50px; text-decoration: none; font-weight: 800; font-size: 14px; margin-top: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: transform 0.2s; }
.donate-btn:hover { transform: scale(1.05); box-shadow: 0 6px 8px rgba(0,0,0,0.15); }