* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff7eb3, #65d6ce);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.container {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 350px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
}

.status {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #444;
    min-height: 1.2em;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #ff7eb3;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    background: #ff4f94;
    transform: scale(1.05);
}

.secondary {
    background: #ccc;
    color: #333;
}

.secondary:hover {
    background: #aaa;
}

footer {
    margin-top: 25px;
    font-size: 0.8rem;
    color: #999;
}

.hidden {
    display: none !important;
}

.game-shell {
    width: min(1100px, 96vw);
    text-align: left;
}

.panel,
.card {
    background: #fff7fb;
    border: 1px solid #ffd3e5;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9d9e3;
    border-radius: 10px;
    font-size: 1rem;
}

.room-actions,
.toolbar-actions,
.chat-form,
.compact-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.room-actions {
    margin-top: 14px;
    flex-wrap: wrap;
}

.helper-text,
.muted {
    color: #666;
    font-size: 0.95rem;
}

.helper-text {
    margin-top: 12px;
}

.compact-menu {
    margin-top: 16px;
    justify-content: flex-end;
}

.small-btn {
    padding: 10px 14px;
    font-size: 0.92rem;
}

.eyebrow {
    font-size: 0.85rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.room-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.room-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    flex-wrap: wrap;
}

.room-status-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-pill {
    background: #ffffff;
    border: 1px solid #f2c6da;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 88px;
}

.stat-pill span {
    display: block;
    font-size: 0.76rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-pill strong {
    display: block;
    margin-top: 4px;
    color: #333;
}

.timer-live {
    color: #b42318 !important;
}

.lobby-note {
    margin-top: 6px;
}

.winner-banner {
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff7d6, #fff0f6);
    border-color: #f0c54f;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.secret-box {
    margin: 14px 0;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff0f6, #eefcff);
    border: 1px dashed #ff7eb3;
    font-weight: bold;
    min-height: 72px;
    display: flex;
    align-items: center;
}

.player-list,
.vote-grid,
.result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.player-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e8dce4;
}

.player-pill.current-player {
    border-color: #ff4f94;
    background: #fff0f7;
}

.vote-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    background: #5b7cfa;
    color: #fff;
    cursor: pointer;
    font-size: 0.96rem;
}

.vote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vote-btn.selected {
    background: #7a3cff;
}

.result-list {
    padding-left: 18px;
}

.chat-card {
    grid-column: span 2;
}

.chat-box {
    margin: 12px 0;
    background: #ffffff;
    border: 1px solid #ecdfe7;
    border-radius: 12px;
    min-height: 180px;
    max-height: 260px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f4f7ff;
}

.chat-message.system {
    background: #fff3cd;
}

.chat-message strong {
    display: block;
    margin-bottom: 4px;
}

.chat-form {
    align-items: stretch;
}

.chat-form .form-input {
    flex: 1;
}

table {
  border-collapse: collapse;
  border: 4px solid #ff4f94;
  font-family: sans-serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
}
th[scope="col"] {
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fbf9fc;
    border: 1px solid #df1a9d;
    font-family: bold 'Times New Roman', Times, serif;
    
}



.gold{
    background: linear-gradient(135deg, #fff7d6, #fff0f6) !important;
    border-color: #f0c54f !important;
    border: 1px solid #f0c54f !important;
}
.silver{
    background: linear-gradient(135deg, #e0e0e0, #d0d0d0) !important;
    border-color: #c0c0c0 !important;
    border: 1px solid #c0c0c0 !important;
}
.bronze{
    background: linear-gradient(135deg, #cd7f32, #b8860b) !important;
    border-color: #a9a9a9 !important;
    border: 1px solid #a9a9a9 !important;
}
@media (max-width: 760px) {
    .container {
        width: min(300vw, 800px);
        padding: 24px;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .chat-card {
        grid-column: span 1;
    }

    .room-toolbar,
    .toolbar-actions,
    .chat-form,
    .room-actions,
    .room-head {
        flex-direction: column;
        align-items: stretch;
    }
    
}

/* SETTINGS ITEMS */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.setting-item input {
    transform: scale(1.2);
    cursor: pointer;
}

/* DARK MODE BASE */
html.dark {
    color: #eee;
}

/* DARK MODE BACKGROUND */
html.dark body {
    background: linear-gradient(135deg, #2a0f1f, #0f2a25);
}

/* MAIN UI CONTAINERS */
html.dark .container {
    background: #1f1f2e;
    color: #eee;
}

/* CARDS / PANELS */
html.dark .card,
html.dark .panel {
    background: #1f1f2e;
    border-color: #333;
}

/* INPUTS */
html.dark input,
html.dark textarea,
html.dark .form-input {
    background: #2a2a3d;
    border: 1px solid #444;
    color: #eee;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #888;
}

/* BUTTONS */
html.dark .btn {
    background: #4f46e5;
}

html.dark .btn:hover {
    background: #4338ca;
}

/* TEXT COLORS */
html.dark .title {
    color: #fff;
}

html.dark .subtitle,
html.dark .status {
    color: #bbb;
}

/* GAME UI ELEMENTS */
html.dark .player-pill,
html.dark .stat-pill,
html.dark .chat-box,
html.dark .setting-item {
    background: #2a2a3d;
    border-color: #444;
}

/* SECRET BOX */
html.dark .secret-box {
    background: linear-gradient(135deg, #2a1a2e, #102a2a);
    border-color: #555;
}

/* CHAT MESSAGES */
html.dark .chat-message {
    color: #eee;
    background: #000 !important;
}


/* AUTH PAGE */
html.dark .auth-card {
    background: #1f1f2e;
    color: #eee;
}

html.dark .auth-form label {
    color: #ddd;
}

html.dark .auth-form input {
    background: #2a2a3d;
    border: 1px solid #444;
    color: #fff;
}

html.dark .tab {
    background: #2a2a3d;
    color: #ddd;
    border: 1px solid #444;
}

html.dark .tab.active {
    background: #4f46e5;
    color: white;
}

html.dark .back-link {
    color: #9aa4ff;
}
