/* ===================================================================
   200 Card Game — Global Styles
   =================================================================== */

:root {
    /* Dark theme palette */
    --bg-primary: #0f1923;
    --bg-secondary: #1a2736;
    --bg-card: #1e3044;
    --bg-card-hover: #243b52;
    --bg-accent: #0d2137;
    --text-primary: #e8edf2;
    --text-secondary: #8899aa;
    --text-muted: #5a6d7e;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #a855f7;
    --border-color: #2a3f52;
    --border-light: #1e3348;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.2s ease;
    --table-green: #1a5c2e;
    --table-green-light: #1f6b35;
    --table-border: #2d7a43;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===================================================================
   Header
   =================================================================== */
.game-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-brand .brand-icon {
    font-size: 1.5rem;
}

.brand-logo {
    height: 63px;
    width: auto;
}

.header-brand h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-header {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    text-decoration: none;
}

.game-main {
    min-height: calc(100vh - 72px);
}

/* ===================================================================
   Login Page
   =================================================================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding: 2rem;
    background: url('assets/TwoHundo_splash.png') center center / cover no-repeat,
                radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.08), transparent 60%);
}

.login-card {
    background: rgba(17, 24, 39, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .login-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.login-logo {
    height: 80px;
    width: auto;
    display: block;
    margin: 0 auto 0.5rem;
}

.login-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0.25rem 0 0;
}

.login-description {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-google:hover {
    background: #f5f5f5;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: #333;
}

.test-accounts-section {
    margin-top: 1.5rem;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.test-accounts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.btn-test-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-test-account:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    text-decoration: none;
    color: var(--text-primary);
}

.test-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.test-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    margin-top: 1rem;
    line-height: 1.4;
}

/* ===================================================================
   Lobby Page
   =================================================================== */
.lobby-page {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.lobby-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
}

.lobby-full {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.lobby-full-content {
    text-align: center;
    padding: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 420px;
}

.lobby-full-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.lobby-full-content h2 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.lobby-full-content p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}

.btn-retry {
    padding: 0.6rem 1.5rem;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s;
}

.btn-retry:hover {
    background: var(--accent-blue-hover, #1a6fd4);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.lobby-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.2rem;
}

.player-count {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

/* Room Cards */
.rooms-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.room-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition);
}

.room-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
}

.room-card.room-playing {
    border-left: 3px solid var(--accent-amber);
}

.room-card.room-waiting {
    border-left: 3px solid var(--accent-green);
}

.room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.room-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.room-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.badge-waiting {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
}

