:root {
    --bg: #070d19;
    --bg-deep: #040812;
    --surface: rgba(14, 22, 40, 0.84);
    --surface-solid: #111b30;
    --border: rgba(148, 163, 184, 0.2);
    --border-strong: rgba(245, 158, 11, 0.42);
    --text: #f8fafc;
    --muted: #94a3b8;
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.35);
    --accent: #f59e0b;
    --accent-bright: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.35);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --felt-light: #166534;
    --felt-mid: #0d4425;
    --felt-dark: #072816;
    --card-w: clamp(46px, 4.6vw, 70px);
    --card-h: clamp(64px, 8.8vh, 96px);
    --slot-cell-h: clamp(72px, 11.4vh, 102px);
}

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

html, body {
    min-height: 100vh;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(6, 11, 22, 0.78) 0%, rgba(4, 8, 18, 0.9) 100%),
        url('../img/casino-bg.jpg'),
        radial-gradient(circle at 12% 14%, rgba(16, 185, 129, 0.16), transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.14), transparent 38%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.ambient-canvas,
.fx-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ambient-canvas {
    z-index: 0;
}

.fx-canvas {
    z-index: 999;
}

.topbar,
.container,
.site-footer {
    position: relative;
    z-index: 1;
}

.hidden {
    display: none !important;
}

/* =========================================================
   GORNY PASEK NAWIGACJI I LOGO ROYAL CASINO SIMULATOR
   ========================================================= */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem clamp(0.9rem, 2.5vw, 2rem);
    background: rgba(8, 14, 28, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.22);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.48);
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.brand-emblem {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 25%, rgba(251, 191, 36, 0.25), rgba(7, 13, 25, 0.95));
    border: 1px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-emblem svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.65));
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-royal {
    font-size: clamp(1.05rem, 1.5vw, 1.32rem);
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: linear-gradient(
        110deg,
        #fde68a 0%,
        #f59e0b 25%,
        #ffffff 48%,
        #fbbf24 68%,
        #34d399 100%
    );
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: royalShimmer 5.5s linear infinite;
    filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.28));
}

.brand-sub {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
}

@keyframes royalShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 240% center; }
}

/* Zachowanie kompatybilnosci ze starym .brand na podstronach */
.brand {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    font-weight: 800;
    letter-spacing: 0.6px;
    background: linear-gradient(90deg, #f8fafc 0%, #fbbf24 55%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    flex-shrink: 0;
}

/* Strefa srodkowa: zintegrowany portfel i bonus */
.wallet-cluster {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.3rem 0.22rem 0.75rem;
    height: 40px;
    border-radius: 10px;
    background: rgba(7, 13, 25, 0.92);
    border: 1px solid rgba(245, 158, 11, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.35);
}

.wallet-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.92rem;
    white-space: nowrap;
}

.wallet-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 700;
}

.wallet-amount strong {
    color: var(--accent-bright);
    font-size: 0.98rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.wallet-unit {
    font-size: 0.78rem;
    color: var(--muted);
}

.wallet-bonus-btn {
    height: 30px;
    padding: 0 0.7rem;
    font-size: 0.78rem;
    border-radius: 7px;
}

/* Strefa prawa: nawigacja, konto i narzedzia */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.15rem;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-pill {
    height: 38px;
    padding: 0 0.85rem;
    font-size: 0.84rem;
    border-radius: 9px;
}

.user-chip {
    height: 38px;
    padding: 0 0.75rem;
    border-radius: 9px;
    background: rgba(7, 13, 25, 0.88);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.user-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.badge,
.balance-box {
    background: rgba(7, 13, 25, 0.88);
    border: 1px solid var(--border);
    padding: 0.38rem 0.72rem;
    border-radius: 8px;
    font-size: 0.88rem;
    white-space: nowrap;
}

.balance-box {
    border-color: rgba(245, 158, 11, 0.35);
}

.balance-box strong {
    color: var(--accent-bright);
    font-variant-numeric: tabular-nums;
}

.balance-pulse-win {
    animation: pulseWin 0.65s ease;
}

.balance-pulse-loss {
    animation: pulseLoss 0.55s ease;
}

@keyframes pulseWin {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.75); border-color: var(--primary); }
    100% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
}

