/* =====================================================
   🎨 EKIBEL — Clean & Readable UI
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warn: #f59e0b;
    --bg: #0f0f1a;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --text: #f1f1f4;
    --text-2: rgba(255, 255, 255, 0.65);
    --text-3: rgba(255, 255, 255, 0.38);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --max-w: 900px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.15s;
}

a {
    color: inherit;
    text-decoration: none;
}

.muted {
    color: var(--text-3);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* ===== TOP BAR ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid var(--primary);
    object-fit: cover;
    cursor: pointer;
    animation: float 4s ease-in-out infinite;
    transition: transform 0.2s;
}

.topbar-avatar:hover {
    transform: scale(1.15);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

h1 {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.topbar-sub {
    font-size: 0.75rem;
    color: var(--text-3);
    cursor: pointer;
}

.topbar-sub:hover {
    color: var(--primary);
}

.topbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
}

.icon-btn.active {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.icon-btn.playing {
    animation: pulse 1.5s ease-in-out infinite;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* ===== DASHBOARD ===== */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    max-width: var(--max-w);
    margin: 0 auto;
}

.dash-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats card */
.stats-card {
    gap: 0;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 12px;
    min-width: 48px;
    flex: 1;
}

.stat-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.streak-num {
    color: var(--warn);
}

.stat-lbl {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-3);
    margin-top: 1px;
}

.stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
}

/* ===== TILES ===== */
.tile {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Duty tile */
.tile-duty {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
    border-color: rgba(99, 102, 241, 0.2);
}

.tile-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.08);
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.tile-icon {
    font-size: 1.1rem;
}

.tile-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    flex: 1;
}

.tile-badge {
    font-size: 0.65rem;
    color: var(--text-3);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 500;
}

.tile-body {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    flex-wrap: wrap;
}

.person-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 14px;
    border-radius: 22px;
    border: 1px solid var(--border);
    flex: 1;
    min-width: 120px;
    transition: all 0.15s;
}

.person-chip:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
    transform: translateY(-1px);
}

.chip-avatar {
    font-size: 1rem;
}

.chip-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text);
}

/* Fortune & Fact tiles */
.tile-fortune,
.tile-fact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
}

.tile-fortune {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(139, 92, 246, 0.06));
    border-color: rgba(168, 85, 247, 0.2);
}

.tile-fact {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 138, 0, 0.06));
    border-color: rgba(245, 158, 11, 0.2);
}

.tile-icon-big {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
}

.tile-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tile-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
}

.tile-content {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.4;
}

/* Actions row */
.actions-row {
    justify-content: center;
    gap: 10px;
}

.action-icon {
    flex: 1;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: var(--text);
}

.action-icon:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
}

/* ===== GUIDE MODAL ===== */
.guide-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.2s;
}

.guide-content {
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    max-width: 440px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.guide-content h3 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1.2rem;
}

.guide-section {
    margin-bottom: 14px;
}