.badge-playing {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.room-seats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.seat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem 0.4rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.seat-empty {
    background: rgba(90, 109, 126, 0.1);
    border: 1px dashed var(--border-color);
}

.seat-occupied {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.seat-icon {
    font-size: 1.2rem;
    opacity: 0.7;
}

.seat-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.seat-occupied .seat-name {
    color: var(--text-primary);
    font-weight: 500;
}

.room-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.btn-join {
    padding: 0.45rem 1.2rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-join:hover {
    background: #2563eb;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.room-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Players List */
.lobby-players {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.player-item:hover {
    background: var(--bg-card-hover);
}

.player-item.player-self {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.player-avatar {
    position: relative;
    flex-shrink: 0;
}

.player-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
}

.test-badge {
    position: absolute;
    bottom: -2px;
    right: -4px;
    font-size: 0.6rem;
}

.player-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-name {
    font-size: 0.85rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.you-badge {
    color: var(--accent-blue);
    font-weight: 400;
    font-size: 0.75rem;
}

.player-location {
    font-size: 0.7rem;
}

.player-location.in-lobby {
    color: var(--accent-green);
}

.player-location.in-room {
    color: var(--accent-amber);
}

/* ===================================================================
   Room Page
   =================================================================== */
.room-page {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
}

.room-header-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.room-header-bar h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
}

.btn-back {
    padding: 0.4rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.room-content {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 1.5rem;
    align-items: start;
    transition: grid-template-columns 0.3s ease;
}

.room-content.waiting-collapsed {
    grid-template-columns: 1fr 0;
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
}

/* Card Table */
.game-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.table-felt {
    background: radial-gradient(ellipse at center, var(--table-green-light), var(--table-green));
    border: 3px solid var(--table-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
}

.table-label {
    color: rgba(255, 255, 255, 0.15);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: absolute;
    pointer-events: none;
}

.table-seats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

.table-seat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.5rem;
    border-radius: var(--radius-md);
    min-width: 120px;
    transition: var(--transition);
}

.table-seat.seat-empty {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.table-seat.seat-occupied {
    background: transparent;
    border: 1px solid transparent;
}

.seat-top {
    grid-column: 2;
    grid-row: 1;
}

.seat-right {
    grid-column: 3;
    grid-row: 2;
}

.seat-bottom {
    grid-column: 2;
    grid-row: 3;
}

.seat-left {
    grid-column: 1;
    grid-row: 2;
}

.table-seat.seat-self.seat-empty {
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.btn-take-seat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    background: none;
    border: 2px dashed rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.5);
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
    width: 100%;
}

.btn-take-seat:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(34, 197, 94, 0.1);
}

.empty-seat-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.seated-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.seated-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.btn-leave-seat {
    padding: 0.2rem 0.6rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-leave-seat:hover {
    background: rgba(239, 68, 68, 0.35);
}

.seat-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.seat-occupied .seat-label {
    display: none;
}

/* Score Sheet */
.score-sheet {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.score-sheet h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.score-table-wrapper {
    overflow-x: auto;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.score-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.score-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.score-table tr.team-us td {
    color: var(--accent-blue);
}

.score-table tr.team-them td {
    color: var(--accent-red);
}

.no-scores {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1.5rem 0.75rem !important;
}

.score-totals td {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    font-size: 0.85rem;
}

.games-won td {
    background: var(--bg-accent);
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Waiting Area */
.waiting-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: sticky;
    top: 76px;
    overflow: hidden;
    transition: opacity 0.3s ease, padding 0.3s ease;
}

.waiting-collapsed .waiting-area {
    opacity: 0;
    padding: 0;
    border: none;
    pointer-events: none;
}

.waiting-area h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.waiting-players-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.waiting-player {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.waiting-player.player-self {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.empty-waiting {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

/* ===================================================================
   Error Toast
   =================================================================== */
.error-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--accent-red);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.error-toast button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    opacity: 0.7;
    transition: var(--transition);
}

.error-toast button:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================================
   Blazor Error UI
   =================================================================== */
.blazor-error-boundary {
    background: var(--accent-red);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: var(--radius-sm);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    display: none;
    background: var(--accent-red);
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
}

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 900px) {
    .lobby-container {
        grid-template-columns: 1fr;
    }

    .room-content {
        grid-template-columns: 1fr;
    }

    .lobby-players {
        position: static;
        max-height: none;
    }

    .waiting-area {
        position: static;
    }

    .table-seats {
        max-width: 100%;
    }

    .room-seats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================================================
   Scrollbar Styling
   =================================================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===================================================================
   Room Header Actions & Re-Deal Button
   =================================================================== */
.room-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-redeal {
    padding: 0.4rem 1rem;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-redeal:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.btn-redeal:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===================================================================
   Dealer Chip
   =================================================================== */
.seated-player-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.seated-player-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seated-player-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.seat-self .seated-player-avatar img {
    border-color: var(--accent-blue);
}

.seat-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.seat-self .seat-avatar-placeholder {
    border-color: var(--accent-blue);
}

.seated-player-avatar .dealer-chip {
    position: absolute;
    bottom: -2px;
    right: -4px;
}

.dealer-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a1a;
    font-size: 0.65rem;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    flex-shrink: 0;
    animation: dealerPulse 2s ease-in-out infinite;
}

@keyframes dealerPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.4); }
}

/* ===================================================================
   Deal Target (invisible — for JS animation positioning)
   =================================================================== */
.deal-target {
    position: absolute;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* ===================================================================
   Table Center Label (pre-deal)
   =================================================================== */
.table-center-label {
    color: rgba(255, 255, 255, 0.12);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
    user-select: none;
}

/* ===================================================================
   Deck Container (created by JS)
   =================================================================== */
.deck-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 100px;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 50;
}

.deck-container.deck-visible {
    opacity: 1;
}

.deck-container.deck-depleted {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    transition: all 0.4s ease;
}

.deck-card {
    position: absolute !important;
    width: 70px;
    height: 100px;
    border-radius: 6px;
    top: 0;
    left: 0;
}

/* ===================================================================
   Card Back Pattern
   =================================================================== */
.card-back {
    background: linear-gradient(135deg, #1e3a5f 0%, #2b5278 50%, #1e3a5f 100%);
    border: 2px solid #3b6d99;
    border-radius: 6px;
    overflow: hidden;
}

.card-back::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        rgba(255, 255, 255, 0.04) 4px,
        rgba(255, 255, 255, 0.04) 8px
    );
}

.card-back::after {
    content: '🂠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    opacity: 0.3;
}

/* Deck card transitions are set inline by JS during shuffle */

/* ===================================================================
   Flying Card (JS deal animation)
   =================================================================== */
.flying-card {
    position: absolute;
    width: 50px;
    height: 72px;
    border-radius: 5px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.flying-card.card-back {
    border-width: 1.5px;
}

.flying-card.card-back::after {
    font-size: 1rem;
}

/* ===================================================================
   Kitty Area (center of table)
   =================================================================== */
.kitty-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    z-index: 10;
}

.kitty-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 80px;
    height: 50px;
}

.kitty-card {
    position: absolute;
    transition: transform 0.3s ease;
}

.card-back-small {
    width: 36px;
    height: 52px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2b5278 50%, #1e3a5f 100%);
    border: 1.5px solid #3b6d99;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.card-back-small::before {
    content: '';
    position: absolute;
    inset: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(255, 255, 255, 0.03) 3px,
        rgba(255, 255, 255, 0.03) 6px
    );
}

.kitty-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    white-space: nowrap;
}

/* Deal Button – stacked deck of cards */
.btn-deal-deck {
    position: relative;
    width: 72px;
    height: 100px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease;
}

.btn-deal-deck:hover {
    transform: scale(1.06);
}

.btn-deal-deck:active {
    transform: scale(0.97);
}

.deck-card {
    position: absolute;
    width: 72px;
    height: 100px;
    border-radius: 6px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2b5278 50%, #1e3a5f 100%);
    border: 1.5px solid #4a8abf;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Stacked offset cards underneath */
.deck-card-3 {
    top: 0;
    left: 0;
    transform: rotate(-3deg) translate(-3px, 4px);
}

.deck-card-2 {
    top: 0;
    left: 0;
    transform: rotate(1.5deg) translate(2px, 2px);
}

.deck-card-1 {
    top: 0;
    left: 0;
    transform: rotate(-0.5deg) translate(-1px, 1px);
}

/* Top card – the one you see */
.deck-card-top {
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2b5278 40%, #1e3a5f 100%);
    border-color: #5a9fd4;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    animation: deck-glow 2s ease-in-out infinite;
}

/* Decorative inner border pattern on top card */
.deck-card-top::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.deck-label {
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes deck-glow {
    0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(90, 159, 212, 0.45); }
}

.waiting-for-deal {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
}

/* ===================================================================
   Other Players' Face-Down Cards (mini stacks at seats)
   =================================================================== */
.other-player-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.25rem;
}

.card-back-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 50px;
    height: 30px;
}

.mini-card-back {
    position: absolute;
    width: 22px;
    height: 32px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2b5278 50%, #1e3a5f 100%);
    border: 1px solid #3b6d99;
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.mini-card-back::before {
    content: '';
    position: absolute;
    inset: 1px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.card-count-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

/* ===================================================================
   Player's Hand (bottom of game area)
   =================================================================== */
.player-hand-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem 1.5rem;
    text-align: center;
    animation: handAppear 0.5s ease;
    overflow: hidden;
}

.hand-title {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes handAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-hand {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    flex-wrap: nowrap;
    padding: 0.5rem 0 1rem;
    perspective: 800px;
    overflow: visible;
    max-width: 100%;
}

/* ===================================================================
   Individual Hand Card (face-up)
   =================================================================== */
.hand-card {
    width: 68px;
    height: 98px;
    border-radius: 6px;
    background: #fefefe;
    border: 1px solid #ccc;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transform: rotate(var(--fan-angle, 0deg)) translateY(var(--fan-y, 0px));
    transform-origin: bottom center;
    animation: cardReveal 0.3s ease both;
}

.hand-card:hover {
    transform: rotate(var(--fan-angle, 0deg)) translateY(calc(var(--fan-y, 0px) - 12px));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: rotate(var(--fan-angle, 0deg)) translateY(calc(var(--fan-y, 0px) + 30px));
    }
    to {
        opacity: 1;
        transform: rotate(var(--fan-angle, 0deg)) translateY(var(--fan-y, 0px));
    }
}

/* Card Colors */
.hand-card.card-red {
    color: #dc2626;
}

.hand-card.card-black {
    color: #1a1a1a;
}

/* Card Corner (rank + suit symbol) */
.card-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.card-corner.top-left {
    top: 4px;
    left: 5px;
}

.card-corner.bottom-right {
    bottom: 4px;
    right: 5px;
    transform: rotate(180deg);
}

.card-rank {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.card-suit-symbol {
    font-size: 0.6rem;
    line-height: 1;
}

/* Card Center (large suit symbol) */
.card-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-suit-big {
    font-size: 1.8rem;
    opacity: 0.85;
}

/* ===================================================================
   Suit Separator (divider between suit groups)
   =================================================================== */
.suit-separator {
    width: 2px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(59, 130, 246, 0.3) 30%,
        rgba(59, 130, 246, 0.3) 70%,
        transparent
    );
    margin: 0 6px;
    align-self: center;
    flex-shrink: 0;
}

/* ===================================================================
   Card Dealing Responsive Adjustments
   =================================================================== */
@media (max-width: 900px) {
    .hand-card {
        width: 54px;
        height: 78px;
    }

    .card-rank {
        font-size: 0.65rem;
    }

    .card-suit-symbol {
        font-size: 0.5rem;
    }

    .card-suit-big {
        font-size: 1.3rem;
    }

    .player-hand {
        gap: 1px;
    }

    .suit-separator {
        margin: 0 3px;
        height: 48px;
    }

    .deck-card {
        width: 56px;
        height: 80px;
    }

    .deck-container {
        width: 56px;
        height: 80px;
    }

    .flying-card {
        width: 40px;
        height: 58px;
    }
}

/* ===================================================================
   Bidding Panel
   =================================================================== */
.bidding-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
}

.bidding-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Bid Controls (shown to current bidder) */
.bid-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bid-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-bid {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 48px;
}

.btn-bid:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.btn-bid-special {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-color: #d97706;
    font-weight: 700;
}

.btn-bid-special:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: #f59e0b;
}

