.schafkopf-page { padding-bottom: 4rem; }
.game-header, .schafkopf-main { width: min(96%, 1380px); margin: 0 auto; }
.game-header { position: relative; padding: 2.5rem 0 2rem; text-align: center; }
.game-header h1, .game-header p { margin: 0.2rem 0; }
.back-link { position: absolute; top: 2.5rem; left: 0; color: var(--blue); text-decoration: none; }
.connection-status { display: inline-block; margin-top: 1rem; padding: 0.25rem 0.7rem; border: 1px solid rgb(0 170 255 / 35%); border-radius: 999px; color: var(--muted-blue); font-size: 0.8rem; }
.connection-status.connected { color: #7ce8ae; border-color: rgb(124 232 174 / 55%); }
.connection-status.disconnected { color: #ff8e9e; border-color: rgb(255 142 158 / 55%); }
.schafkopf-main { opacity: 1; animation: none; }
.schafkopf-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.panel, .score-panel, .history-panel, .play-area, .finish-view { border: 1px solid var(--neon-blue); border-radius: 10px; background: rgb(6 18 37 / 88%); box-shadow: 0 0 12px rgb(0 170 255 / 40%); }
.panel { padding: 1.5rem; }
.panel h2, .panel h3 { margin: 0.35rem 0 1.1rem; }
.panel-heading, .lobby-topbar, .player-item, .room-item, .table-status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
label { display: grid; gap: 0.35rem; margin-bottom: 1rem; color: var(--soft-blue); font-size: 0.9rem; }
input, select { width: 100%; padding: 0.72rem; border: 1px solid rgb(0 170 255 / 55%); border-radius: 5px; color: var(--soft-blue); background: #020b18; font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--neon-blue); box-shadow: 0 0 12px rgb(0 170 255 / 45%); }
.form-hint, .room-meta, .empty-state, .hand-hint { color: var(--muted-blue); font-size: 0.84rem; }
.join-code-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; align-items: end; }
.join-code-form label { margin: 0; }
.join-code-button { align-self: end; width: 100%; min-height: 49px; margin-top: 0; text-align: center; }
.icon-button { display: grid; width: 2.6rem; height: 2.6rem; padding: 0.65rem; border: 1px solid rgb(0 170 255 / 55%); border-radius: 50%; place-items: center; color: var(--soft-blue); background: #061a34; cursor: pointer; }
.icon-button svg { width: 100%; fill: currentcolor; }
.refresh-button.is-refreshing svg { animation: refresh-spin 650ms ease; }
.room-list, .player-list { display: grid; gap: 0.7rem; }
.bot-area { display: grid; gap: 0.8rem; margin-top: 1rem; padding: 1rem; border: 1px solid rgb(0 170 255 / 28%); border-radius: 8px; background: rgb(2 11 24 / 70%); }
.bot-area label { margin: 0; }
.bot-difficulty-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 0.65rem; align-items: end; }
.info-button { display: grid; width: 42px; height: 42px; border: 1px solid rgb(0 170 255 / 55%); border-radius: 50%; place-items: center; color: var(--soft-blue); background: #061a34; font-weight: 800; cursor: pointer; box-shadow: 0 0 10px rgb(0 170 255 / 18%); }
.info-button:hover, .info-button:focus-visible { outline: none; border-color: var(--neon-blue); box-shadow: 0 0 14px rgb(0 170 255 / 40%); }
.bot-info-panel { display: grid; gap: 0.45rem; padding: 0.8rem; border: 1px solid rgb(0 170 255 / 28%); border-radius: 7px; background: rgb(0 8 18 / 70%); }
.bot-info-panel p { margin: 0; color: var(--muted-blue); font-size: 0.82rem; line-height: 1.45; }
.bot-info-panel strong { color: var(--soft-blue); }
.bot-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.bot-actions .button { margin-top: 0; flex: 1 1 180px; }
.room-item, .player-item { padding: 0.85rem; border: 1px solid rgb(0 170 255 / 28%); border-radius: 7px; background: rgb(2 11 24 / 75%); }
.room-item h3, .room-item p, .player-item p { margin: 0; }
.empty-state { padding: 1.5rem; text-align: center; border: 1px dashed rgb(0 170 255 / 35%); border-radius: 7px; }
.host-badge, .turn-badge, .bot-badge { display: inline-flex; max-width: 100%; padding: 0.15rem 0.5rem; border: 1px solid var(--neon-blue); border-radius: 999px; align-items: center; font-size: 0.7rem; line-height: 1.1; text-transform: uppercase; white-space: nowrap; }
.bot-badge { color: #caa7ff; border-color: rgb(202 167 255 / 70%); }
.turn-badge { color: #7ce8ae; border-color: #7ce8ae; }
.turn-badge.passed { color: var(--muted-blue); border-color: rgb(0 170 255 / 35%); }
.lobby-topbar { margin-bottom: 1rem; }
.start-area { margin-top: 1rem; padding: 1rem; text-align: center; border: 1px solid rgb(0 170 255 / 35%); border-radius: 8px; }
.table-status { margin-bottom: 1rem; padding: 0.85rem 1rem; border: 1px solid rgb(0 170 255 / 35%); border-radius: 10px; background: rgb(6 18 37 / 82%); }
.table-status h2, .table-status p { margin: 0; }
.table-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 260px; gap: 1rem; align-items: stretch; }
.score-panel, .history-panel { padding: 1rem; }
.game-mode { margin-bottom: 0.6rem; padding: 0.7rem; border: 1px solid rgb(0 170 255 / 28%); border-radius: 7px; background: rgb(2 11 24 / 70%); }
.game-mode p, .game-mode strong { margin: 0; }
.game-mode strong { color: var(--soft-blue); }
.score-player { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.5rem; padding: 0.75rem; border: 1px solid transparent; border-bottom-color: rgb(0 170 255 / 16%); border-radius: 8px; }
.markable-player { cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.markable-player:hover, .markable-player:focus-visible { outline: none; border-color: rgb(0 170 255 / 60%); box-shadow: 0 0 12px rgb(0 170 255 / 22%); }
.marked-player { border-color: #7ce8ae !important; box-shadow: 0 0 15px rgb(124 232 174 / 32%), inset 0 0 14px rgb(124 232 174 / 8%); }
.mark-badge { display: inline-block; margin-left: 0.25rem; padding: 0.08rem 0.4rem; border: 1px solid #7ce8ae; border-radius: 999px; color: #7ce8ae; font-size: 0.68rem; text-transform: uppercase; }
.score-player strong, .opponent strong { display: flex; min-width: 0; gap: 0.35rem; align-items: center; flex-wrap: wrap; color: var(--soft-blue); }
.score-player .bot-badge { flex-basis: 100%; width: max-content; }
.player-name { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.marked-name { color: #7ce8ae; text-shadow: 0 0 10px rgb(124 232 174 / 45%); }
.score-player span { grid-column: 1 / -1; color: var(--muted-blue); font-size: 0.76rem; }
.play-area { min-height: 620px; padding: 1rem; background: radial-gradient(circle at center, rgb(0 170 255 / 13%), transparent 62%), rgb(3 14 29 / 92%); }
.opponent-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.opponent { padding: 0.7rem; border: 1px solid rgb(0 170 255 / 26%); border-radius: 8px; text-align: center; background: rgb(2 11 24 / 70%); }
.opponent strong { display: flex; min-width: 0; gap: 0.35rem; align-items: center; justify-content: center; flex-wrap: wrap; color: var(--soft-blue); }
.opponent span { color: var(--muted-blue); font-size: 0.78rem; }
.call-panel { margin-bottom: 1rem; padding: 1rem; border: 1px solid rgb(0 170 255 / 38%); border-radius: 10px; text-align: center; background: rgb(2 11 24 / 78%); box-shadow: inset 0 0 18px rgb(0 170 255 / 10%); }
.call-panel h3, .call-panel p { margin: 0.2rem 0; }
.call-actions { display: flex; justify-content: center; gap: 0.65rem; margin-top: 0.85rem; flex-wrap: wrap; }
.call-actions .button { margin-top: 0; }
.call-actions .pass-button { border-color: rgb(255 142 158 / 60%); }
.trick-area { min-height: 260px; display: grid; grid-template-columns: repeat(2, 118px); grid-auto-rows: 160px; gap: 1rem; place-content: center; }
.trick-card-slot { display: grid; min-width: 112px; min-height: 180px; grid-template-rows: 152px 1.35rem; align-items: start; justify-items: center; border: 1px dashed rgb(0 170 255 / 30%); border-radius: 12px; overflow: hidden; }
.played-card-frame { display: grid; width: 112px; height: 152px; place-items: center; }
.trick-card-slot .played-by { width: 100%; margin: 0.35rem 0 0; overflow: hidden; color: var(--muted-blue); font-size: 0.72rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.hand-area { margin: 0 0 1rem; }
.hand { display: flex; gap: 0.55rem; min-height: 166px; padding: 0.8rem; overflow-x: auto; border: 1px solid rgb(0 170 255 / 18%); border-radius: 10px; background: rgb(2 11 24 / 68%); }
.sk-card, .playing-card { position: relative; display: grid; width: 104px; min-width: 104px; height: 150px; padding: 0.55rem; border: 1px solid rgb(0 170 255 / 35%); border-radius: 12px; color: #061225; background: linear-gradient(145deg, #fff9e8, #dceaff); box-shadow: 0 8px 18px rgb(0 0 0 / 32%), inset 0 0 0 3px rgb(255 255 255 / 55%); font: inherit; cursor: default; user-select: none; }
.sk-card.playable, .playing-card.playable { cursor: pointer; transform: translateY(-7px); box-shadow: 0 0 18px rgb(0 170 255 / 65%), 0 12px 24px rgb(0 0 0 / 36%); }
.sk-card.playable:hover, .sk-card.playable:focus-visible, .playing-card.playable:hover { outline: none; transform: translateY(-14px); }
.sk-card.is-muted, .playing-card.disabled { opacity: 0.58; filter: grayscale(0.35); }
.sk-card.deal-card { animation: deal-card 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--deal-index, 0) * 65ms); }
.sk-card.card-just-played { animation: play-card 360ms ease-out both; }
.sk-card .corner, .playing-card .corner { position: absolute; top: 0.45rem; left: 0.5rem; display: grid; gap: 0.05rem; font-weight: 800; line-height: 1; }
.sk-card .corner.bottom, .playing-card .corner.bottom { inset: auto 0.5rem 0.45rem auto; transform: rotate(180deg); }
.sk-card .suit-mark, .playing-card .suit-mark { display: grid; place-items: center; align-self: center; justify-self: center; width: 58px; height: 58px; border-radius: 18px; color: #fff; font-size: 2rem; font-weight: 900; box-shadow: inset 0 0 16px rgb(255 255 255 / 20%); }
.sk-card .card-name, .playing-card .card-name { align-self: end; color: #26384f; font-size: 0.65rem; font-weight: bold; text-align: center; text-transform: uppercase; letter-spacing: 0.08em; }
.sk-card .trump-label, .playing-card .trump-label { position: absolute; right: 0.45rem; top: 0.45rem; padding: 0.08rem 0.28rem; border-radius: 999px; color: #072033; background: #75e7ff; font-size: 0.55rem; font-weight: bold; letter-spacing: 0.08em; }
.suit-eichel .suit-mark { background: linear-gradient(145deg, #122842, #5c748f); }
.suit-gras .suit-mark { background: linear-gradient(145deg, #0b5b3c, #37d17a); }
.suit-herz .suit-mark { background: linear-gradient(145deg, #7b1024, #ff4778); }
.suit-schellen .suit-mark { background: linear-gradient(145deg, #875400, #ffd166); }
.history-trick { display: grid; gap: 0.45rem; }
.trick-winner-pulse { animation: winner-pulse 900ms ease-out; }
.history-trick p { margin: 0; color: var(--soft-blue); }
.mini-card-list { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.mini-card { display: grid; gap: 0.12rem; min-width: 7.5rem; padding: 0.35rem 0.45rem; border: 1px solid rgb(0 170 255 / 28%); border-radius: 5px; color: var(--soft-blue); background: rgb(2 11 24 / 70%); font-size: 0.78rem; }
.mini-card strong { color: #dcecf4; font-size: 0.72rem; font-weight: 650; }
.mini-card .player-name { max-width: 7rem; }
.finish-view { padding: 1.5rem; text-align: center; }
.finish-list { display: grid; gap: 0.7rem; max-width: 640px; margin: 1rem auto; }
.finish-player { display: flex; justify-content: space-between; padding: 0.8rem; border: 1px solid rgb(0 170 255 / 30%); border-radius: 7px; }
.finish-player.loser { border-color: rgb(255 105 120 / 58%); background: rgb(92 16 31 / 22%); }
.finish-team { display: grid; gap: 0.7rem; padding: 0.9rem; border: 1px solid rgb(0 170 255 / 30%); border-radius: 7px; text-align: left; }
.finish-team.winner { border-color: rgb(96 229 158 / 58%); background: rgb(15 92 62 / 20%); box-shadow: 0 0 18px rgb(64 220 145 / 10%); }
.finish-team-heading { display: flex; justify-content: space-between; gap: 1rem; }
.finish-team-players { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.finish-team-players > span { display: flex; gap: 0.45rem; padding: 0.35rem 0.5rem; border: 1px solid rgb(0 170 255 / 18%); border-radius: 5px; }
.finish-team-players small { color: var(--muted); }
.finish-ready-status { margin: 1rem 0 0.65rem; color: var(--muted); }
.finish-actions { display: flex; justify-content: center; gap: 0.65rem; flex-wrap: wrap; }
.hidden { display: none; }
.toast { position: fixed; right: 1rem; bottom: 1rem; padding: 0.8rem 1rem; border: 1px solid var(--neon-blue); border-radius: 6px; color: var(--soft-blue); background: #061225; opacity: 0; transform: translateY(10px); transition: 180ms ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
button:disabled, input:disabled, select:disabled { opacity: 0.5; cursor: not-allowed; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@keyframes deal-card {
  from { opacity: 0; transform: translateY(-34px) scale(0.78) rotate(-8deg); }
  70% { opacity: 1; transform: translateY(4px) scale(1.03) rotate(2deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes play-card {
  from { opacity: 0; transform: translateY(32px) scale(0.86) rotate(-4deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes winner-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgb(124 232 174 / 0%); }
  35% { transform: scale(1.025); box-shadow: 0 0 24px rgb(124 232 174 / 52%); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgb(124 232 174 / 0%); }
}
@media (max-width: 1050px) { .table-layout { grid-template-columns: 1fr; } .score-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.4rem 1rem; } }
@media (max-width: 760px) { .schafkopf-dashboard, .join-code-form { grid-template-columns: 1fr; } .back-link { position: static; display: block; margin-bottom: 1rem; } .opponent-row { grid-template-columns: 1fr; } .play-area { min-height: auto; padding: 0.7rem; } .hand { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; min-height: 0; overflow: visible; padding: 0.55rem; } .trick-area { grid-template-columns: repeat(2, 96px); grid-auto-rows: 136px; min-height: 220px; } .sk-card, .playing-card { width: 100%; min-width: 0; height: clamp(116px, 30vw, 138px); padding: 0.42rem; } .sk-card .suit-mark, .playing-card .suit-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 1.55rem; } .sk-card .card-name, .playing-card .card-name { font-size: 0.55rem; } }
@media (prefers-reduced-motion: reduce) { .sk-card.deal-card, .sk-card.card-just-played, .trick-winner-pulse { animation: none; } }