@keyframes pulseLoss {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); border-color: var(--danger); }
    100% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

/* =========================================================
   KONTENERY, KARTY I PRZYCISKI
   ========================================================= */

.container {
    width: 100%;
    max-width: min(1360px, 96vw);
    margin: clamp(0.5rem, 1.2vh, 1.1rem) auto;
    padding: 0 clamp(0.5rem, 1.2vw, 1rem);
    flex: 1;
}

.card {
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-top-color: rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: clamp(0.75rem, 1.4vh, 1.2rem);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48);
}

.btn {
    padding: 0.5rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.88rem;
    transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    padding: 0.34rem 0.65rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #032219;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-accent {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #261400;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-admin {
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    color: #f8fafc;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
}

.btn-secondary {
    background: rgba(51, 65, 85, 0.78);
    border-color: rgba(148, 163, 184, 0.22);
    color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(71, 85, 105, 0.92);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-sound {
    height: 38px;
    padding: 0 0.75rem;
    font-size: 0.82rem;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 9px;
}

.btn-sound.is-muted {
    color: var(--muted);
    border-color: rgba(148, 163, 184, 0.14);
}

.full-width {
    width: 100%;
}

.alert {
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.7rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeSlideIn 0.2s ease-out;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.55);
    color: #fecaca;
}

.alert-success {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.55);
    color: #a7f3d0;
}

.floating-payout {
    position: fixed;
    transform: translateX(-50%);
    font-weight: 800;
    font-size: 1rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    pointer-events: none;
    z-index: 1000;
    animation: floatUp 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    white-space: nowrap;
}

.floating-payout.positive {
    background: rgba(16, 185, 129, 0.94);
    color: #032219;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.55);
}

.floating-payout.negative {
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
}

@keyframes floatUp {
    0% { opacity: 0; transform: translate(-50%, 6px) scale(0.9); }
    18% { opacity: 1; transform: translate(-50%, 0) scale(1.04); }
    100% { opacity: 0; transform: translate(-50%, -34px) scale(0.98); }
}

/* =========================================================
   STOPKA STRONY
   ========================================================= */

.site-footer {
    margin-top: auto;
    background: rgba(6, 11, 22, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 0.85rem clamp(1rem, 2.5vw, 2rem);
    font-size: 0.82rem;
    color: var(--muted);
}

.footer-inner {
    max-width: min(1360px, 96vw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.footer-title {
    font-weight: 800;
    color: var(--text);
}

.footer-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--accent-bright);
}

.footer-note {
    font-size: 0.76rem;
    color: rgba(148, 163, 184, 0.78);
}

/* =========================================================
   LOGOWANIE I LOBBY Z BANEREM
   ========================================================= */

.auth-card {
    max-width: 430px;
    margin: clamp(1.5rem, 6vh, 4rem) auto;
    padding: 1.75rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-header h1 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.auth-header p {
    font-size: 0.88rem;
    color: var(--muted);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    background: rgba(7, 13, 25, 0.65);
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 0.55rem;
    background: transparent;
    color: var(--muted);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s ease, color 0.15s ease;
}

.tab.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #032219;
}

form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 600;
}