.bid-action-buttons {
    display: flex;
    gap: 8px;
}

.btn-pass {
    padding: 0.45rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid #ef4444;
    background: transparent;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-pass:hover {
    background: #ef4444;
    color: #fff;
}

.btn-keep {
    padding: 0.45rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid #22c55e;
    background: transparent;
    color: #22c55e;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-keep:hover {
    background: #22c55e;
    color: #fff;
}

/* Bid waiting message */
.bid-waiting {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

/* Bid winner banner */
.bid-winner-banner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #22c55e;
    margin-bottom: 0.75rem;
}

/* Pick up kitty button */
.btn-pickup-kitty {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: pulseGlow 2s ease-in-out infinite;
}

.btn-pickup-kitty:hover {
    background: #f59e0b;
    color: #000;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }
}

/* Discard status */
.discard-status {
    color: #f59e0b;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

/* Bid History */
.bid-history {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.bid-history h4 {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bid-history-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 150px;
    overflow-y: auto;
}

.bid-history-entry {
    display: flex;
    justify-content: space-between;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.03);
}

.bid-history-entry.bid-passed {
    opacity: 0.5;
}

.bid-history-entry.bid-keep {
    background: rgba(34, 197, 94, 0.08);
}

.bid-player-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.bid-value {
    color: var(--text-primary);
    font-weight: 700;
}

.bid-passed .bid-value {
    color: #ef4444;
    font-weight: 400;
}

.bid-keep .bid-value {
    color: #22c55e;
}

/* ===================================================================
   Popup Overlay (Bidding & Trump — floats over table)
   =================================================================== */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    border-radius: var(--radius-xl);
}

.popup-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    min-width: 220px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-lg);
    animation: popupIn 0.2s ease-out;
}

