/**
 * Spielhalle – Gestaltung
 *
 * Farben lassen sich über die Variablen unten anpassen, z. B. in der
 * eigenen Style-CSS:  .sh-wrap { --sh-accent: #7a4fa0; }
 *
 * @author Maggan22
 * @license GNU General Public License, version 2 (GPL-2.0)
 */

.sh-wrap,
.sh-layout {
	--sh-accent: #105289;
	--sh-accent-soft: rgba(16, 82, 137, 0.1);
	--sh-gold: #c08a00;
	--sh-gold-soft: #fff4d6;
	--sh-card: #ffffff;
	--sh-card-alt: #f5f7fa;
	--sh-border: rgba(0, 0, 0, 0.12);
	--sh-muted: #6b7280;
	--sh-radius: 10px;
	box-sizing: border-box;
}

.sh-wrap *,
.sh-wrap *::before,
.sh-wrap *::after {
	box-sizing: border-box;
}

.sh-wrap { margin: 0 0 12px; }

/* Kopf */
.sh-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 6px 0 8px;
}
.sh-head-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sh-title { margin: 0; font-size: 1.6em; border: 0; padding: 0; }
.sh-title a { color: inherit; text-decoration: none; }
.sh-sub { color: var(--sh-muted); font-size: 0.85em; font-weight: normal; }

.sh-balance {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--sh-gold-soft);
	border: 1px solid rgba(192, 138, 0, 0.35);
	color: #6b4d00;
	font-weight: bold;
	text-decoration: none;
}
.sh-balance:hover { text-decoration: none; filter: brightness(0.97); }
.sh-coin {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #ffe28a, #d9a400 60%, #a67c00);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
	vertical-align: -2px;
}

/* Reiter */
.sh-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 2px solid var(--sh-accent);
	padding-bottom: 0;
}
.sh-tabs a {
	padding: 7px 12px;
	border-radius: 8px 8px 0 0;
	background: var(--sh-card-alt);
	border: 1px solid var(--sh-border);
	border-bottom: 0;
	text-decoration: none;
	font-weight: bold;
	white-space: nowrap;
}
.sh-tabs a:hover { background: var(--sh-accent-soft); text-decoration: none; }
.sh-tabs a.sh-active { background: var(--sh-accent); color: #fff; border-color: var(--sh-accent); }
.sh-count {
	display: inline-block;
	min-width: 1.6em;
	padding: 0 5px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	font-size: 0.85em;
	text-align: center;
	font-weight: normal;
}
.sh-tabs a.sh-active .sh-count { background: rgba(255, 255, 255, 0.25); }

/* Raster */
.sh-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 270px;
	gap: 16px;
	align-items: start;
}
.sh-main { min-width: 0; }
.sh-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 900px) {
	.sh-layout { grid-template-columns: minmax(0, 1fr); }
}