.guide-section h4 {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guide-section p,
.guide-section li {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.5;
}

.guide-section ul {
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#fun-fact-text {
    transition: opacity 0.3s;
}

/* ===== MAIN GRID ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px 100px;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
    font-size: 0.9rem;
}

/* ===== TOILET CARDS ===== */
.toilet-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.toilet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.toilet-card.my-toilet {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.toilet-card.my-queue {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Card header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
    border-bottom: 1px solid var(--border);
}

.card-header span {
    font-weight: 600;
    font-size: 0.95rem;
}

.card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Status box */
.status-box {
    padding: 14px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
}

.status-free {
    background: linear-gradient(135deg, var(--success), #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.status-occupied {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

/* Info row */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
}

.water-toggle,
.water-info {
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 500;
    font-size: 0.8rem;
}

.water-toggle {
    cursor: pointer;
}

.water-hot {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.water-cold {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* Timer */
.shame-timer {
    text-align: center;
    padding: 8px;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace, monospace;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timer-ok {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.timer-normal {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
}

.timer-warning {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    animation: timerPulse 1s infinite;
}

.timer-danger {
    background: rgba(239, 68, 68, 0.22);
    color: #ef4444;
    animation: timerPulse 0.5s infinite;
    font-size: 1.05rem;
}

.timer-msg {
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
}

@keyframes timerPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

/* Auto status */
.auto-status {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-3);
    font-style: italic;
    padding: 2px 0;
}

/* Paper */
.paper-badge {
    font-size: 0.65rem;
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 2px 8px;
    border-radius: 8px;
    animation: timerPulse 1s infinite;
}

.btn-paper {
    width: 100%;
    padding: 9px;
    margin-top: 4px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-xs);
    color: #fcd34d;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-paper:hover {
    background: rgba(245, 158, 11, 0.22);
}

/* Reactions */
.reaction-bar {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 3px 0;
}

.reaction-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3px 7px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 2px;
}

.reaction-btn:hover {
    transform: scale(1.12);
    background: var(--primary-glow);
}

.reaction-btn.has-count {
    border-color: var(--primary);
}

.reaction-btn span {
    font-size: 0.6rem;
    color: var(--text-2);
}

/* Queue */
.queue-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.section-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.queue-list {
    list-style: none;
    max-height: 110px;
    overflow-y: auto;
    margin-bottom: 6px;
}

.queue-item {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-radius: var(--radius-xs);
    margin-bottom: 3px;
}

.queue-item.first {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-weight: 600;
}

.queue-item.me {
    background: rgba(16, 185, 129, 0.12) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.empty-msg {
    color: var(--text-3);
    font-size: 0.8rem;
    text-align: center;
    padding: 8px;
}

/* Buttons */
.action-area {
    margin-top: 2px;
}

.btn-main {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.btn-enter {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-leave {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-quick {
    background: linear-gradient(135deg, var(--success), #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-main:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-del {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 3px 8px;
    font-size: 0.65rem;
    border-radius: 4px;
}

.btn-del:hover {
    background: var(--danger);
    color: white;
}

.info-msg {
    text-align: center;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.88rem;
}

/* Honk */
.btn-honk {
    width: 100%;
    padding: 9px;
    margin-top: 4px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 138, 0, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-xs);
    color: #fcd34d;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-honk:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.honk-shake {
    animation: honkShake 0.6s ease;
}

@keyframes honkShake {

    0%,
    100% {
        transform: translateX(0);
    }

    15%,
    55%,
    85% {
        transform: translateX(-5px);
    }

    35%,
    75% {
        transform: translateX(5px);
    }
}

/* Review */
.review-display {
    text-align: center;
    padding: 6px;
    font-size: 0.8rem;
    color: var(--text-2);
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.review-display small {
    color: var(--text-3);
    font-size: 0.7rem;
}

.review-comments {
    margin-top: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.review-comment-item {
    font-size: 0.72rem;
    color: var(--text-2);
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.4;
}

.review-comment-item:last-child {
    border-bottom: none;
}

.review-comment-item b {
    color: var(--primary-light);
    font-weight: 600;
}

.review-comment-item small {
    color: var(--text-3);
    font-size: 0.65rem;
    margin-left: 4px;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.6rem;
}

.modal-content p {
    text-align: center;
    color: var(--text-2);
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.user-search input {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.user-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 380px;
    padding-right: 8px;
}

.user-btn {
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    text-align: left;
    transition: all 0.15s;
}

.user-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    padding-left: 20px;
}

/* Review modal */
.review-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.review-modal-content {
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
}

.review-modal-content h3 {
    margin-bottom: 18px;
    font-size: 1.2rem;
}

.review-stars-big {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 18px;
}

.star-btn {
    font-size: 2.2rem;
    cursor: pointer;
    transition: all 0.12s;
    color: #fcd34d;
}

.star-btn:hover {
    transform: scale(1.25);
}

.star-selected {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.review-comment {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    resize: none;
    margin-bottom: 12px;
    font-family: inherit;
}

.review-comment:focus {
    outline: none;
    border-color: var(--primary);
}

.review-comment::placeholder {
    color: var(--text-3);
}

.review-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-skip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 28px;
    color: var(--text-3);
    font-size: 0.85rem;
}

/* Ranking modal */
.ranking-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.ranking-content {
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    max-width: 380px;
    width: 90%;
}

.ranking-content h3 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1.2rem;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    max-height: 320px;
    overflow-y: auto;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
}

.rank-item.rank-me {
    background: var(--primary-glow);
    border-color: var(--primary);
}

.rank-pos {
    font-size: 1.1rem;
    min-width: 28px;
}

.rank-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.rank-visits {
    font-size: 0.75rem;
    color: var(--text-3);
}

/* Game modal */
.game-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.game-content {
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
    text-align: center;
}

.game-content h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.game-content canvas {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: block;
    margin: 0 auto;
    max-width: 100%;
    touch-action: none;
}

.game-score {
    margin: 10px 0 4px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.game-hint {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-bottom: 12px;
}

.game-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.game-buttons .btn-main {
    flex: 1;
    max-width: 140px;
    font-size: 0.8rem;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 80px;
    right: 16px;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.85rem;
    z-index: 1001;
    animation: toastIn 0.3s ease-out;
    max-width: calc(100vw - 32px);
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== NOTIFICATION BANNER ===== */
.in-app-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10001;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.in-app-notification.success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.in-app-notification.hiding {
    animation: slideUp 0.3s forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.in-app-notification .notif-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.in-app-notification .notif-content strong {
    font-size: 1rem;
}

.in-app-notification .notif-content span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.in-app-notification button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ===== CHAT ===== */
.chat-fab {
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 1000;
}

.chat-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #059669);
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.chat-btn:hover {
    transform: scale(1.08);
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.chat-panel {
    position: fixed;
    bottom: 78px;
    right: 16px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 420px;
    max-height: calc(100vh - 140px);
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.96);
    transition: all 0.25s ease;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.chat-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border-bottom: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-close {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.chat-close:hover {
    background: var(--danger);
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-loading {
    text-align: center;
    color: var(--text-3);
    padding: 18px;
    font-size: 0.85rem;
}

.chat-message {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    max-width: 82%;
    animation: fadeIn 0.2s ease;
}

.chat-message.me {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(99, 102, 241, 0.3);
}

.chat-message-author {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 3px;
}

.chat-message.me .chat-message-author {
    color: #a5b4fc;
}

.chat-message-text {
    font-size: 0.85rem;
    color: var(--text);
    word-break: break-word;
}

.chat-message-time {
    font-size: 0.6rem;
    color: var(--text-3);
    margin-top: 3px;
    text-align: right;
}

.chat-form {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.chat-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 0.85rem;
}

.chat-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-form input::placeholder {
    color: var(--text-3);
}

.chat-form button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-size: 1rem;
}

.chat-form button:hover {
    transform: scale(1.08);
}

/* ===== INSTALL PROMPT ===== */
.install-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10000;
    font-size: 0.85rem;
}

.install-prompt button {
    background: white;
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.8rem;
}

.install-prompt button:last-child {
    background: transparent;
    color: white;
    padding: 6px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
        padding: 0 10px 100px;
        gap: 10px;
    }

    .dashboard {
        padding: 8px 10px;
        gap: 6px;
    }

    .dash-row {
        flex-direction: column;
    }

    .dash-card {
        padding: 10px 12px;
    }

    .stats-card {
        justify-content: space-evenly;
    }

    .stat {
        padding: 4px 8px;
        min-width: 42px;
    }

    .stat-num {
        font-size: 1.15rem;
    }

    .stat-divider {
        height: 22px;
    }

    .tile-fortune,
    .tile-fact {
        padding: 10px 12px;
    }

    .tile-icon-big {
        font-size: 1.3rem;
    }

    .tile-content {
        font-size: 0.78rem;
    }

    .person-chip {
        padding: 6px 12px;
        min-width: 0;
    }

    .chip-name {
        font-size: 0.78rem;
    }

    .actions-row {
        justify-content: center;
        flex-direction: row;
    }

    .action-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .topbar {
        padding: 8px 10px;
    }

    h1 {
        font-size: 1rem;
    }

    .topbar-avatar {
        width: 34px;
        height: 34px;
    }

    .icon-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .chat-panel {
        bottom: 74px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
        height: 380px;
    }

    .chat-fab {
        bottom: 16px;
        right: 12px;
    }
}

/* ===== MISC LEGACY ===== */
details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

details summary {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    color: var(--text-2);
}

details summary::after {
    content: '+';
    color: var(--primary);
}

details[open] summary::after {
    content: '−';
}

details[open] summary {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text);
}

.details-content {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.mini-list {
    list-style: none;
    max-height: 90px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.mini-item {
    font-size: 0.8rem;
    padding: 7px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

.mini-item.me {
    background: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
}

.timer-display {
    font-family: monospace;
    font-weight: 600;
    color: var(--warn);
    margin-left: 4px;
}

.mini-form {
    display: flex;
    gap: 6px;
}

input[type="text"],
input[type="time"] {
    flex: 1;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-size: 0.85rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

input::placeholder {
    color: var(--text-3);
}

input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
}

.btn-small {
    padding: 9px 14px;
    font-size: 0.8rem;
}

.btn-add {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-xs);
    font-weight: 600;
}

.btn-add:hover {
    background: var(--secondary);
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    animation: fadeIn 0.2s;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: lightboxSpin 2s ease-in-out infinite alternate;
}

@keyframes lightboxSpin {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(180deg);
    }
}

/* ===== GÓWNOCOINS DISPLAY ===== */
.coin-display {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fcd34d;
    cursor: default;
    white-space: nowrap;
}

#coin-balance {
    font-variant-numeric: tabular-nums;
}

/* Coin earned animation */
.coin-earned-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    color: #fcd34d;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.5), 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    pointer-events: none;
    animation: coinPopup 2.5s ease-out forwards;
}

@keyframes coinPopup {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    15% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    30% {
        transform: translate(-50%, -50%) scale(1);
    }

    80% {
        transform: translate(-50%, -80%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -120%) scale(0.8);
        opacity: 0;
    }
}

/* ===== THEME SHOP ===== */
.theme-shop-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.theme-shop-content {
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    max-width: 440px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
}

.theme-shop-content h3 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.theme-shop-balance {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-2);
    margin-bottom: 18px;
}

.theme-shop-balance strong {
    color: #fcd34d;
}

.theme-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.theme-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    transition: all 0.2s;
}

.theme-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.theme-preview {
    width: 70px;
    min-height: 80px;
    flex-shrink: 0;
}

.theme-preview-default {
    background: linear-gradient(135deg, #12121f, #1a1a2e);
    border-right: 3px solid #6366f1;
}

.theme-preview-retro {
    background: linear-gradient(135deg, #0a1a0a, #0d2b0d);
    border-right: 3px solid #00ff41;
}

.theme-preview-neon {
    background: linear-gradient(135deg, #0a0a0f, #15001f);
    border-right: 3px solid #ff00ff;
}

.theme-preview-pastel {
    background: linear-gradient(135deg, #f0e6f6, #e6f0f6);
    border-right: 3px solid #c084fc;
}

.theme-preview-gold {
    background: linear-gradient(135deg, #1a1505, #2a2008);
    border-right: 3px solid #fbbf24;
}

.theme-info {
    flex: 1;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.theme-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

.theme-desc {
    font-size: 0.75rem;
    color: var(--text-3);
}

.theme-btn {
    margin-top: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    align-self: flex-start;
}

.theme-btn.buy {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}

.theme-btn.buy:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.theme-btn.owned {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.theme-btn.owned:hover {
    filter: brightness(1.15);
}

.theme-btn.active {
    background: var(--success);
    color: white;
    opacity: 0.8;
    cursor: default;
}

/* ===== RPS MODALS ===== */
.rps-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.rps-content {
    background: linear-gradient(135deg, #1e1e2f, #2a2a4a);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    max-width: 380px;
    width: 92%;
}

.rps-content h3 {
    margin-bottom: 18px;
    font-size: 1.2rem;
}

.rps-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}

.rps-player {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 1px solid var(--border);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rps-player-me {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.rps-player-opponent {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.rps-vs-text {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-3);
}

.rps-choices {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 18px;
}

.rps-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.rps-choice:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary-glow);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.rps-choice:disabled {
    opacity: 0.4;
    cursor: default;
}

.rps-choice.selected {
    border-color: var(--primary) !important;
    background: var(--primary-glow) !important;
    opacity: 1 !important;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: rpsPulse 1s infinite;
}

@keyframes rpsPulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 30px var(--primary-glow), 0 0 50px var(--primary-glow);
    }
}

.rps-choice-emoji {
    font-size: 2rem;
}

.rps-choice-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rps-status {
    font-size: 0.9rem;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
}

/* RPS waiting spinner */
.rps-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
}

.rps-waiting-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RPS Result */
.rps-result-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 20px 0;
}

.rps-result-move {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.rps-result-emoji {
    font-size: 3rem;
    animation: resultBounce 0.5s ease-out;
}

@keyframes resultBounce {
    0% {
        transform: scale(0);
    }

    60% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.rps-result-move span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
}

.rps-result-vs {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-3);
}

.rps-result-text {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 14px;
    border-radius: var(--radius);
    margin: 12px 0 18px;
}

.rps-result-text.rps-win {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: winGlow 1s ease-in-out 2;
}

@keyframes winGlow {

    0%,
    100% {
        box-shadow: none;
    }

    50% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    }
}

.rps-result-text.rps-lose {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.rps-result-text.rps-draw {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* RPS Challenge button in queue */
.queue-item-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.rps-challenge-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rps-challenge-btn:hover {
    background: rgba(245, 158, 11, 0.3);
    transform: scale(1.1);
}

/* RPS Invite Banner */
.rps-invite-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    padding: 12px 16px;
    z-index: 10002;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.rps-invite-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.rps-invite-content span {
    font-size: 0.9rem;
    font-weight: 600;
}

.rps-invite-buttons {
    display: flex;
    gap: 8px;
}

.rps-accept-btn,
.rps-reject-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}

.rps-accept-btn {
    background: #10b981;
    color: white;
}

.rps-accept-btn:hover {
    background: #059669;
}

.rps-reject-btn {
    background: rgba(0, 0, 0, 0.15);
    color: #000;
}

.rps-reject-btn:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ===== THEME: RETRO ===== */
body.theme-retro {
    --bg: #0a1a0a;
    --surface: #0d2b0d;
    --border: #1a4a1a;
    --text: #00ff41;
    --text-2: #00cc33;
    --text-3: #008822;
    --primary: #00ff41;
    --secondary: #33ff66;
    --primary-glow: rgba(0, 255, 65, 0.1);
    --success: #00ff41;
    --danger: #ff3333;
    --warn: #ffff00;
    font-family: 'Courier New', monospace !important;
}

body.theme-retro * {
    font-family: inherit;
}

body.theme-retro .topbar {
    background: linear-gradient(135deg, #0d2b0d, #1a4a1a);
    border-bottom-color: #00ff41;
}

body.theme-retro .toilet-card {
    background: #0d2b0d;
    border-color: #1a4a1a;
}

body.theme-retro .card-header {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.08), rgba(0, 255, 65, 0.04));
}

body.theme-retro .btn-main {
    font-family: 'Courier New', monospace;
}

body.theme-retro .status-free {
    color: #00ff41;
}

body.theme-retro .status-occupied {
    color: #ff3333;
}

/* ===== THEME: NEON ===== */
body.theme-neon {
    --bg: #0a0a0f;
    --surface: #12121f;
    --border: #2a1a3a;
    --text: #e0d0ff;
    --text-2: #c0a0ee;
    --text-3: #7a5aaa;
    --primary: #ff00ff;
    --secondary: #00ffff;
    --primary-glow: rgba(255, 0, 255, 0.15);
    --success: #00ff88;
    --danger: #ff0044;
    --warn: #ffaa00;
}

body.theme-neon .topbar {
    background: linear-gradient(135deg, #12121f, #1a1030);
    border-bottom: 1px solid #ff00ff;
    box-shadow: 0 2px 20px rgba(255, 0, 255, 0.2);
}

body.theme-neon .toilet-card {
    background: #12121f;
    border: 1px solid #2a1a3a;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.05);
}

body.theme-neon .card-header {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.08), rgba(0, 255, 255, 0.06));
}

body.theme-neon .coin-display {
    border-color: rgba(255, 0, 255, 0.4);
    background: rgba(255, 0, 255, 0.1);
}

body.theme-neon .btn-main.btn-enter {
    background: linear-gradient(135deg, #ff00ff, #cc00cc);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

body.theme-neon .btn-main.btn-quick {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

body.theme-neon .action-icon {
    border-color: #2a1a3a;
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.1);
}

/* ===== THEME: PASTEL ===== */
body.theme-pastel {
    --bg: #faf5ff;
    --surface: #f3e8ff;
    --border: #e2d0f0;
    --text: #3b1f5e;
    --text-2: #5a3a7e;
    --text-3: #9a7abb;
    --primary: #a855f7;
    --secondary: #ec4899;
    --primary-glow: rgba(168, 85, 247, 0.1);
    --success: #34d399;
    --danger: #f87171;
    --warn: #fbbf24;
}

body.theme-pastel .topbar {
    background: linear-gradient(135deg, #f3e8ff, #fce7f3);
    border-bottom-color: #e2d0f0;
}

body.theme-pastel .toilet-card {
    background: white;
    border: 1px solid #e2d0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body.theme-pastel .card-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(236, 72, 153, 0.04));
}

body.theme-pastel .coin-display {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #b45309;
}

body.theme-pastel .dashboard .dash-card,
body.theme-pastel .dashboard .tile {
    background: white;
    border-color: #e2d0f0;
}

body.theme-pastel .action-icon {
    background: white;
    border-color: #e2d0f0;
}

body.theme-pastel .toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: #e2d0f0;
    color: #3b1f5e;
}

body.theme-pastel .chat-panel {
    background: linear-gradient(135deg, #fff, #fdf2f8);
}

body.theme-pastel .chat-message {
    background: #f3e8ff;
}

body.theme-pastel .chat-message.me {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.1));
}

body.theme-pastel input,
body.theme-pastel textarea {
    background: white;
    color: #3b1f5e;
}

/* ===== THEME: GOLD VIP ===== */
body.theme-gold {
    --bg: #0f0d08;
    --surface: #1a1508;
    --border: #3a3018;
    --text: #ffd700;
    --text-2: #daa520;
    --text-3: #8b7025;
    --primary: #ffd700;
    --secondary: #f0c040;
    --primary-glow: rgba(255, 215, 0, 0.1);
    --success: #50c878;
    --danger: #dc3545;
    --warn: #ffa500;
}

body.theme-gold .topbar {
    background: linear-gradient(135deg, #1a1508, #2a2010);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 2px 20px rgba(255, 215, 0, 0.1);
}

body.theme-gold .toilet-card {
    background: linear-gradient(135deg, #1a1508, #201a0c);
    border: 1px solid #3a3018;
}

body.theme-gold .card-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(218, 165, 32, 0.05));
}

body.theme-gold .coin-display {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

body.theme-gold .btn-main.btn-enter {
    background: linear-gradient(135deg, #ffd700, #daa520);
    color: #000;
}

body.theme-gold .btn-main.btn-quick {
    background: linear-gradient(135deg, #50c878, #3aaa60);
}

body.theme-gold .action-icon {
    border-color: #3a3018;
    background: #1a1508;
}

body.theme-gold .stat-num {
    color: #ffd700;
}

body.theme-gold .dashboard .dash-card,
body.theme-gold .dashboard .tile {
    background: #1a1508;
    border-color: #3a3018;
}

/* Mobile overrides for new elements */
@media (max-width: 600px) {
    .coin-display {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .rps-choices {
        gap: 8px;
    }

    .rps-choice {
        padding: 12px 14px;
        min-width: 65px;
    }

    .rps-choice-emoji {
        font-size: 1.6rem;
    }

    .theme-card {
        flex-direction: column;
    }

    .theme-preview {
        width: 100%;
        min-height: 30px;
    }

    .rps-invite-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== CASINO ===== */
.casino-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(6px);
}

.casino-content {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.casino-content h3 {
    font-size: 1.5rem;
    margin: 0 0 12px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.casino-balance {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    padding: 8px 16px;
    margin: 0 auto 16px;
    display: inline-block;
    font-size: 1.1rem;
}

.casino-balance strong {
    color: #fbbf24;
}

/* Casino Game Selector */
.casino-games {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.casino-game-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.casino-game-btn:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.casino-game-icon {
    font-size: 2rem;
}

.casino-game-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.casino-game-desc {
    font-size: 0.75rem;
    opacity: 0.6;
    display: block;
}

/* Bet Row */
.casino-bet-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0;
    font-size: 1rem;
}

.casino-bet-row label {
    opacity: 0.7;
}

.bet-btn {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-btn:hover {
    background: rgba(245, 158, 11, 0.4);
}

.casino-spin-btn {
    font-size: 1.1rem !important;
    padding: 12px 24px !important;
    margin: 8px 0 !important;
}

/* SLOTS */
.slots-machine {
    background: linear-gradient(180deg, #2a1a3e, #1a0e2a);
    border: 3px solid #fbbf24;
    border-radius: 16px;
    padding: 20px;
    margin: 16px auto;
}

.slots-reels {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.slot-reel {
    width: 70px;
    height: 70px;
    background: linear-gradient(180deg, #0a0a1a, #1a1a2e);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    transition: transform 0.2s;
}

.slot-reel.slot-reveal {
    transform: scale(1.2);
    border-color: #fbbf24;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.slots-result,
.roulette-result,
.poker-result {
    min-height: 28px;
    margin: 8px 0;
    font-size: 1rem;
}

.casino-win {
    color: #34d399;
    font-weight: 700;
    font-size: 1.1rem;
    animation: casinoWinPulse 0.6s ease;
}

.casino-lose {
    color: #fb7185;
    opacity: 0.8;
}

@keyframes casinoWinPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ROULETTE */
.roulette-wheel {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#c0392b 0deg 9.7deg, #2c3e50 9.7deg 19.4deg,
            #c0392b 19.4deg 29.2deg, #2c3e50 29.2deg 38.9deg,
            #c0392b 38.9deg 48.6deg, #2c3e50 48.6deg 58.4deg,
            #c0392b 58.4deg 68.1deg, #2c3e50 68.1deg 77.8deg,
            #c0392b 77.8deg 87.6deg, #2c3e50 87.6deg 97.3deg,
            #c0392b 97.3deg 107deg, #2c3e50 107deg 116.8deg,
            #c0392b 116.8deg 126.5deg, #2c3e50 126.5deg 136.2deg,
            #c0392b 136.2deg 146deg, #2c3e50 146deg 155.7deg,
            #c0392b 155.7deg 165.4deg, #2c3e50 165.4deg 175.1deg,
            #27ae60 175.1deg 184.9deg,
            #c0392b 184.9deg 194.6deg, #2c3e50 194.6deg 204.3deg,
            #c0392b 204.3deg 214.1deg, #2c3e50 214.1deg 223.8deg,
            #c0392b 223.8deg 233.5deg, #2c3e50 233.5deg 243.2deg,
            #c0392b 243.2deg 253deg, #2c3e50 253deg 262.7deg,
            #c0392b 262.7deg 272.4deg, #2c3e50 272.4deg 282.2deg,
            #c0392b 282.2deg 291.9deg, #2c3e50 291.9deg 301.6deg,
            #c0392b 301.6deg 311.4deg, #2c3e50 311.4deg 321.1deg,
            #c0392b 321.1deg 330.8deg, #2c3e50 330.8deg 340.5deg,
            #c0392b 340.5deg 350.3deg, #2c3e50 350.3deg 360deg);
    border: 3px solid #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto;
    position: relative;
    transition: transform 0.3s;
}

.roulette-wheel.spinning {
    animation: rouletteSpin 0.8s linear infinite;
}

@keyframes rouletteSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.roulette-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1a1a2e;
    border: 2px solid #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.roulette-color-red {
    background: #c0392b;
    color: #fff;
}

.roulette-color-black {
    background: #2c3e50;
    color: #fff;
}

.roulette-color-green {
    background: #27ae60;
    color: #fff;
}

.roulette-bets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 12px 0;
}

.roulette-bet-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.roulette-bet-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.roulette-red {
    background: #c0392b;
}

.roulette-black {
    background: #2c3e50;
}

.roulette-green {
    background: #27ae60;
}

.roulette-odd {
    background: rgba(155, 89, 182, 0.6);
    border-color: #9b59b6;
}

.roulette-even {
    background: rgba(52, 152, 219, 0.6);
    border-color: #3498db;
}

/* POKER */
.poker-cards {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 16px 0;
}

.poker-card {
    width: 56px;
    height: 80px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.poker-card.empty {
    background: linear-gradient(135deg, #2a1a3e, #1a0e2a);
    color: #fbbf24;
    font-size: 1.5rem;
    border-color: rgba(245, 158, 11, 0.3);
    cursor: default;
}

.poker-card.red .poker-card-value,
.poker-card.red .poker-card-suit {
    color: #e74c3c;
}

.poker-card.black .poker-card-value,
.poker-card.black .poker-card-suit {
    color: #2c3e50;
}

.poker-card-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.poker-card-suit {
    font-size: 1.4rem;
    line-height: 1;
}

.poker-card.held {
    border-color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    transform: translateY(-6px);
}

.poker-hold-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #fbbf24;
    color: #1a1a2e;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.poker-hand-name {
    font-size: 0.9rem;
    color: #a0aec0;
    min-height: 22px;
    margin: 4px 0;
}

.poker-paytable {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 10px 0;
}

.poker-paytable small {
    color: #a0aec0;
    font-size: 0.65rem;
    line-height: 1.5;
}

/* Casino Mobile */
@media (max-width: 600px) {
    .casino-content {
        padding: 16px;
        max-width: 95%;
    }

    .slot-reel {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .poker-card {
        width: 48px;
        height: 68px;
    }

    .poker-card-value {
        font-size: 0.95rem;
    }

    .poker-card-suit {
        font-size: 1.2rem;
    }

    .roulette-wheel {
        width: 100px;
        height: 100px;
    }

    .roulette-number {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}