@keyframes popupIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.popup-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.popup-high-bid {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    text-align: center;
}

/* ── Bid Spinner (slot-machine digits) ─────────────────────── */
.bid-spinner-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.bid-spinner-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.spinner-digit {
    width: 56px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-variant-numeric: tabular-nums;
    user-select: none;
}

.spinner-arrow {
    width: 56px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.12s ease;
    user-select: none;
}

.spinner-arrow:hover:not(:disabled) {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.spinner-arrow:active:not(:disabled) {
    transform: scale(0.95);
}

.spinner-arrow:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn-submit-bid {
    width: 100%;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--accent-blue);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.08));
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 0.25rem;
}

.btn-submit-bid:hover:not(:disabled) {
    background: var(--accent-blue);
    color: #fff;
}

.btn-submit-bid:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Keep button in popup */
.btn-keep-popup {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #22c55e;
    background: transparent;
    color: #22c55e;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-keep-popup:hover {
    background: #22c55e;
    color: #fff;
}

/* 1 for 2 button in popup */
.btn-onefortwo {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-onefortwo:hover {
    background: #f59e0b;
    color: #000;
}

/* Pass button in popup */
.btn-pass-popup {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #ef4444;
    background: transparent;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-pass-popup:hover {
    background: #ef4444;
    color: #fff;
}

/* Waiting message inside popup */
.bid-waiting-popup {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem 0;
}

/* ── Trump Spinner (slot-machine suit picker) ──────────────── */
.trump-popup {
    min-width: 200px;
}

.trump-spinner-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.trump-spinner-display {
    width: 100px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    gap: 2px;
    user-select: none;
}

.trump-spinner-display.suit-red {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.4);
}

.trump-spinner-display.suit-black {
    color: #e0e0e0;
    border-color: rgba(160, 160, 160, 0.4);
}

.trump-spinner-symbol {
    font-size: 2.5rem;
    line-height: 1;
}

.trump-spinner-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.trump-spinner-section .spinner-arrow {
    width: 100px;
}

.btn-submit-trump {
    width: 100%;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
    color: #22c55e;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-submit-trump:hover {
    background: #22c55e;
    color: #fff;
}

/* ── Kitty badge on cards ──────────────────────────────────── */
.card-kitty-badge {
    position: absolute;
    bottom: 2px;
    right: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f59e0b;
    color: #000;
    font-size: 0.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hand-card.card-from-kitty {
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.your-turn-pulse {
    color: #f59e0b;
    font-weight: 700;
    animation: turnPulse 1.5s ease-in-out infinite;
}

@keyframes turnPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===================================================================
   Kitty Reveal Section
   =================================================================== */
.kitty-reveal-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.02));
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-lg);
    text-align: center;
}

