html, body { background: #f4f1ea; }

.brand { font-weight: 600; letter-spacing: .02em; }
.brand-suits { color: #ffcdd2; }

/* ---- Home ---------------------------------------------------------------- */
.hero { text-align: center; }
.hero-suits { display: flex; justify-content: center; gap: .6rem; margin-bottom: .5rem; }
.hero-suits .suit-icon { width: 42px; height: 42px; }
.hero-title { font-weight: 700; color: #1b5e20; }
.code-input input, .table-code { text-transform: uppercase; letter-spacing: .25em; font-weight: 700; }

/* ---- Cards ---------------------------------------------------------------- */
.suit-icon { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
.chip-suit { width: 18px; height: 18px; margin-left: 4px; }

.playing-card {
    position: relative;
    width: 84px;
    height: 140px;
    border-radius: 9px;
    border: 1px solid #b9ae95;
    background: linear-gradient(160deg, #fffdf6 0%, #f3ead2 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,.25);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: #3e2723;
    cursor: default;
    transition: transform .12s ease, box-shadow .12s ease;
    flex: 0 0 auto;
}
/* The face is the picture of the real card; the button only frames it. */
/* Face and back are transparent PNGs with their own rounded edge: no frame of our own around them. */
.playing-card.face, .playing-card.back { background: transparent; border: none; box-shadow: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.playing-card.face img, .playing-card.back img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; }
.playing-card.face.playable { box-shadow: none; filter: drop-shadow(0 0 3px #fbc02d) drop-shadow(0 0 2px #fbc02d) drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.playing-card.face.selected { box-shadow: none; filter: drop-shadow(0 0 3px #c62828) drop-shadow(0 0 2px #c62828) drop-shadow(0 6px 8px rgba(0,0,0,.4)); }

.playing-card.playable { cursor: pointer; box-shadow: 0 0 0 2px #fbc02d, 0 4px 8px rgba(0,0,0,.3); }
.playing-card.playable:hover { transform: translateY(-10px); }
.playing-card:disabled { opacity: .92; }
.playing-card.selected { transform: translateY(-16px); box-shadow: 0 0 0 3px #c62828, 0 6px 12px rgba(0,0,0,.35); }

.playing-card.small { width: 42px; height: 70px; border-radius: 5px; }

/* ---- Table layout -------------------------------------------------------- */
.game-layout { display: grid; grid-template-columns: 1fr 340px; gap: 12px; padding: 12px; min-height: calc(100vh - 48px); }
.felt {
    background: radial-gradient(ellipse at center, #2e7d32 0%, #1b5e20 70%, #123d16 100%);
    border-radius: 18px;
    border: 8px solid #5d4037;
    box-shadow: inset 0 0 40px rgba(0,0,0,.45);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    min-height: 620px;
}
.opponents { display: flex; justify-content: space-around; gap: 12px; flex-wrap: wrap; }
.table-center { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; }
.trick { display: flex; gap: 14px; min-height: 140px; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.trick-card { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trick-name { font-size: .8rem; background: rgba(0,0,0,.35); padding: 1px 8px; border-radius: 10px; }
.talon { display: flex; gap: 6px; align-items: center; background: rgba(0,0,0,.25); padding: 4px 10px; border-radius: 10px; }
.last-trick { display: flex; gap: 8px; align-items: center; opacity: .8; }
.last-trick-label { font-size: .75rem; margin-right: 4px; }
.status-line { font-size: 1.05rem; font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,.5); min-height: 1.5em; text-align: center; }
.contract-chip { font-size: 1rem; }
.table-center .mud-chip.mud-chip-color-default { background: rgba(255,255,255,.9); color: #222; }

.my-area { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hand { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding-top: 18px; }
.action-panel {
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center;
    background: rgba(255,255,255,.95); color: #222; padding: 8px 12px; border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
}

.player-badge {
    background: rgba(0,0,0,.28);
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 190px;
    border: 2px solid transparent;
}
.player-badge.to-act { border-color: #fbc02d; box-shadow: 0 0 14px rgba(251,192,45,.6); }
.player-badge.sits-out { opacity: .55; }
.player-name { font-weight: 700; font-size: 1.05rem; }
.player-tags { min-height: 4px; }
.player-tags .mud-chip { margin: 2px 4px 2px 0; height: 20px; }
.player-tags .mud-chip.mud-chip-color-default { background: rgba(255,255,255,.88); color: #222; }
.player-stats { display: flex; gap: 12px; font-size: .9rem; opacity: .95; }
.card-fan { display: flex; margin-top: 6px; }
.card-fan .playing-card { margin-right: -28px; }

.side-panel .me-row td { background: #e8f5e9; }
.score-history td, .score-history th { font-size: .8rem; padding: 2px 6px !important; }
.settlement { max-width: 640px; }

/* ---- Mobile ---------------------------------------------------------------- */
@media (max-width: 960px) {
    .game-layout { grid-template-columns: 1fr; padding: 4px; }
    .felt { min-height: auto; border-width: 4px; padding: 8px; }
    .playing-card { width: 60px; height: 100px; }
    .player-badge { min-width: 140px; padding: 6px 8px; }
    .hand { gap: 3px; }
}

/* ---- Blazor errors ------------------------------------------------------- */
#blazor-error-ui { background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Hiba történt."; }
