:root {
    color-scheme: dark;
    background: #12151e;
    color: #f5f7fa;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

.app-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0;
}

p {
    margin: 8px auto 0;
    max-width: 720px;
    color: #b8c3db;
}

.card {
    background: rgba(22, 29, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
}

.panel {
    margin-bottom: 16px;
}

#lobby {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

button,
input {
    font: inherit;
}

label {
    display: block;
    margin-bottom: 14px;
    color: #d6dbe8;
}

label input {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #f5f7fa;
}

.readonly-input {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: #6084ff;
    color: white;
    transition: transform 0.16s ease, background 0.16s ease;
}

button:hover {
    transform: translateY(-1px);
    background: #4d6fe4;
}

button.primary {
    background: #4ddeff;
    color: #092331;
}

button.primary:hover {
    background: #2bc4e2;
}

.hidden {
    display: none !important;
}

.room-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.room-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
}

.room-box {
    min-height: 240px;
}

#player-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#player-list li {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 10px;
}

.game-board {
    display: grid;
    gap: 20px;
    grid-template-columns: 320px 1fr;
    align-items: start;
}

.photo-card {
    min-height: 360px;
    border-radius: 20px;
    overflow: hidden;
    background: #0f1420;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guess-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.status-text {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 68px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

#round-label,
#timer-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.toast {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

#round-result-players {
    margin-top: 16px;
}

#round-result-players .result-item {
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 840px) {
    .room-grid,
    .game-board {
        grid-template-columns: 1fr;
    }
}
