/* ---- Room hero ---- */
.room-hero { text-align: center; padding: 40px 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; margin-bottom: 30px; }
.room-hero h1 { font-size: 2.5rem; margin-bottom: 10px; }
.room-hero p { font-size: 1.1rem; opacity: 0.9; }
.room-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.room-actions .btn-primary { padding: 15px 30px; font-size: 1.1rem; border-radius: 8px; }

/* ---- QR & share ---- */
.qr-code { display: inline-block; padding: 20px; background: white; border-radius: 8px; margin: 10px 0; }
.qr-code img { max-width: 200px; height: auto; }
.share-link { background: #f3f4f6; padding: 10px 15px; border-radius: 4px; font-family: monospace; display: inline-block; margin-top: 10px; }
.copy-btn { margin-top: 10px; padding: 8px 16px; }
.share-grid { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.share-section { flex: 1; min-width: 180px; text-align: center; }
.share-section h3 { margin-bottom: 6px; font-size: 1rem; }
.share-hint { color: #888; font-size: 0.8rem; margin-bottom: 8px; }

/* ---- Room meta & key entry ---- */
.room-meta { border-top: 1px solid #eee; padding-top: 15px; margin-top: 10px; }
.room-meta p { margin-bottom: 6px; }
.room-meta { margin-bottom: 12px; }
.room-meta code { font-family: monospace; background: #f3f4f6; padding: 2px 6px; border-radius: 3px; }
.no-secret-warning { color: #e67e22; margin-bottom: 8px; font-size: 0.9rem; }
.key-entry { margin-top: 8px; }
.key-entry-form { display: flex; gap: 8px; margin-top: 6px; align-items: stretch; }
.key-entry-form input { flex: 1; font-family: monospace; font-size: 0.85rem; }

/* ---- Switch room modal ---- */
.switch-room-card { max-width: 380px; }
.switch-room-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; max-height: 320px; overflow-y: auto; }
.switch-room-entry { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid #eee; background: #fafafa; }
.switch-room-current { background: #f0f4ff; border-color: #c0d0f0; }
.switch-room-info { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.switch-room-name { font-size: 0.88rem; font-weight: 500; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-room-code { font-size: 0.75rem; color: #aaa; white-space: nowrap; }
.switch-room-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.switch-room-badge { font-size: 0.72rem; color: #4a6fa5; background: #dde8ff; border-radius: 8px; padding: 2px 8px; font-weight: 600; white-space: nowrap; }
.switch-room-footer { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid #eee; }

/* ---- Saved rooms ---- */
.saved-rooms-list { display: flex; flex-direction: column; gap: 8px; }
.saved-room-entry { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #f8f9fa; border-radius: 6px; gap: 10px; }
.saved-room-info { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.saved-room-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-room-code { color: #888; font-size: 0.8rem; font-family: monospace; flex-shrink: 0; }
.saved-room-lock { font-size: 0.9rem; flex-shrink: 0; }
.saved-room-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ---- Alone notice ---- */
.alone-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.9rem; }

/* ---- Members panel ---- */
.members-list { display: flex; flex-direction: column; flex: 1; overflow-y: auto; gap: 6px; }
.member-name-clickable { cursor: pointer; text-decoration: underline dotted; color: inherit; }
.member-name-edit { display: flex; gap: 4px; align-items: center; }
.member-entry { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 8px 12px; border-radius: 6px; border-left: 3px solid transparent; }
.member-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.member-name-block { display: flex; flex-direction: column; min-width: 0; overflow: hidden; flex: 1; }
.member-name { font-size: 0.92rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-lastseen { font-size: 0.75rem; color: #888; }
.member-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-online   { background: #28a745; }
.dot-offline  { background: #ccc; }
.dot-inactive { background: #bbb; }
.member-entry-inactive { opacity: 0.55; }
.member-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---- Colour picker ---- */
.color-swatch-btn { border: 1px solid rgba(0,0,0,0.15); width: 26px; height: 26px; padding: 0; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.color-picker-modal-card { max-width: 280px; }
.color-picker-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.color-swatch-large { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.12s, border-color 0.12s; }
.color-swatch-large:hover { border-color: rgba(0,0,0,0.3); transform: scale(1.18); }

/* ---- Proposals banner ---- */
.proposals-banner { margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.proposal-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; padding: 6px 10px; font-size: 0.82rem; }
.proposal-label { flex: 1; font-weight: 600; color: #5c4200; }
.proposal-counts { color: #888; font-size: 0.78rem; white-space: nowrap; }
.proposal-actions { display: flex; gap: 4px; }
.btn-voted { outline: 2px solid currentColor; }

/* ---- Chat panel ---- */
.chat-card { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-bottom: 0; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 0; min-height: 0; }
.chat-msg { padding: 6px 10px; border-radius: 8px; max-width: 88%; font-size: 0.85rem; word-break: break-word; color: #2d2d2d; background: #f0f0f0; }
.chat-msg-me { align-self: flex-end; }
.chat-msg-other { align-self: flex-start; }
.chat-header { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.chat-sender { font-weight: 600; font-size: 0.73rem; color: #555; }
.chat-time { font-size: 0.7rem; color: #888; }
.chat-text { line-height: 1.4; }
.chat-link { color: #0d6efd; text-decoration: underline; word-break: break-all; }
.chat-link:hover { color: #0a58ca; }
.btn-expand { background: none; border: none; padding: 0; margin-left: 4px; font-size: 0.75rem; color: #888; cursor: pointer; text-decoration: underline; }
.chat-error { background: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; padding: 5px 10px; margin-top: 6px; font-size: 0.82rem; color: #856404; flex-shrink: 0; }
.chat-input-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee; flex-shrink: 0; }
.chat-counter { font-size: 0.75rem; color: #ccc; flex-shrink: 0; min-width: 24px; text-align: right; }
.counter-warn { color: #e67e22; font-weight: 600; }
.secret-banner { background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; flex-shrink: 0; font-size: 0.85rem; color: #795548; }
.secret-banner span { display: block; margin-bottom: 8px; }
.secret-banner-row { display: flex; gap: 6px; align-items: center; }

/* ---- Voice messages ---- */
.voice-player { display: flex; align-items: center; gap: 6px; }
.btn-voice-play { background: rgba(0,0,0,0.12); border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-voice-play:disabled { opacity: 0.4; cursor: default; }
.btn-voice-play:not(:disabled):hover { background: rgba(0,0,0,0.22); }
.voice-duration { font-size: 0.78rem; color: #555; }
.voice-burn-badge { font-size: 0.78rem; }
.voice-listened-badge { font-size: 0.72rem; color: #4a8; font-weight: 600; }
.voice-already-listened { font-size: 0.78rem; color: #4a8; font-weight: 500; flex-shrink: 0; }
.voice-burned { font-size: 0.82rem; color: #aaa; font-style: italic; }
.btn-delete-msg { margin-left: auto; flex-shrink: 0; background: none; border: 1.5px solid #ddd; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; color: #bbb; font-size: 0.65rem; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.btn-delete-msg:hover { border-color: #dc3545; color: #dc3545; background: rgba(220,53,69,0.07); }
.voice-record-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; flex-shrink: 0; }
.voice-rec-dot { color: #dc3545; font-size: 1rem; animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }
.voice-rec-time { font-size: 0.82rem; color: #555; flex-shrink: 0; }
.voice-rec-bar { flex: 1; height: 6px; accent-color: #dc3545; }
.voice-burn-label { font-size: 0.78rem; color: #666; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.voice-preview-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; flex-shrink: 0; border-top: 1px solid #eee; }
.voice-preview-player { width: 100%; height: 36px; }
.voice-preview-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn-mic { font-size: 1rem; padding: 5px 8px; }

/* ---- Toast notifications ---- */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 6px; font-size: 0.85rem; max-width: 320px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); pointer-events: auto; animation: toast-in 0.2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.toast-error { background: #dc3545; color: white; }
.toast-warning { background: #ffc107; color: #333; }
.toast-info { background: #0d6efd; color: white; }

/* ---- Version update banner ---- */
.update-banner { position: fixed; bottom: 1.2rem; right: 1.2rem; background: #1e293b; color: #f1f5f9; padding: 10px 18px; border-radius: 8px; font-size: 0.85rem; z-index: 9999; box-shadow: 0 4px 16px rgba(0,0,0,0.25); animation: slide-up 0.25s ease; }
@keyframes slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Maintenance overlay ---- */
.maintenance-overlay { position: fixed; inset: 0; background: #0f172a; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.maintenance-card { max-width: 520px; width: 100%; text-align: center; color: #e2e8f0; }
.maintenance-icon { font-size: 3rem; margin-bottom: 16px; }
.maintenance-card h2 { font-size: 1.6rem; margin-bottom: 14px; color: #f1f5f9; letter-spacing: 0.02em; }
.maintenance-card p { font-size: 1rem; line-height: 1.7; color: #94a3b8; white-space: pre-line; }

/* ---- MOTD modal ---- */
.motd-card { max-width: 480px; width: 90%; }

/* ---- Bottom tickers ---- */
.ticker-container { position: fixed; bottom: 0; left: 0; right: 0; z-index: 850; display: flex; flex-direction: column; pointer-events: none; }
.ticker { padding: 6px 20px; font-size: 0.8rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
.ticker-warning { background: #b91c1c; color: #fff; font-weight: 500; }
.ticker-news { background: #f1f5f9; color: #64748b; border-top: 1px solid #e2e8f0; }

/* ---- Version badge + changelog ---- */
.version-badge { position: fixed; bottom: 8px; right: 10px; font-size: 0.7rem; color: #ccc; background: none; border: none; padding: 2px 6px; border-radius: 4px; cursor: pointer; z-index: 845; font-family: inherit; line-height: 1; }
.version-badge:hover { color: #777; background: rgba(0,0,0,0.06); }
.changelog-modal { max-width: 480px; max-height: 72vh; overflow-y: auto; }
.cl-version { font-size: 0.88rem; font-weight: 600; color: #2d3748; margin: 18px 0 5px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
.cl-version:first-child { margin-top: 0; }
.cl-list { margin: 0 0 2px 0; padding-left: 18px; }
.cl-list li { font-size: 0.82rem; color: #555; margin-bottom: 3px; line-height: 1.45; }