.sh-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin: 4px 0 12px;
}
.sh-sorts { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-chip {
	padding: 4px 11px;
	border-radius: 999px;
	border: 1px solid var(--sh-border);
	background: var(--sh-card);
	text-decoration: none;
	font-size: 0.95em;
}
.sh-chip:hover { text-decoration: none; border-color: var(--sh-accent); }
.sh-chip.sh-active { background: var(--sh-accent); color: #fff; border-color: var(--sh-accent); }

.sh-search { display: flex; gap: 6px; }
.sh-search input {
	width: 200px;
	max-width: 50vw;
	padding: 5px 9px;
	border: 1px solid var(--sh-border);
	border-radius: 6px;
	font-size: 1em;
}
.sh-catdesc { margin: 0 0 12px; }

/* Spielkarten */
.sh-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}
.sh-card {
	display: flex;
	flex-direction: column;
	background: var(--sh-card);
	border: 1px solid var(--sh-border);
	border-radius: var(--sh-radius);
	overflow: hidden;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sh-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
.sh-card-champ { border-color: var(--sh-gold); box-shadow: inset 0 3px 0 var(--sh-gold); }
.sh-card-link {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 12px 12px 8px;
	color: inherit;
	text-decoration: none;
}
.sh-card-link:hover { text-decoration: none; }
.sh-card-link:hover .sh-card-name { color: var(--sh-accent); }
.sh-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sh-card-name { font-weight: bold; font-size: 1.1em; line-height: 1.25; overflow-wrap: anywhere; }
.sh-card-meta { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sh-card-foot {
	margin-top: auto;
	padding-top: 6px;
	border-top: 1px dashed var(--sh-border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.9em;
	color: var(--sh-muted);
}
.sh-champ-line, .sh-mine { font-size: 0.95em; overflow-wrap: anywhere; }

.sh-icon {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--sh-accent-soft);
	vertical-align: middle;
}
.sh-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-icon-lg { width: 72px; height: 72px; border-radius: 16px; }
.sh-icon-sm { width: 28px; height: 28px; border-radius: 6px; }
.sh-icon-letter { font-size: 1.6em; font-weight: bold; color: var(--sh-accent); }
.sh-icon-sm .sh-icon-letter { font-size: 0.9em; }

.sh-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.sh-badge {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: bold;
	background: rgba(0, 0, 0, 0.07);
	color: var(--sh-muted);
}
.sh-badge-new { background: #e3f4e6; color: #23703a; }
.sh-badge-fav, .sh-badge-champ { background: var(--sh-gold-soft); color: var(--sh-gold); }

.sh-crown { color: var(--sh-gold); }
.sh-score { font-weight: bold; font-variant-numeric: tabular-nums; }
.sh-muted { color: var(--sh-muted); }
.sh-small { font-size: 0.9em; }
.sh-big { font-size: 1.25em; margin: 2px 0; }
.sh-right { margin-left: auto; }
.sh-plus { color: #23703a; font-weight: bold; }
.sh-minus { color: #b42318; font-weight: bold; }

/* Sterne (Anzeige) */
.sh-stars {
	display: inline-block;
	position: relative;
	font-size: 1em;
	line-height: 1;
	letter-spacing: 1px;
	color: #d0d5dd;
}
.sh-stars::before { content: '★★★★★'; }
.sh-stars::after {
	content: '★★★★★';
	position: absolute;
	left: 0;
	top: 0;
	width: var(--sh-pct, 0%);
	overflow: hidden;
	color: #f2b01e;
	white-space: nowrap;
}

/* Kästen */
.sh-box {
	background: var(--sh-card);
	border: 1px solid var(--sh-border);
	border-radius: var(--sh-radius);
	padding: 10px 14px;
}
.sh-box h3 {
	margin: 0 0 8px;
	padding: 0 0 6px;
	font-size: 1.05em;
	border-bottom: 1px solid var(--sh-border);
	text-transform: none;
	color: inherit;
}
.sh-box p { margin: 4px 0; }
.sh-box-season { background: linear-gradient(135deg, var(--sh-accent-soft), var(--sh-card)); }
.sh-box-champ { background: linear-gradient(135deg, var(--sh-gold-soft), var(--sh-card) 70%); }
.sh-record { margin-top: 8px !important; padding-top: 6px; border-top: 1px dashed var(--sh-border); }

.sh-list { list-style: none; margin: 0; padding: 0; }
.sh-list li { padding: 5px 0; border-bottom: 1px dotted var(--sh-border); line-height: 1.35; }
.sh-list li:last-child { border-bottom: 0; }
.sh-ranklist li { display: flex; align-items: center; gap: 6px; }
.sh-ranklist .sh-name { min-width: 0; overflow-wrap: anywhere; }
.sh-ranklist li.sh-me { background: var(--sh-accent-soft); border-radius: 6px; padding-left: 4px; padding-right: 4px; }
.sh-ava img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; }

.sh-pos {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 4px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.07);
	font-size: 0.85em;
	font-weight: bold;
}
.sh-pos-1 { background: #f6c443; color: #5a3f00; }
.sh-pos-2 { background: #cfd5dc; color: #333; }
.sh-pos-3 { background: #e0a46e; color: #4a2a0c; }

.sh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.sh-stats div { background: var(--sh-card-alt); border-radius: 8px; padding: 6px 8px; text-align: center; }
.sh-stats dt { font-size: 0.85em; color: var(--sh-muted); }
.sh-stats dd { margin: 0; font-size: 1.35em; font-weight: bold; }

/* Spielseite */
.sh-gamehead { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
.sh-gametitle { margin: 0; font-size: 1.5em; border: 0; padding: 0; }
.sh-player-ava img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }

.sh-stage-wrap {
	width: 100%;
	margin: 0 auto;
	transition: max-width 0.15s ease;
}
.sh-stage {
	position: relative;
	width: 100%;
	aspect-ratio: var(--sh-w) / var(--sh-h);
	background: #111;
	border-radius: var(--sh-radius);
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}
.sh-stage-wrap:fullscreen { max-width: none !important; display: flex; align-items: center; justify-content: center; background: #000; }
.sh-stage-wrap:fullscreen .sh-stage { width: min(100vw, calc(100vh * var(--sh-w) / var(--sh-h))); border-radius: 0; }
.sh-frame, .sh-ruffle { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.sh-overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: radial-gradient(circle at 50% 35%, rgba(40, 52, 80, 0.92), rgba(10, 12, 20, 0.96));
	color: #fff;
	text-align: center;
	overflow: auto;
}
.sh-overlay[hidden], .sh-saving[hidden] { display: none; }
.sh-overlay-inner { max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sh-overlay h3 { margin: 4px 0; font-size: 1.5em; color: #fff; border: 0; text-transform: none; }
.sh-overlay a:not(.sh-play-btn):not(.button) { color: #ffd76a; }
.sh-overlay .sh-icon { background: rgba(255, 255, 255, 0.12); }

.sh-play-btn {
	display: inline-block;
	padding: 10px 26px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #ffd76a, #e9a800);
	color: #3a2a00 !important;
	font-size: 1.25em;
	font-weight: bold;
	cursor: pointer;
	text-decoration: none !important;
	box-shadow: 0 3px 0 #b07e00;
}
.sh-play-btn:hover { filter: brightness(1.05); }
.sh-play-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #b07e00; }
.sh-notice { background: rgba(255, 255, 255, 0.12); padding: 8px 12px; border-radius: 8px; }
.sh-error { color: #ff8a80; font-weight: bold; }
.sh-box .sh-error, .sh-result-page .sh-error { color: #b42318; }

.sh-saving {
	position: absolute;
	z-index: 4;
	left: 50%;
	top: 12px;
	transform: translateX(-50%);
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-weight: bold;
}

.sh-result-score { font-size: 2.6em; font-weight: bold; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sh-result-big { font-size: 1.2em; font-weight: bold; }
.sh-gold { color: #ffd76a; }
.sh-result-page .sh-gold { color: var(--sh-gold); }
.sh-result-coins { color: #ffd76a; font-weight: bold; }
.sh-result-page .sh-result-coins { color: var(--sh-gold); }
.sh-result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 10px; }
.sh-result-page { text-align: center; padding: 20px; }
.sh-result-page h2 { border: 0; }

.sh-gamebar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin: 10px 0;
}
.sh-gamebar-left, .sh-gamebar-right { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sh-gamebar .button.sh-on { color: var(--sh-gold); border-color: var(--sh-gold); }
.sh-rating { display: inline-flex; align-items: center; gap: 6px; }
.sh-rate-star {
	border: 0;
	background: none;
	padding: 0 1px;
	font-size: 1.35em;
	line-height: 1;
	color: #d0d5dd;
	cursor: pointer;
}
.sh-rate-input:hover .sh-rate-star { color: #f2b01e; }
.sh-rate-input .sh-rate-star:hover ~ .sh-rate-star { color: #d0d5dd; }
.sh-rate-star.sh-on { color: #f2b01e; }
.sh-desc { margin-top: 4px; }

/* Tabellen */
.sh-table .sh-col-pos { width: 40px; text-align: center; }
.sh-table .sh-col-num { text-align: right; white-space: nowrap; }
.sh-table tr.sh-me td { font-weight: bold; }
.sh-table td { vertical-align: middle; padding: 6px 8px; }
.sh-gamecell { display: inline-flex; align-items: center; gap: 8px; }
.sh-section-title { margin: 6px 0 10px; border: 0; }
.sh-seasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sh-konto-head { text-align: center; margin-bottom: 12px; }
.sh-konto-head h2 { border: 0; margin: 0; }

@media (max-width: 700px) {
	.sh-hide-sm { display: none; }
	.sh-search { width: 100%; }
	.sh-search input { flex: 1; width: auto; max-width: none; }
	.sh-tabs a { padding: 6px 9px; }
	.sh-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
	.sh-icon { width: 44px; height: 44px; }
}

/* Alle Ergebnisse */
.sh-flags { white-space: nowrap; text-align: right; }
.sh-flags .sh-gold { color: var(--sh-gold); }