.kitty-reveal-title {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f59e0b;
}

.kitty-reveal-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.kitty-reveal-card {
    animation: kittyCardReveal 0.4s ease both;
    transform: none !important;
}

.kitty-reveal-card:nth-child(1) { animation-delay: 0s; }
.kitty-reveal-card:nth-child(2) { animation-delay: 0.1s; }
.kitty-reveal-card:nth-child(3) { animation-delay: 0.2s; }
.kitty-reveal-card:nth-child(4) { animation-delay: 0.3s; }

@keyframes kittyCardReveal {
    from {
        opacity: 0;
        transform: rotateY(90deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
}

.btn-merge-kitty {
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-merge-kitty:hover {
    background: #f59e0b;
    color: #000;
}

.kitty-won {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

/* ===================================================================
   Card Selection for Discarding
   =================================================================== */
.hand-card.card-selectable {
    cursor: pointer;
}

.hand-card.card-selected {
    transform: rotate(var(--fan-angle, 0deg)) translateY(calc(var(--fan-y, 0px) - 18px)) !important;
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important;
}

.hand-card.card-protected {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-lock-icon {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    line-height: 1;
}

.discard-hint {
    font-size: 0.8rem;
    font-weight: 400;
    color: #f59e0b;
}

.btn-discard {
    display: block;
    margin: 0.75rem auto 0;
    padding: 0.6rem 2rem;
    border-radius: var(--radius-sm);
    border: 2px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
    color: #ef4444;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: discardPulse 2s ease-in-out infinite;
}

.btn-discard:hover {
    background: #ef4444;
    color: #fff;
}

@keyframes discardPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.5); }
}

/* ===================================================================
   Seat Passed / Active Bidder Indicators
   =================================================================== */
.table-seat .passed-indicator {
    font-size: 0.65rem;
    color: #ef4444;
    font-weight: 600;
    margin-top: 2px;
}

.table-seat .active-bidder-indicator {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: bidderPulse 1s ease-in-out infinite;
}

@keyframes bidderPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.3); opacity: 0.7; }
}

.table-seat.seat-active-bidder {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
    border-color: rgba(245, 158, 11, 0.4);
}

.table-seat.seat-passed {
    opacity: 0.5;
}

.passed-indicator {
    font-size: 0.6rem;
    color: #ef4444;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* ===================================================================
   Trump Selection UI
   =================================================================== */
.trump-selection {
    margin-top: 0.5rem;
}

.trump-selection-title {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f59e0b;
}

.trump-suit-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 0.75rem;
}

.trump-suit-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s ease;
}

.trump-suit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.trump-suit-btn.suit-red {
    color: #dc2626;
}

.trump-suit-btn.suit-black {
    color: #e0e0e0;
}

.trump-suit-btn.suit-selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
    transform: translateY(-3px);
}

.trump-suit-btn.suit-selected.suit-red {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.3);
}

.trump-suit-btn.suit-selected.suit-black {
    border-color: #a0a0a0;
    background: rgba(160, 160, 160, 0.12);
    box-shadow: 0 0 12px rgba(160, 160, 160, 0.3);
}

.trump-suit-symbol {
    font-size: 1.8rem;
    line-height: 1;
}

.trump-suit-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.btn-confirm-trump {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
    color: #22c55e;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-confirm-trump:hover {
    background: #22c55e;
    color: #000;
}

