@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f7f3ee;
    color: #2d3a35;
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 10% 10%, rgba(82, 121, 111, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, rgba(188, 108, 37, 0.07) 0%, transparent 50%);
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}

.app-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.page-title {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    text-align: center;
    color: #354f52;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    text-align: center;
    color: #7a8c82;
    font-size: 0.9rem;
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.game-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(82, 121, 111, 0.1);
    border: 1px solid rgba(82, 121, 111, 0.3);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.85rem;
    color: #52796f;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

.card {
    background: #ffffff;
    border: 1px solid #d6cfc6;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(45, 58, 53, 0.07);
}

.input-field {
    width: 100%;
    background: #f7f3ee;
    border: 1px solid #d6cfc6;
    border-radius: 12px;
    padding: 14px 18px;
    color: #2d3a35;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 12px;
}

.input-field:focus {
    border-color: #52796f;
    box-shadow: 0 0 0 3px rgba(82, 121, 111, 0.15);
}

.input-field::placeholder {
    color: #7a8c82;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #52796f;
    color: white;
    box-shadow: 0 4px 16px rgba(82, 121, 111, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #354f52;
    box-shadow: 0 8px 24px rgba(82, 121, 111, 0.3);
}

.btn-secondary {
    background: #eae4dd;
    color: #2d3a35;
    border: 1px solid #d6cfc6;
}

.btn-secondary:hover {
    background: #ddd6cc;
    transform: translateY(-2px);
}

.btn-green {
    background: #bc6c25;
    color: white;
    box-shadow: 0 4px 16px rgba(188, 108, 37, 0.2);
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(188, 108, 37, 0.3);
}

.btn-full {
    width: 100%;
}

.btn-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.section-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #7a8c82;
    margin-bottom: 12px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f7f3ee;
    border-radius: 12px;
    border: 1px solid #d6cfc6;
    transition: background 0.2s;
}

.player-row.is-me {
    background: rgba(82, 121, 111, 0.08);
    border-color: rgba(82, 121, 111, 0.3);
}

.player-score {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #52796f;
    border-radius: 8px;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.player-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2d3a35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-name.me {
    font-weight: 700;
}

.player-vote-label {
    font-size: 0.75rem;
    color: #7a8c82;
    white-space: nowrap;
    flex-shrink: 0;
}

.player-vote-val {
    font-size: 0.8rem;
    font-weight: 600;
    color: #52796f;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.player-guess-val {
    font-size: 0.8rem;
    font-weight: 600;
    color: #bc6c25;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.question-card {
    background: rgba(82, 121, 111, 0.08);
    border: 1px solid rgba(82, 121, 111, 0.25);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.question-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #52796f;
    margin-bottom: 8px;
}

.question-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.05rem, 3vw, 1.3rem);
    font-weight: 700;
    color: #2d3a35;
    line-height: 1.4;
}

.question-secondary {
    background: rgba(188, 108, 37, 0.07);
    border: 1px solid rgba(188, 108, 37, 0.2);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.question-secondary .question-tag {
    color: #bc6c25;
}

.vote-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vote-btn {
    padding: 11px 20px;
    border-radius: 10px;
    border: 1px solid #d6cfc6;
    background: #f7f3ee;
    color: #2d3a35;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-btn:hover {
    background: rgba(82, 121, 111, 0.1);
    border-color: rgba(82, 121, 111, 0.4);
    transform: translateY(-2px);
}

.vote-btn.selected {
    background: #52796f;
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(82, 121, 111, 0.3);
}

.vote-btn.guess-selected {
    background: #bc6c25;
    border-color: transparent;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(188, 108, 37, 0.25);
}

.divider {
    border: none;
    border-top: 1px solid #d6cfc6;
    margin: 20px 0;
}

.alert {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(180, 50, 50, 0.08);
    border: 1px solid rgba(180, 50, 50, 0.25);
    color: #8b2020;
}

.alert-warning {
    background: rgba(188, 108, 37, 0.1);
    border: 1px solid rgba(188, 108, 37, 0.3);
    color: #7a4010;
}

.waiting-hint {
    color: #7a8c82;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 8px;
}

.reveal-imposter {
    text-align: center;
    padding: 18px;
    background: rgba(82, 121, 111, 0.08);
    border: 1px solid rgba(82, 121, 111, 0.25);
    border-radius: 16px;
    margin-bottom: 16px;
}

.reveal-imposter-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7a8c82;
    margin-bottom: 6px;
}

.reveal-imposter-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #52796f;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(82, 121, 111, 0.12);
    border: 1px solid rgba(82, 121, 111, 0.3);
    color: #52796f;
    border-radius: 100px;
    padding: 2px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
}