:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(30, 41, 59, 0.75);
    --border-glass: rgba(255, 255, 255, 0.12);
    --felt-bg: radial-gradient(circle, #064e3b 0%, #022c22 80%, #061c16 100%);
    --gold: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.35);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-red: #f43f5e;
    --accent-green: #10b981;
    --font-heading: 'Fredoka', cursive, sans-serif;
    --font-body: 'Outfit', sans-serif;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-main: 0 20px 40px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 1rem;
}

/* Ambient glow background effects */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: #4f46e5;
    top: -100px;
    left: -100px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: #059669;
    bottom: -150px;
    right: -150px;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.5px;
}

.logo-paw {
    font-size: 1.6rem;
    animation: bounce 2s infinite ease-in-out;
}

.logo-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-weight: 400;
    margin-left: 0.5rem;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.header-actions {
    display: flex;
    gap: 0.6rem;
}

/* Buttons */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-warning {
    background: #f59e0b;
    color: #0f172a;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

/* Status Bar */
.status-bar {
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.status-text {
    font-weight: 600;
    color: var(--gold);
    font-size: 1.05rem;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-contract {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.badge-dealer {
    background: rgba(251, 191, 36, 0.2);
    color: var(--gold);
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.badge-role {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.badge-declarer {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
    font-weight: 600;
}

.badge-dummy {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    font-weight: 600;
}

.badge-defender {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    font-weight: 600;
}

.score-board {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.95rem;
}

.score-item strong {
    color: var(--gold);
    font-size: 1.1rem;
}

.resume-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* Arena & Bridge Felt Table */
.bridge-arena {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.table-felt {
    background: var(--felt-bg);
    border: 8px solid #1e293b;
    border-radius: 24px;
    min-height: 480px;
    position: relative;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 2.5fr 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "north north north"
        "west center east"
        "south south south";
    gap: 1rem;
    align-items: center;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Seats & Cat Avatars */
.seat {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.seat-north {
    grid-area: north;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.seat-north .cat-details {
    align-items: center;
    text-align: center;
}

.cat-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seat-north .cat-name-row {
    justify-content: center;
}

.seat-west {
    grid-area: west;
    flex-direction: column;
    align-items: flex-start;
}

.seat-east {
    grid-area: east;
    flex-direction: column;
    align-items: flex-end;
}

.seat-south {
    grid-area: south;
    justify-content: center;
}

.cat-avatar-container {
    position: relative;
    width: 84px;
    height: 84px;
}

.cat-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.seat.active-turn .cat-avatar {
    transform: scale(1.1);
    border-color: #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
}

.status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid #0f172a;
}

.seat.active-turn .status-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.cat-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 360px;
}

.cat-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-primary);
}

/* Speech Bubbles */
.speech-bubble-wrapper {
    position: relative;
    width: 100%;
}

.speech-bubble {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #f1f5f9;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    position: relative;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 360px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Center Table Felt Area */
.table-center {
    grid-area: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 220px;
}

.trick-area {
    width: 220px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trick-card {
    position: absolute;
    width: 72px;
    height: 104px;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
}

.card-north { top: 0; left: 50%; transform: translateX(-50%); }
.card-south { bottom: 0; left: 50%; transform: translateX(-50%); }
.card-west { left: 0; top: 50%; transform: translateY(-50%); }
.card-east { right: 0; top: 50%; transform: translateY(-50%); }

.trick-center-info {
    position: absolute;
    background: rgba(0, 0, 0, 0.75);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 5;
}

/* Dummy Cards */
.dummy-container {
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    margin-top: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.dummy-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.4rem;
}

.dummy-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
}

/* Bidding Panel */
.bidding-panel {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bidding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.bidding-history-inline {
    font-size: 0.88rem;
    color: var(--accent-blue);

}

.bidding-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bidding-levels, .bidding-suits {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bidding-levels label, .bidding-suits label {
    width: 60px;
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.bid-btn-level, .bid-btn-suit {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bid-btn-level.selected, .bid-btn-suit.selected {
    background: var(--gold);
    color: #0f172a;
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
}

.suit-c { color: #38bdf8; }
.suit-d { color: #f59e0b; }
.suit-h { color: #f43f5e; }
.suit-s { color: #cbd5e1; }
.suit-nt { color: #c084fc; }

.bidding-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.btn-submit-bid {
    flex: 2;
}

/* Cards & Hand Panel */
.hand-panel {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hand-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold);
}

.hand-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    min-height: 120px;
    padding: 0.5rem 0;
}

/* Playing Card Component */
.card-ui {
    width: 76px;
    height: 110px;
    border-radius: 10px;
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card-ui:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.card-ui.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.card-ui.red {
    color: #e11d48;
}

.card-ui.black {
    color: #0f172a;
}

.card-top {
    position: absolute;
    top: 1px;
    left: 2px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.0;
    pointer-events: none;
    background: transparent;
    padding: 0;
}

.card-rank {
    position: relative;
    z-index: 12;
    font-weight: 800;
    font-size: 0.94rem;
    text-shadow: -1px -1px 0 #ffffff, 1px -1px 0 #ffffff, -1px 1px 0 #ffffff, 1px 1px 0 #ffffff;
    -webkit-text-stroke: 0.4px #ffffff;
}

.card-suit {
    position: relative;
    z-index: 11;
    font-size: 0.82rem;
    margin-top: 1px;
    text-shadow: -1px -1px 0 #ffffff, 1px -1px 0 #ffffff, -1px 1px 0 #ffffff, 1px 1px 0 #ffffff;
    -webkit-text-stroke: 0.4px #ffffff;
}

.card-center-art {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

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

.card-suit-big {
    font-size: 1.5rem;
    opacity: 0.85;
}

.card-bottom {
    position: absolute;
    bottom: 1px;
    right: 2px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.0;
    transform: rotate(180deg);
    pointer-events: none;
    background: transparent;
    padding: 0;
}

/* Feed Panel */
.feed-panel {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 520px;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-content {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.4rem;
    min-height: 280px;
    max-height: 420px;
    scroll-behavior: smooth;
}

.feed-content::-webkit-scrollbar {
    width: 6px;
}

.feed-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.feed-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.feed-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.btn-success {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

.feed-item {
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.feed-item.sys-msg {
    color: var(--accent-blue);
    border-left: 4px solid var(--accent-blue);
}

.feed-item.cat-msg {
    color: #fef08a;
    border-left: 4px solid var(--gold);
    background: rgba(251, 191, 36, 0.08);
    font-size: 0.92rem;
    padding: 0.65rem 1rem;
}

.feed-item.bid-msg {
    color: #a7f3d0;
    border-left: 4px solid var(--accent-green);
}

/* Legal Footer */
.legal-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 1rem 0;
}

.legal-footer a {
    color: var(--text-secondary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.legal-footer a:hover {
    color: var(--gold);
}

/* Modals */
.custom-modal, .legal-custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.custom-modal-content, .legal-custom-modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,0.7);
    color: var(--text-primary);
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    color: var(--gold);

}

.btn-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-close:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

/* More Games List */
.more-games-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
}

.more-games-list li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.more-games-list li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: var(--gold);
}

.game-favicon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .app-header {
        padding: 0.6rem 0.8rem;
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }
    .logo {
        font-size: 1.4rem;
    }
    .logo-sub {
        display: none;
    }
    .header-actions {
        width: 100%;
        justify-content: center;
        gap: 0.35rem;
    }
    .header-actions .btn {
        padding: 0.42rem 0.5rem;
        font-size: 0.78rem;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
    }
    .header-actions .sound-toggle-btn,
    .header-actions #sound-btn {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        max-width: 34px;
        max-height: 34px;
        padding: 0;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1;
    }
    .table-felt {
        grid-template-columns: 1fr;
        grid-template-areas:
            "north"
            "west"
            "east"
            "center"
            "south";
        min-height: auto;
    }
    .seat {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    .seat-north {
        grid-area: north;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0 auto;
    }
    .seat-west, .seat-east, .seat-south {
        align-items: center;
        justify-content: center;
    }
    .cat-avatar-container {
        margin: 0 auto;
    }
    .cat-details {
        align-items: center;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    .cat-name-row {
        justify-content: center;
    }
    .card-ui {
        width: 60px;
        height: 90px;
        padding: 4px;
    }
    .card-rank { font-size: 0.88rem; }
    .card-suit { font-size: 0.78rem; }
}

/* Target Score Selection Cards */
.modal-intro {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.target-score-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.target-card {
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.target-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.9);
}

.target-card.active {
    border-color: var(--gold);
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.target-score-pts {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--gold);
    font-weight: 700;
}

.target-score-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.target-score-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.score-target-badge {
    color: var(--gold);
}

/* Victory Modal Styling */
.victory-banner {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 1rem;
    font-weight: 700;
}

.victory-scores-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.vic-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.vic-score-row.target-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.4rem;
    margin-top: 0.2rem;
    color: var(--text-secondary);
}

.victory-comment {
    font-style: italic;
    color: #fef08a;
    font-size: 0.92rem;
    line-height: 1.4;
}


/* Sound / Mute Toggle Button */
.sound-toggle-btn, #sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  padding: 0;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  flex-shrink: 0;
  flex-grow: 0;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .sound-toggle-btn, #sound-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    font-size: 0.8rem;
    flex: 0 0 30px;
    border-radius: 50% !important;
    padding: 0;
  }
  .header-actions {
    gap: 0.25rem;
  }
  .header-actions .btn:not(#sound-btn) {
    padding: 0.38rem 0.42rem;
    font-size: 0.73rem;
  }
}

@media (max-width: 380px) {
  .sound-toggle-btn, #sound-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    flex: 0 0 28px;
  }
  .header-actions {
    gap: 0.2rem;
  }
  .header-actions .btn:not(#sound-btn) {
    padding: 0.32rem 0.28rem;
    font-size: 0.67rem;
  }
}

/* Clear visual distinction for Muted state */
.sound-toggle-btn.muted, #sound-btn.muted {
  opacity: 0.55 !important;
  background: rgba(20, 20, 25, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.tricks-won-badge {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #f8fafc;
}