form input {
    width: 100%;
    padding: 0.68rem 0.8rem;
    margin-bottom: 1rem;
    background: rgba(7, 13, 25, 0.88);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.96rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.hero-banner {
    position: relative;
    overflow: hidden;
    min-height: clamp(160px, 22vh, 230px);
    padding: clamp(1.2rem, 2.6vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    background-image:
        linear-gradient(95deg, rgba(6, 12, 24, 0.94) 0%, rgba(6, 12, 24, 0.78) 46%, rgba(6, 12, 24, 0.28) 100%),
        url('../img/hero-banner.jpg');
    background-size: cover;
    background-position: right center;
    border-color: rgba(245, 158, 11, 0.36);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

.hero-content {
    max-width: 560px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent-bright);
    margin-bottom: 0.35rem;
}

.hero-banner h1 {
    font-size: clamp(1.35rem, 2.3vw, 1.95rem);
    line-height: 1.2;
    margin-bottom: 0.45rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.hero-banner p {
    color: #cbd5e1;
    font-size: 0.92rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.hero-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-tag {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    background: rgba(7, 13, 25, 0.8);
    border: 1px solid rgba(251, 191, 36, 0.34);
    color: var(--accent-bright);
}

.section-heading {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.game-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.13), transparent 60%);
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 158, 11, 0.14);
}

.game-card.is-disabled {
    opacity: 0.62;
}

.game-card.is-disabled:hover {
    transform: none;
    border-color: var(--border);
}

.game-card-top {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.65rem;
}

.game-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(7, 13, 25, 0.88);
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.game-icon-wrap svg {
    width: 28px;
    height: 28px;
}

.game-card h3 {
    font-size: 1.08rem;
    line-height: 1.25;
}

.game-meta {
    font-size: 0.75rem;
    color: var(--accent-bright);
    font-weight: 600;
}

.game-card p {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.game-card .btn {
    margin-top: auto;
    align-self: flex-start;
    width: 100%;
}

.history-card h2 {
    margin-bottom: 0.75rem;
    font-size: 1.08rem;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

th, td {
    text-align: left;
    padding: 0.6rem 0.55rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* =========================================================
   PANEL ADMINISTRACYJNY
   ========================================================= */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    font-weight: 700;
}

.kpi-value {
    font-size: clamp(1.2rem, 1.8vw, 1.55rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.kpi-value.accent {
    color: var(--accent-bright);
}

.kpi-value.positive {
    color: var(--primary);
}

.kpi-value.negative {
    color: var(--danger);
}

.admin-stack {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.admin-section-header h2 {
    font-size: 1.08rem;
}

.admin-search {
    padding: 0.42rem 0.75rem;
    background: rgba(7, 13, 25, 0.88);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.86rem;
    min-width: 220px;
    outline: none;
}

.admin-search:focus {
    border-color: var(--accent);
}

.role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.role-admin {
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
}

.role-user {
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: var(--muted);
}

.status-pill-on {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.status-pill-off {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.mini-input {
    width: 86px;
    padding: 0.3rem 0.45rem;
    background: rgba(7, 13, 25, 0.9);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   WSPOLNE ELEMENTY GIER: ZETONY, STAWKI, TABELE WYPLAT
   ========================================================= */

.bet-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    margin: 0.65rem 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.bet-section-title:first-child {
    margin-top: 0;
}

.stake-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.stake-controls input[type="number"] {
    width: clamp(86px, 9vw, 118px);
    height: 38px;
    padding: 0.35rem 0.6rem;
    margin: 0;
    background: rgba(7, 13, 25, 0.9);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.94rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    outline: none;
}

.stake-controls input[type="number"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.chip-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px dashed rgba(255, 255, 255, 0.58);
    background: radial-gradient(circle at 30% 30%, #475569, #1e293b);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.14s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chip-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.06);
    border-color: #fff;
}

.chip-btn[data-value="5"],
.chip-btn[data-set="5"] {
    background: radial-gradient(circle at 30% 30%, #ef4444, #991b1b);
}

.chip-btn[data-value="10"],
.chip-btn[data-set="10"] {
    background: radial-gradient(circle at 30% 30%, #3b82f6, #1d4ed8);
}

.chip-btn[data-value="25"],
.chip-btn[data-set="25"] {
    background: radial-gradient(circle at 30% 30%, #22c55e, #15803d);
}

.chip-btn[data-value="50"],
.chip-btn[data-set="50"] {
    background: radial-gradient(circle at 30% 30%, #f97316, #c2410c);
}

.chip-btn[data-value="100"],
.chip-btn[data-set="100"] {
    background: radial-gradient(circle at 30% 30%, #334155, #0f172a);
    border-color: rgba(251, 191, 36, 0.85);
}

.chip-btn[data-value="250"],
.chip-btn[data-set="250"] {
    background: radial-gradient(circle at 30% 30%, #a855f7, #6b21a8);
}

.chip-btn[data-value="500"],
.chip-btn[data-set="500"] {
    background: radial-gradient(circle at 30% 30%, #fde047, #ca8a04);
    color: #1f1300;
    border-color: #fff;
}

.chip-btn.active {
    transform: scale(1.12);
    border-color: #fff;
    box-shadow: 0 0 0 3px var(--accent), 0 6px 18px rgba(245, 158, 11, 0.5);
}

.chip-btn[data-action] {
    width: auto;
    min-width: 50px;
    height: 38px;
    padding: 0 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(7, 13, 25, 0.88);
    color: var(--text);
    box-shadow: none;
    white-space: nowrap;
    font-size: 0.82rem;
}

.chip-btn[data-action]:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--accent);
    color: var(--accent-bright);
}

.paytable-list {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    margin-bottom: 0.7rem;
}

.paytable-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.6rem;
    background: rgba(7, 13, 25, 0.75);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 0.83rem;
}

.paytable-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.paytable-svg {
    width: 24px;
    height: 24px;
    display: inline-block;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.paytable-note {
    font-size: 0.76rem;
    color: var(--muted);
    margin-left: 0.2rem;
}

.paytable-mult {
    font-weight: 800;
    color: var(--accent-bright);
}

.slots-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
    max-height: clamp(110px, 23vh, 225px);
    overflow-y: auto;
    padding-right: 0.2rem;
}

.slots-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: rgba(7, 13, 25, 0.75);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.text-win { color: var(--primary); font-weight: 700; }
.text-loss { color: var(--muted); }

.rules-details {
    margin-bottom: 0.7rem;
    background: rgba(7, 13, 25, 0.72);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
}

.rules-details summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rules-details summary::-webkit-details-marker {
    display: none;
}

.rules-details summary::after {
    content: "▾";
    font-size: 0.95rem;
    color: var(--accent-bright);
}

.rules-details[open] summary::after {
    content: "▴";
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.rules-list li {
    padding: 0.34rem 0.5rem;
    background: rgba(18, 28, 48, 0.65);
    border: 1px solid var(--border);
    border-radius: 6px;
}

/* =========================================================
   RULETKA EUROPEJSKA Z REALISTYCZNA KULKA
   ========================================================= */

.roulette-layout {
    display: grid;
    grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    align-items: start;
}

.wheel-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.wheel-wrapper {
    position: relative;
    width: min(370px, 82vw, 48vh);
    height: min(370px, 82vw, 48vh);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow:
        0 0 42px rgba(245, 158, 11, 0.18),
        0 18px 40px rgba(0, 0, 0, 0.72);
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.result-display {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.96rem;
    font-weight: 600;
}

.number-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.05rem;
    border: 2px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.ball-red { background: #dc2626; color: #fff; }
.ball-black { background: #111827; color: #fff; }
.ball-green { background: #16a34a; color: #fff; }
.ball-neutral { background: #334155; color: var(--text); }

.recent-section {
    width: 100%;
    text-align: center;
}

.muted-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

.recent-numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
    min-height: 28px;
}

.recent-pill {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.chips-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.chip-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hint-text {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
}

.betting-board {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 6px),
        radial-gradient(circle at center, var(--felt-light) 0%, var(--felt-mid) 65%, var(--felt-dark) 100%);
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px solid rgba(245, 158, 11, 0.38);
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.52);
    overflow-x: auto;
}

.inside-grid,
.dozens-grid,
.even-money-grid {
    min-width: 560px;
}

.inside-grid {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 0.3rem;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(38px, 1fr));
    grid-template-rows: repeat(3, clamp(38px, 5.2vh, 46px));
    gap: 0.3rem;
}

.dozens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    margin-left: 58px;
}

.even-money-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.3rem;
    margin-left: 58px;
}

.bet-cell {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    padding: 0.45rem 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.12s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.bet-cell:hover:not(:disabled) {
    filter: brightness(1.2);
}

.bet-cell:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.cell-zero {
    height: 100%;
    min-height: 126px;
}

.cell-green { background: #15803d; }
.cell-red { background: #b91c1c; }
.cell-black { background: #111827; }
.cell-outside { background: rgba(12, 62, 34, 0.9); }

.bet-cell.winner-highlight {
    box-shadow: 0 0 0 3px var(--accent-bright), 0 0 18px var(--accent);
    z-index: 2;
}

.chip-marker {
    position: absolute;
    top: -7px;
    right: -5px;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    color: #1f1300;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.bet-summary {
    font-size: 0.96rem;
}

.action-buttons {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

/* =========================================================
   AUTOMATY Z OWOCKAMI (REALNE PRZESUWANIE BEBNOW)
   ========================================================= */

.slots-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.85fr);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    align-items: start;
}

.slot-cabinet {
    background:
        radial-gradient(circle at top center, rgba(245, 158, 11, 0.16), transparent 55%),
        linear-gradient(180deg, #17233b 0%, #09101f 100%);
    border: 2px solid rgba(245, 158, 11, 0.42);
    border-radius: 16px;
    padding: clamp(0.8rem, 1.5vh, 1.15rem);
    box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.65), 0 0 32px rgba(245, 158, 11, 0.1);
}

.slot-header-lights {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.slot-bulb {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-bright);
    box-shadow: 0 0 10px var(--accent);
    animation: bulbGlow 1.4s ease-in-out infinite alternate;
}

.slot-bulb:nth-child(even) {
    background: #34d399;
    box-shadow: 0 0 10px #10b981;
    animation-delay: 0.7s;
}

.slot-cabinet-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-bright);
    padding: 0 0.5rem;
}

@keyframes bulbGlow {
    from { opacity: 0.45; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.15); }
}

.reels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(0.45rem, 1vw, 0.75rem);
    margin-bottom: 0.85rem;
}

.reel-viewport {
    position: relative;
    height: calc(var(--slot-cell-h) * 3);
    overflow: hidden;
    background: #050a14;
    border: 2px solid rgba(245, 158, 11, 0.32);
    border-radius: 12px;
    box-shadow: inset 0 12px 24px rgba(0, 0, 0, 0.9), inset 0 -12px 24px rgba(0, 0, 0, 0.9);
}

.reel-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 10px;
    background: linear-gradient(
        180deg,
        rgba(3, 7, 16, 0.72) 0%,
        rgba(3, 7, 16, 0.08) 18%,
        rgba(3, 7, 16, 0) 50%,
        rgba(3, 7, 16, 0.08) 82%,
        rgba(3, 7, 16, 0.72) 100%
    );
    z-index: 3;
}

.reel-strip {
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.reel-strip.is-spinning .slot-svg {
    filter: blur(1.3px) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.slot-item {
    height: var(--slot-cell-h);
    flex-shrink: 0;
    padding: 5px 7px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.slot-cell-inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 35%, #1f2f4d 0%, #0f172a 100%);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    user-select: none;
    transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.slot-svg {
    width: clamp(46px, 7.2vh, 66px);
    height: clamp(46px, 7.2vh, 66px);
    display: block;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.55));
}

.slot-cell-inner.win {
    border-color: var(--accent-bright);
    background: radial-gradient(circle, rgba(245, 158, 11, 0.36) 0%, rgba(245, 158, 11, 0.1) 100%);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.65);
    animation: slotWinPulse 0.6s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
}

@keyframes slotWinPulse {
    from { transform: scale(1.01); }
    to { transform: scale(1.05); }
}

.win-summary {
    min-height: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    padding: 0.4rem 0.6rem;
    background: rgba(7, 13, 25, 0.65);
    border-radius: 8px;
}

.win-summary strong {
    color: var(--accent-bright);
}

.slots-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.85rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.slots-btn-group {
    display: flex;
    gap: 0.5rem;
}

/* =========================================================
   BLACKJACK I TEXAS HOLD'EM (SKALOWALNE STOLY KARCIANE)
   ========================================================= */

.bj-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
    gap: clamp(0.75rem, 1.4vw, 1.2rem);
    align-items: start;
}

.bj-table {
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 2px, transparent 2px, transparent 6px),
        radial-gradient(circle at center, var(--felt-light) 0%, var(--felt-mid) 68%, var(--felt-dark) 100%);
    border: 3px solid rgba(245, 158, 11, 0.38);
    border-radius: 14px;
    padding: clamp(0.6rem, 1.2vh, 1rem) clamp(0.75rem, 1.4vw, 1.15rem);
    display: flex;
    flex-direction: column;
    gap: clamp(0.42rem, 0.95vh, 0.78rem);
    box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.55), 0 8px 26px rgba(0, 0, 0, 0.45);
}

.bj-hand-section {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.bj-hand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.8rem, 0.95vw, 0.92rem);
    font-weight: 700;
}

.score-pill {
    background: rgba(7, 13, 25, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.34);
    padding: 0.16rem 0.6rem;
    border-radius: 999px;
    font-size: clamp(0.74rem, 0.85vw, 0.82rem);
    color: var(--accent-bright);
    white-space: nowrap;
}

.poker-board-section {
    padding: clamp(0.42rem, 0.85vh, 0.68rem) clamp(0.55rem, 1vw, 0.85rem);
    background: rgba(7, 13, 25, 0.36);
    border: 1px dashed rgba(251, 191, 36, 0.32);
    border-radius: 10px;
}

.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.32rem, 0.65vw, 0.55rem);
    min-height: calc(var(--card-h) + 2px);
    align-items: center;
}

.playing-card,
.card-slot {
    width: var(--card-w);
    height: var(--card-h);
    border-radius: 8px;
    flex-shrink: 0;
    user-select: none;
}

.playing-card {
    background: linear-gradient(155deg, #ffffff 0%, #e2e8f0 100%);
    color: #0f172a;
    border: 1px solid #cbd5e1;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.42);
    padding: 0.24rem 0.28rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: cardDeal 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition: transform 0.15s ease;
}

.playing-card:hover {
    transform: translateY(-3px);
}

.playing-card.red {
    color: #dc2626;
}

.playing-card.card-back {
    background:
        radial-gradient(circle at center, rgba(251, 191, 36, 0.22), transparent 60%),
        repeating-linear-gradient(
            45deg,
            #1e3a8a,
            #1e3a8a 6px,
            #172554 6px,
            #172554 12px
        );
    border: 2px solid #e2e8f0;
}

.card-corner {
    font-size: clamp(0.72rem, 0.95vw, 0.88rem);
    font-weight: 800;
    line-height: 1;
}

.card-corner.bottom {
    align-self: flex-end;
    transform: rotate(180deg);
}

.card-center {
    font-size: clamp(1.1rem, 1.7vw, 1.55rem);
    text-align: center;
    line-height: 1;
}

.card-slot {
    border: 2px dashed rgba(255, 255, 255, 0.24);
    background: rgba(7, 13, 25, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(248, 250, 252, 0.45);
    font-size: clamp(0.6rem, 0.78vw, 0.72rem);
    font-weight: 700;
    text-transform: uppercase;
}

@keyframes cardDeal {
    from {
        opacity: 0;
        transform: translateY(-14px) rotate(-4deg) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

.bj-table-banner {
    text-align: center;
    padding: 0.38rem 0.7rem;
    border-radius: 8px;
    background: rgba(7, 13, 25, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: clamp(0.78rem, 0.92vw, 0.88rem);
    font-weight: 600;
}

.bj-controls {
    margin-top: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bj-action-buttons {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.bj-action-buttons .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.55rem 0.9rem;
}

/* =========================================================
   RESPONSYWNOSC
   ========================================================= */

@media (max-width: 980px) {
    .roulette-layout,
    .slots-layout,
    .bj-layout {
        grid-template-columns: 1fr;
    }
    .topbar {
        justify-content: center;
    }
    .nav-divider {
        display: none;
    }
}

@media (max-width: 600px) {
    .topbar,
    .topbar-right,
    .user-bar,
    .footer-inner {
        justify-content: center;
        text-align: center;
    }
    .chip-btn {
        width: 40px;
        height: 40px;
        font-size: 0.76rem;
    }
}