/* ===================================================================
   Trump Card Display (bottom-right of table)
   =================================================================== */
/* ===================================================================
   Trump Area (bottom-right container: discarded trump + trump card)
   =================================================================== */
.trump-area-bottom-right {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}

.trump-card-display {
    width: 60px;
    height: 82px;
    border-radius: 6px;
    background: #fefefe;
    border: 2px solid #d4d4d4;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    animation: trumpReveal 0.5s ease;
    flex-shrink: 0;
}

.trump-card-display.trump-red {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.5);
}

.trump-card-display.trump-black {
    color: #1a1a1a;
    border-color: rgba(100, 100, 100, 0.5);
}

.trump-card-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: 3px;
}

.trump-card-suit {
    font-size: 1.5rem;
    line-height: 1;
}

.trump-card-name {
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

@keyframes trumpReveal {
    from {
        opacity: 0;
        transform: scale(0.5) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

/* ===================================================================
   Trick Play Area — Cards Played on the Table
   =================================================================== */
.trick-play-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 200px;
    z-index: 5;
    pointer-events: none;
}

.played-card-slot {
    position: absolute;
    width: 60px;
    height: 84px;
}

.played-card-slot.seat-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.played-card-slot.seat-bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.played-card-slot.seat-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.played-card-slot.seat-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.played-card {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    background: #fefefe;
    border: 1.5px solid #d4d4d4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.7rem;
}

.played-card .card-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.played-card .card-corner.top-left {
    top: 3px;
    left: 4px;
}

.played-card .card-corner.bottom-right {
    bottom: 3px;
    right: 4px;
    transform: rotate(180deg);
}

.played-card .card-rank {
    font-size: 0.65rem;
    font-weight: 700;
}

.played-card .card-suit-symbol {
    font-size: 0.55rem;
}

.played-card .card-center .card-suit-big {
    font-size: 1.3rem;
}

.played-card.card-red {
    color: #dc2626;
}

.played-card.card-black {
    color: #1a1a1a;
}

.played-card-animate {
    animation: cardPlayIn 0.3s ease-out;
}

@keyframes cardPlayIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.played-card-slot.trick-winner .played-card {
    border-color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
    animation: winnerGlow 0.8s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
    from { box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
    to { box-shadow: 0 0 20px rgba(245, 158, 11, 0.7); }
}

/* ===================================================================
   Won Trick Piles
   =================================================================== */
.won-tricks-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
}

.won-pile {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 42px;
}

.won-pile-us {
    left: 12px;
}

.won-pile-them {
    right: 12px;
}

.won-trick-card {
    position: absolute;
    width: 36px;
    height: 28px;
    border-radius: 3px;
    background: linear-gradient(135deg, #3b5998, #2c4578);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.trick-count-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: auto;
    white-space: nowrap;
}

.won-pile-us .trick-count-label::before {
    content: 'Us: ';
    color: #22c55e;
}

.won-pile-them .trick-count-label::before {
    content: 'Them: ';
    color: #ef4444;
}

/* ===================================================================
   Play Turn Overlay
   =================================================================== */
.play-turn-overlay {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 14px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.trick-counter {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* ===================================================================
   Trick Result Overlay
   =================================================================== */
.trick-result-overlay {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    text-align: center;
    font-size: 0.85rem;
    color: #f59e0b;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: trickResultFade 0.3s ease-out;
    white-space: nowrap;
}

.trick-winner-text {
    font-weight: 600;
}

.trick-points {
    font-size: 0.75rem;
    color: #22c55e;
    margin-left: 4px;
}

@keyframes trickResultFade {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===================================================================
   Round Score Overlay
   =================================================================== */
.round-score-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    background: rgba(15, 15, 25, 0.95);
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    min-width: 320px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: scoreReveal 0.5s ease-out;
}

.round-score-overlay h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: #f59e0b;
}

.round-score-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.score-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    gap: 8px;
}

.score-team-row.bid-made {
    border-left: 3px solid #22c55e;
}

.score-team-row.bid-failed {
    border-left: 3px solid #ef4444;
}

.score-team-row.team-frozen {
    border-left: 3px solid #60a5fa;
}

.score-team-name {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: left;
}

.score-team-points {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.score-team-result {
    font-weight: 700;
    flex-shrink: 0;
}

.score-team-row.bid-made .score-team-result {
    color: #22c55e;
}

.score-team-row.bid-failed .score-team-result {
    color: #ef4444;
}

.score-team-row.team-frozen .score-team-result {
    color: #60a5fa;
}

.round-totals {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.next-round-countdown {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes scoreReveal {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===================================================================
   Game Over Overlay
   =================================================================== */
.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.5s ease;
}

.game-over-content {
    text-align: center;
    padding: 2rem 3rem;
    background: rgba(15, 15, 25, 0.95);
    border: 2px solid #f59e0b;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
}

.game-over-content h2 {
    font-size: 2rem;
    margin: 0 0 0.75rem;
    color: #f59e0b;
    animation: winCelebration 0.6s ease;
}

.game-winner-text {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.game-final-scores {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@keyframes winCelebration {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===================================================================
   Card Playability Indicators during Play
   =================================================================== */
.hand-card.card-playable {
    cursor: pointer;
    border-color: rgba(34, 197, 94, 0.4) !important;
}

.hand-card.card-playable:hover {
    transform: rotate(var(--fan-angle, 0deg)) translateY(calc(var(--fan-y, 0px) - 14px)) !important;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.4) !important;
    border-color: #22c55e !important;
}

.hand-card.card-unplayable {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(30%);
}

/* ===================================================================
   Active Player Seat Indicator
   =================================================================== */
.table-seat.seat-active-player {
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
    border-color: rgba(34, 197, 94, 0.4);
}

.table-seat .active-player-indicator {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: playerPulse 1s ease-in-out infinite;
}

@keyframes playerPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.3); opacity: 0.7; }
}

/* ===================================================================
   Mobile — Phone-Specific Overrides (≤ 480px)
   =================================================================== */
@media (max-width: 480px) {
    /* Tighten root container */
    .room-page {
        padding: 0.5rem;
    }

    /* Header compact */
    .room-header-bar {
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .room-header-bar h2 {
        font-size: 1rem;
        order: -1;
        flex-basis: auto;
    }

    .room-header-actions {
        margin-left: auto;
    }

    .btn-back {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .btn-redeal {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    /* Game area spacing */
    .game-area {
        gap: 0.75rem;
    }

    /* Card table */
    .card-table {
        padding: 0.5rem;
        border-radius: var(--radius-md);
    }

    .table-felt {
        padding: 1rem;
        min-height: 240px;
        border-width: 2px;
        border-radius: var(--radius-lg);
    }

    /* Seats – tighter */
    .table-seats {
        gap: 0.4rem;
    }

    .table-seat {
        padding: 0.3rem 0.15rem;
        min-width: 0;
    }

    .seated-name {
        font-size: 0.65rem;
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .seated-player-avatar img,
    .seat-avatar-placeholder {
        width: 56px;
        height: 56px;
    }

    .seat-avatar-placeholder {
        font-size: 1.4rem;
    }

    .seated-player-avatar .dealer-chip {
        bottom: -3px;
        right: -5px;
    }

    .seat-label {
        font-size: 0.55rem;
    }

    .dealer-chip {
        font-size: 0.55rem;
        width: 16px;
        height: 16px;
    }

    .btn-take-seat {
        padding: 0.25rem 0.35rem;
        font-size: 0.65rem;
    }

    .empty-seat-icon {
        font-size: 1rem;
    }

    /* Player hand – overlap cards for fit */
    .player-hand-container {
        padding: 0.6rem 0.4rem 0.75rem;
        border-radius: var(--radius-md);
    }

    .hand-title {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }

    .player-hand {
        gap: 0;
        padding: 0.25rem 0 0.5rem;
        margin-left: -4px;
        margin-right: -4px;
    }

    .hand-card {
        width: 40px;
        height: 58px;
        border-radius: 4px;
        margin-left: -6px;
    }

    .hand-card:first-child {
        margin-left: 0;
    }

    .card-rank {
        font-size: 0.55rem;
    }

    .card-suit-symbol {
        font-size: 0.4rem;
    }

    .card-suit-big {
        font-size: 1rem;
    }

    .card-corner {
        padding: 1px 2px;
    }

    .suit-separator {
        margin: 0 2px;
        height: 36px;
        width: 1px;
    }

    .card-lock-icon {
        font-size: 0.45rem;
    }

    .card-kitty-badge {
        width: 12px;
        height: 12px;
        font-size: 0.4rem;
    }

    /* Score sheet compact */
    .score-sheet {
        padding: 0.75rem;
    }

    .score-sheet h3 {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .score-table th,
    .score-table td {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }

    /* Bidding status panel compact */
    .bidding-panel {
        padding: 0.6rem 0.75rem;
    }

    .bidding-title {
        font-size: 0.85rem;
    }

    /* Popup card compact on small screens */
    .popup-card {
        min-width: 190px;
        max-width: 240px;
        padding: 1rem 1.1rem;
        gap: 0.5rem;
    }

    .spinner-digit {
        width: 48px;
        height: 54px;
        font-size: 1.7rem;
    }

    .spinner-arrow {
        width: 48px;
        height: 30px;
        font-size: 0.9rem;
    }

    .trump-spinner-section .spinner-arrow {
        width: 88px;
    }

    .trump-spinner-display {
        width: 88px;
        height: 76px;
    }

    .trump-spinner-symbol {
        font-size: 2rem;
    }

    .btn-submit-bid,
    .btn-keep-popup,
    .btn-onefortwo,
    .btn-pass-popup,
    .btn-submit-trump {
        font-size: 0.85rem;
        padding: 0.45rem 0.75rem;
    }

    /* Waiting area compact */
    .waiting-area {
        padding: 0.75rem;
    }

    .waiting-area h3 {
        font-size: 0.85rem;
    }

    /* Other player cards in seats */
    .mini-card-back {
        width: 10px;
        height: 14px;
    }

    .card-count-label {
        font-size: 0.55rem;
    }

    /* Trick play area compact */
    .played-card {
        width: 36px;
        height: 52px;
    }

    .played-card .card-rank {
        font-size: 0.5rem;
    }

    .played-card .card-suit-symbol {
        font-size: 0.35rem;
    }

    .played-card .card-suit-big {
        font-size: 0.9rem;
    }

    /* Overlays on table */
    .play-turn-overlay,
    .trick-result-overlay,
    .round-score-overlay {
        font-size: 0.8rem;
        min-width: 0;
    }

    .round-score-overlay h3 {
        font-size: 0.9rem;
    }

    .discard-hint {
        font-size: 0.7rem;
    }

    .btn-discard {
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
    }

    /* Trump display card compact */
    .trump-card-display {
        width: 36px;
        height: 48px;
        font-size: 0.5rem;
    }

    .trump-card-suit {
        font-size: 1rem;
    }

    .trump-card-name {
        font-size: 0.4rem;
    }

    .trump-card-label {
        font-size: 0.4rem;
    }

    .discarded-trump-card {
        width: 32px;
        height: 46px;
    }

    .discarded-trump-card .card-rank {
        font-size: 0.45rem;
    }

    .discarded-trump-card .card-center .card-suit-big {
        font-size: 0.8rem;
    }

    .discarded-trump-label {
        font-size: 0.4rem;
    }

    .btn-last-hand {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    /* Won trick piles */
    .won-pile {
        width: 30px;
        height: 30px;
    }

    .won-trick-card {
        width: 14px;
        height: 18px;
    }

    .trick-count-label {
        font-size: 0.55rem;
    }
}

/* ===================================================================
   Discarded Trump Cards Display
   =================================================================== */
.discarded-trump-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: trumpReveal 0.5s ease;
}

.discarded-trump-label {
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fbbf24;
    background: rgba(0, 0, 0, 0.5);
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.discarded-trump-cards {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

.discarded-trump-card {
    width: 52px;
    height: 72px;
    border-radius: 5px;
    background: #ffffff;
    border: 2px solid #fbbf24;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: discardedTrumpIn 0.4s ease;
}

.discarded-trump-card .card-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.discarded-trump-card .card-corner.top-left {
    top: 2px;
    left: 3px;
}

.discarded-trump-card .card-corner.bottom-right {
    bottom: 2px;
    right: 3px;
    transform: rotate(180deg);
}

.discarded-trump-card .card-rank {
    font-size: 0.7rem;
    font-weight: 800;
    color: inherit;
}

.discarded-trump-card .card-suit-symbol {
    font-size: 0.65rem;
    color: inherit;
}

.discarded-trump-card .card-center .card-suit-big {
    font-size: 1.4rem;
    color: inherit;
}

.discarded-trump-card.card-red {
    color: #dc2626;
}

.discarded-trump-card.card-black {
    color: #1a1a1a;
}

@keyframes discardedTrumpIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================================================
   Last Hand Button & Overlay
   =================================================================== */
.btn-last-hand {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.btn-last-hand:hover:not(.btn-disabled) {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(148, 163, 184, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-last-hand.btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.last-hand-exhausted {
    font-size: 0.65rem;
    opacity: 0.6;
}

.last-hand-overlay {
    animation: lastHandFadeIn 0.3s ease;
}

.last-hand-card-animate {
    animation: lastHandCardIn 0.3s ease;
}

@keyframes lastHandFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lastHandCardIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.last-hand-label-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    background: rgba(0, 0, 0, 0.75);
    color: #fbbf24;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    margin-top: 60px;
    animation: lastHandFadeIn 0.3s ease;
}