/* ═══════════════════════════════════════════
   Phone Display — Mobile-first player interface
   ═══════════════════════════════════════════ */

.phone-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* dynamic viewport for mobile */
    display: flex;
    flex-direction: column;
    background: var(--bg-deep);
    overflow: hidden;
    position: relative;
}

/* ─── Phone Header ─── */

.phone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-card);
    flex-shrink: 0;
}

.phone-game-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.phone-game-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.phone-turn-info {
    font-size: 11px;
    color: var(--text-muted);
}

.phone-turn-info.my-turn {
    color: var(--gold);
    font-weight: 600;
}

.phone-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── Mini Game State ─── */

.phone-mini-state {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    -webkit-overflow-scrolling: touch;
}

.phone-mini-player {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-deep);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    font-size: 12px;
    border: 1px solid transparent;
}

.phone-mini-player.active {
    border-color: var(--gold);
    background: rgba(226, 183, 20, 0.08);
}

.phone-mini-player.me {
    border-color: var(--blue);
}

.phone-mini-player .name {
    font-weight: 600;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-mini-player .cards-count {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 11px;
}

/* ─── Center Area (play area / announcements) ─── */

.phone-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
}

.phone-play-area {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.phone-announcement {
    text-align: center;
    padding: 16px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
    max-width: 300px;
}

.phone-announcement-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.phone-announcement-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ─── Hand Display (bottom) ─── */

.phone-hand-section {
    flex-shrink: 0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg-surface), var(--bg-deep));
    border-top: 1px solid var(--border-card);
}

.phone-hand-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.phone-hand {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 4px 0;
}

/* ─── Action Panel ─── */

.phone-actions {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    justify-content: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.phone-actions .btn {
    flex: 1;
    max-width: 180px;
    justify-content: center;
    min-height: 48px;
    font-size: 15px;
}

/* ─── Waiting State ─── */

.phone-waiting {
    text-align: center;
    padding: 30px;
}

.phone-waiting-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.phone-waiting-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.phone-waiting-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ─── Phone Lobby ─── */

.phone-lobby {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 20px;
    background: var(--bg-deep);
}

.phone-lobby-title {
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.phone-lobby-section {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.phone-lobby-section h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
}

.phone-lobby-or {
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
}

/* ─── Lobby Room View (after joining) ─── */

.phone-room-lobby {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 20px;
    background: var(--bg-deep);
    overflow-y: auto;
}

.phone-room-header {
    text-align: center;
}

.phone-room-game-select {
    width: 100%;
    max-width: 340px;
}

.phone-game-option {
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 2px solid var(--border-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 200ms ease;
    margin-bottom: 8px;
}

.phone-game-option:hover {
    border-color: var(--text-muted);
}

.phone-game-option.selected {
    border-color: var(--gold);
    background: rgba(226, 183, 20, 0.06);
}

.phone-game-option-name {
    font-weight: 600;
    font-size: 16px;
}

.phone-game-option-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.phone-game-option-players {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    font-family: var(--font-mono);
}

/* ─── Responsive ─── */

@media (max-width: 380px) {
    .phone-hand .card {
        --card-width: 80px;
        --card-height: 112px;
    }
}
