/* ============================================
   RYODAN CORE — Page-Specific Styles
   ============================================ */

/* ==================== COMMON GRIDS ==================== */
.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* ==================== HOME PAGE ==================== */
.home-page { display: flex; flex-direction: column; gap: 24px; }

.home-welcome {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(90deg, rgba(0,0,0,0.94), rgba(0,0,0,0.52)),
        url('../images/ryodan-banner.jpg') center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.welcome-bg-spider {
    position: absolute;
    right: -20px;
    top: -10px;
    font-size: 120px;
    opacity: 0.04;
    transform: rotate(-15deg);
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

.welcome-content { margin-bottom: 24px; max-width: 620px; }
.welcome-greeting { color: var(--text-muted); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.welcome-name { font-size: 40px; font-weight: 900; margin: 4px 0 8px; color: var(--text); }
.welcome-rank {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
}

.welcome-stats {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 16px;
    width: fit-content;
    max-width: 100%;
    background: rgba(0,0,0,0.48);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.welcome-stat { text-align: center; }
.welcome-stat-value { display: block; font-size: 22px; font-weight: 900; color: var(--text); line-height: 1; }
.welcome-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.welcome-stat-divider { width: 1px; height: 40px; background: var(--border); }

.home-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.home-action-card {
    cursor: pointer;
    padding: 20px;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-action-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.action-icon,
.stat-icon,
.empty-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.empty-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    font-size: 14px;
}

.action-icon.nav-icon::before {
    font-size: 18px;
}

.home-action-card h3 { font-size: 15px; }
.home-action-card p { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

.home-lore {
    padding: 24px 28px;
    border-left: 3px solid var(--accent);
}

.home-lore h3 { margin-bottom: 12px; }
.home-lore p { color: var(--text-muted); line-height: 1.8; font-size: 14px; }
.home-lore strong { color: var(--text); }

/* ==================== PROFILE PAGE ==================== */
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-heading h2 {
    margin-bottom: 0;
}

.eyebrow {
    display: block;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.segmented {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.38);
}

.segmented button {
    min-width: 108px;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 800;
    cursor: pointer;
}

.segmented button.active {
    background: var(--text);
    color: #000;
}

.passport-mode { display: none; }
.passport-mode.active { display: block; }

.passport-page {
    color: var(--passport-text, var(--text));
    position: relative;
    isolation: isolate;
    padding: 2px;
}

.passport-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.54)),
        var(--profile-bg, url('../images/ryodan-banner.jpg')) center / cover no-repeat;
    opacity: .32;
}

.passport-page .core-panel,
.passport-page .stat-box,
.passport-page .rank-step,
.passport-page .profile-cosmetic {
    background-color: var(--passport-surface, rgba(12,13,15,.92));
}

.passport-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-view-form {
    display: grid;
    grid-template-columns: minmax(160px, 230px) auto auto;
    gap: 8px;
    align-items: center;
}

.profile-view-form input {
    min-width: 0;
}

.profile-hero {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr) 220px;
    gap: 24px;
    align-items: end;
    min-height: 440px;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(90deg, rgba(5,5,6,0.96) 0%, rgba(5,5,6,0.6) 50%, rgba(5,5,6,0.1) 100%) center / cover no-repeat padding-box padding-box,
        var(--profile-banner, url('../images/ryodan-banner.jpg')) center / cover no-repeat padding-box padding-box;
    box-shadow: inset 0 0 120px rgba(0,0,0,0.6);
    overflow: hidden;
    position: relative;
}

.profile-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent 46%);
}


.profile-avatar-wrap {
    position: relative;
    width: 128px;
    height: 128px;
}

.profile-hero .profile-avatar {
    width: 128px;
    height: 128px;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 20px rgba(255,255,255,0.1);
    object-fit: cover;
}

.profile-badge-mask {
    position: absolute;
    right: -16px;
    bottom: -14px;
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.38);
    background: rgba(0,0,0,0.72);
    box-shadow: var(--shadow-sm);
}

.profile-cosmetics-panel {
    margin-top: 16px;
}

.profile-appearance-panel {
    margin-top: 16px;
}

.appearance-shelf {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.appearance-group {
    display: grid;
    gap: 10px;
}

.appearance-group-title {
    color: var(--passport-muted, var(--text-muted));
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 900;
}

.appearance-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.appearance-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.045);
}

.appearance-item.active {
    border-color: color-mix(in srgb, var(--profile-accent, #b4162a) 70%, white);
    box-shadow: none;
}

.appearance-item-preview {
    width: 58px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,.34);
    overflow: hidden;
}

.appearance-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.appearance-item strong,
.appearance-item small {
    display: block;
    min-width: 0;
}

.appearance-item small {
    color: var(--passport-muted, var(--text-muted));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contract-icon-img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 6px;
}

.appearance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.appearance-form {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.045);
}

.appearance-form strong {
    font-size: 16px;
}

.appearance-form small,
.appearance-uploads small {
    color: var(--passport-muted, var(--text-muted));
    line-height: 1.45;
}

.color-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--passport-muted, var(--text-muted));
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}

.color-field input {
    width: 52px;
    height: 38px;
    padding: 4px;
}

.profile-cosmetics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.profile-cosmetic {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.045);
}

.profile-cosmetic img,
.profile-cosmetic-mark {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.45);
    object-fit: cover;
}

.profile-cosmetic-mark {
    display: grid;
    place-items: center;
    font-weight: 950;
}

.profile-cosmetic strong {
    display: block;
}

.profile-cosmetic small {
    color: var(--text-muted);
    line-height: 1.45;
}

.profile-hero-main h1 {
    font-size: 42px;
    line-height: 1.05;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    letter-spacing: -0.02em;
}

.profile-hero-main p {
    color: var(--passport-muted, var(--text-muted));
    margin: 6px 0 14px;
    font-weight: 800;
}

.profile-hero-main small,
.hero-wallet span {
    color: var(--passport-muted, var(--text-muted));
    font-size: 12px;
}

.hero-wallet {
    display: grid;
    gap: 8px;
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-wallet strong {
    font-size: 24px;
}

.rank-journey {
    display: grid;
    grid-template-columns: repeat(8, minmax(112px, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.rank-step {
    min-height: 96px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.34);
    display: grid;
    align-content: space-between;
}

.rank-step span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
}

.rank-step strong {
    font-size: 12px;
    line-height: 1.3;
}

.rank-step small {
    color: var(--text-soft);
    font-size: 10px;
}

.rank-step.unlocked {
    border-color: rgba(255,255,255,0.24);
    background: rgba(255,255,255,0.06);
}

.rank-step.current {
    border-color: rgba(180,22,42,0.72);
    box-shadow: none;
}

.core-panel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(5,6,7,0.74);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.panel-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
}

.activity-list,
.love-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-row,
.proposal-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md, 12px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.activity-row:hover,
.proposal-row:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    transform: translateY(-1px);
}

.activity-row > span,
.proposal-row > span {
    flex: 1 1 100%;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent, #b4162a);
    font-weight: 800;
    margin-bottom: -4px;
}

.activity-row > strong {
    flex: 1 1 auto;
    font-size: 15px;
    color: var(--text, #fff);
}

.activity-row > small,
.proposal-row > small {
    color: var(--text-muted, #a0a0a0);
    font-size: 13px;
    margin-right: auto;
}

.activity-row > .btn,
.proposal-row > .btn {
    flex: 0 0 auto;
}

.activity-row img.admin-mini-preview {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    margin-left: 10px;
}

.empty-state {
    text-align: center;
    padding: 42px 24px;
}

.empty-state h3 {
    margin-top: 14px;
}

.empty-state p,
.danger-zone p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 8px auto 0;
    max-width: 580px;
}

.empty-inline {
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 13px;
}

.compact-actions {
    flex-wrap: wrap;
}

.notification-center {
    margin-top: 18px;
}

.notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.notification-head small {
    color: var(--text-muted);
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.035);
}

.notification-card.unread {
    border-color: rgba(255,255,255,.26);
    background: rgba(255,255,255,.045);
}

.notification-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,.34);
    font-size: 12px;
    font-weight: 950;
}

.notification-mark.nav-icon::before {
    font-size: 18px;
}

.notification-card strong,
.notification-card p,
.notification-card small {
    display: block;
}

.notification-card p {
    margin: 4px 0;
    color: var(--text-muted);
    line-height: 1.35;
}

.notification-card small,
.notification-done {
    color: var(--text-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.proposal-form {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 18px auto 0;
}

.proposal-form input {
    flex: 1;
}

.proposal-row span {
    display: grid;
    gap: 2px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.couple-hero {
    text-align: center;
    background: rgba(0,0,0,0.58);
}

.couple-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 14px;
}

.profile-hero.love-hero .couple-avatars {
    margin-bottom: 0;
    justify-content: flex-start;
}

.couple-avatars img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.32);
}

.couple-link {
    color: var(--text);
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 2px;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.room-grid div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
}

.danger-zone {
    border-color: rgba(217, 28, 52, 0.42);
    background: rgba(40, 4, 9, 0.42);
}

.restricted-panel {
    margin-bottom: 14px;
    border-color: rgba(217, 28, 52, 0.46);
    background: rgba(40,4,9,0.45);
}

.restricted-panel p {
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .rank-journey { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
    .profile-hero { grid-template-columns: auto 1fr; }
    .hero-wallet { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .page-heading { align-items: stretch; flex-direction: column; }
    .segmented { width: 100%; }
    .segmented button { flex: 1; min-width: 0; }
    .profile-hero { grid-template-columns: 1fr; text-align: left; }
    .profile-hero .profile-avatar { width: 86px; height: 86px; }
    .profile-hero-main h1 { font-size: 28px; }
    .hero-wallet,
    .rank-journey,
    .room-grid { grid-template-columns: 1fr; }
    .activity-row,
    .proposal-row { grid-template-columns: 1fr; }
    .proposal-form { flex-direction: column; }
}

.profile-main { margin-bottom: 24px; }

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

.profile-level-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    border: 2px solid var(--bg);
    white-space: nowrap;
}

.profile-info { flex: 1; }
.profile-username { font-size: 24px; font-weight: 900; margin-bottom: 4px; }
.profile-rank {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.stat-box {
    text-align: center;
    padding: 20px 16px;
    background: rgba(0,0,0,0.3);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.stat-box:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.stat-icon { margin: 0 auto 10px; }
.stat-value { font-size: 20px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ==================== CONTRACTS ==================== */
.contracts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contract-card { display: flex; flex-direction: column; gap: 12px; }

.contract-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.contract-type-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-soft);
    font-weight: 600;
}

.contract-card h3 { font-size: 16px; }
.contract-card p { color: var(--text-muted); font-size: 13px; line-height: 1.5; flex: 1; }

/* ==================== GAMES ==================== */
.full-games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.games-dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

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

.game-lobby-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #050607;
    cursor: pointer;
    isolation: isolate;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.game-lobby-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.34);
    box-shadow: var(--shadow-md);
}

.game-card-bg,
.game-room-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-bg {
    background-size: cover;
    background-position: center;
}

.game-card-shade,
.game-room-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.88));
    z-index: 1;
    pointer-events: none;
}

.game-card-body {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 320px;
    padding: 18px;
    display: grid;
    align-content: end;
    gap: 10px;
}

.game-card-body p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 13px;
}

.game-room {
    position: relative;
    min-height: min(760px, calc(100vh - 88px));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #050607;
    margin-bottom: 16px;
    isolation: isolate;
}

.game-room-content {
    position: relative;
    z-index: 2;
    min-height: inherit;
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
}

.game-room-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.game-room-head h2 {
    margin-bottom: 8px;
}

.game-room-head p {
    color: var(--text-muted);
    line-height: 1.6;
}

.game-room-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.game-info-panel {
    display: grid;
    gap: 10px;
    align-content: start;
}

.game-info-panel div {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.52);
    backdrop-filter: blur(12px);
}

.game-info-panel span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 4px;
}

.game-play-panel {
    display: grid;
    grid-template-rows: minmax(260px, 1fr) auto auto;
    gap: 14px;
    min-width: 0;
}

.coinflip-cinema,
.blackjack-board,
.rps-vs,
.roulette-stage,
.slots-reels,
.dice-duel,
.casino-roll-stage,
.card-reveal-stage {
    display: grid;
    place-items: center;
    min-height: 300px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.48);
    overflow: hidden;
}

.coinflip-cinema video {
    width: 100%;
    height: 100%;
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
    opacity: 0;
    transition: opacity .25s ease;
}

.coinflip-cinema video[src] {
    opacity: 1;
}

.coinflip-idle {
    width: 122px;
    height: 122px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fafafa, #74777f);
    color: #111;
    border: 8px solid rgba(255,255,255,0.18);
    font-weight: 950;
    animation: coinIdle 2.4s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    transition: opacity .2s ease, transform .2s ease;
}

.coinflip-idle small {
    display: block;
    color: #333;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.coinflip-idle.hidden {
    opacity: 0;
    transform: scale(.84);
    pointer-events: none;
}

.blackjack-board {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 18px;
}

.blackjack-board img {
    width: clamp(70px, 11vw, 120px);
    filter: drop-shadow(0 16px 20px rgba(0,0,0,0.42));
    animation: cardDeal 0.5s ease both;
}

.rps-vs,
.dice-duel {
    grid-auto-flow: column;
    gap: 18px;
    font-weight: 950;
}

.rps-vs span,
.dice-duel span {
    min-width: 96px;
    min-height: 96px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
}

.roulette-stage { position: relative; }

.roulette-wheel {
    width: min(310px, 72vw);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    border: 12px solid rgba(255,255,255,0.12);
    background:
        conic-gradient(#9c1424 0 10%, #0a0b0d 10% 20%, #9c1424 20% 30%, #0a0b0d 30% 40%, #0f7d50 40% 45%, #9c1424 45% 60%, #0a0b0d 60% 75%, #9c1424 75% 88%, #0a0b0d 88% 100%);
    box-shadow: inset 0 0 44px rgba(0,0,0,0.66), 0 24px 60px rgba(0,0,0,0.42);
}

.roulette-wheel::after {
    content: '';
    width: 38%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #07080a;
    border: 1px solid rgba(255,255,255,0.2);
    position: absolute;
}

.roulette-wheel span {
    position: absolute;
    z-index: 1;
    font-weight: 950;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    font-size: 11px;
    transform:
        rotate(calc(var(--i) * 9.72973deg))
        translateY(-124px)
        rotate(calc(var(--i) * -9.72973deg));
}

.roulette-wheel span:nth-child(1) { color: #9df0c9; }

.roulette-wheel b {
    position: absolute;
    z-index: 2;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    
    background: rgba(0,0,0,.84);
    font-size: 36px;
}

.roulette-pointer {
    position: absolute;
    top: 22px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 22px solid #f5f5f5;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

.is-playing .roulette-wheel {
    animation: rouletteSpin 0.9s cubic-bezier(.2,.8,.2,1) infinite;
}

.roulette-finished .roulette-wheel {
    animation: rouletteStop 2.55s cubic-bezier(.08,.74,.12,1) forwards;
}

.slots-reels {
    grid-template-columns: repeat(3, minmax(72px, 122px));
    gap: 12px;
}

.slots-reels span {
    width: 100%;
    aspect-ratio: 0.82;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.68));
    font-weight: 950;
    font-size: clamp(18px, 4vw, 32px);
    box-shadow: inset 0 -18px 30px rgba(0,0,0,0.34);
}

.is-playing .slots-reels span {
    animation: slotPulse 0.24s linear infinite;
}

.casino-roll-stage {
    gap: 18px;
    width: 100%;
}

.casino-roll-stage strong {
    font-size: clamp(24px, 4vw, 44px);
}

.roll-result-running .roll-strip span,
.slot-reveal-finished .slots-reels span,
.dice-reveal-running .dice-duel span {
    animation: revealPop .7s ease both;
}

.card-reveal-stage {
    grid-auto-flow: column;
    gap: 14px;
    font-weight: 950;
}

.card-reveal-stage span,
.card-reveal-stage b {
    min-width: 94px;
    min-height: 132px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    
    background: linear-gradient(160deg, rgba(255,255,255,.13), rgba(0,0,0,.68));
    box-shadow: 0 24px 54px rgba(0,0,0,.38);
}

.big-vault {
    width: 160px;
    height: 160px;
}

.bet-panel {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.54);
}

.bet-panel label {
    display: grid;
    gap: 6px;
}

.bet-panel label span {
    color: var(--text-muted);
    font-size: 12px;
}

.game-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.room-result {
    backdrop-filter: blur(12px);
}

.game-room.won {
    box-shadow: none;
}

.game-room.lost {
    animation: loseShake 0.42s ease both;
}

.games-history-panel {
    margin-bottom: 16px;
}

.games-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.games-metrics div {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.44);
}

.games-metrics span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 4px;
}

.games-metrics strong {
    font-size: 17px;
}

.games-side {
    position: sticky;
    top: 0;
}

.game-arena {
    min-height: 360px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(0,0,0,0.42));
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 14px;
    overflow: hidden;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.game-arena:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.28);
}

.game-arena.won {
    border-color: rgba(103,166,92,0.65);
    box-shadow: none;
}

.game-arena.lost {
    animation: loseShake 0.42s ease both;
}

.game-topline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-topline p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.game-stage {
    min-height: 150px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.74));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.coin3d {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 6px solid rgba(255,255,255,0.18);
    background: linear-gradient(135deg, #fafafa, #74777f);
    color: #111;
    font-weight: 950;
    box-shadow: 0 18px 42px rgba(0,0,0,0.42);
    animation: coinIdle 2.4s ease-in-out infinite;
}

.is-playing .coin3d {
    animation: coinFlip 0.72s linear infinite;
}

.card-table,
.choice-triplet {
    display: flex;
    gap: 10px;
}

.card-table span,
.choice-triplet span,
.number-grid span {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.09);
    border-radius: 7px;
    color: var(--text);
    font-weight: 900;
}

.card-table span {
    width: 48px;
    height: 68px;
}

.is-playing .card-table span {
    animation: cardDeal 0.72s ease both;
}

.choice-triplet span {
    min-width: 64px;
    min-height: 54px;
    font-size: 10px;
}

.roll-strip {
    display: flex;
    gap: 8px;
}

.roll-strip span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 70px;
    border-radius: 6px;
    background: #08090b;
    border: 1px solid rgba(255,255,255,0.24);
    font-size: 30px;
    font-weight: 950;
}

.is-playing .roll-strip span {
    animation: rollingNumber 0.2s linear infinite;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(3, 42px);
    gap: 8px;
}

.number-grid span {
    height: 42px;
}

.number-grid span.hit {
    color: #fff;
    border-color: var(--success);
    background: rgba(103,166,92,.26);
    box-shadow: none;
}

.vault-door {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    border: 10px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.8);
    display: grid;
    place-items: center;
    position: relative;
}

.vault-door::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-top: 2px solid rgba(180,22,42,0.8);
    animation: scanLine 1.4s linear infinite;
}

.vault-door.opened {
    border-color: var(--success);
    box-shadow: none;
}

.game-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-controls input {
    width: 110px;
}

.game-result {
    min-height: 38px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.34);
    color: var(--text-muted);
    font-size: 13px;
}

.game-result.success { color: var(--success); }
.game-result.danger { color: var(--danger); }

.game-invites-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.game-invites-strip.is-empty {
    overflow: visible;
}

.game-invite-card,
.game-invites-strip.is-empty > div {
    min-width: min(320px, 86vw);
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.52);
    display: grid;
    gap: 8px;
}

.game-invite-card.incoming {
    border-color: rgba(180,22,42,0.56);
    box-shadow: none;
}

.game-invite-card small {
    color: var(--text-muted);
}

.game-invite-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-invite-panel {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(130px, 180px) minmax(150px, 240px) auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.56);
    backdrop-filter: blur(12px);
}

.game-invite-panel strong {
    display: block;
    margin-top: 4px;
    font-size: 14px;
}

.games-hub-page {
    display: grid;
    gap: 18px;
}

.core-games-hero {
    min-height: 330px;
    align-items: stretch;
}

.games-hero-actions,
.game-card-actions,
.lobby-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.games-hero-actions {
    margin-top: 18px;
}

.game-mode-switch {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.game-mode-switch button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.42);
    color: var(--text-muted);
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}

.game-mode-switch button.active {
    color: var(--text);
    border-color: rgba(180,22,42,0.72);
    background: rgba(180,22,42,0.18);
}

.quick-match-panel,
.featured-game,
.active-lobby-card,
.player-stats-panel,
.lobby-summary {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.44);
}

.quick-match-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
}

.quick-match-panel p {
    color: var(--text-muted);
    margin-top: 5px;
}

.featured-game {
    min-height: 360px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.featured-game-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-game-body {
    position: relative;
    z-index: 2;
    min-height: inherit;
    padding: 24px;
    display: grid;
    align-content: end;
    gap: 12px;
    max-width: 720px;
}

.featured-game-body h3 {
    font-size: clamp(30px, 5vw, 54px);
}

.featured-game-body p {
    color: var(--text-muted);
    line-height: 1.6;
}

.featured-stats,
.game-mode-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.featured-stats span,
.game-mode-tags span,
.game-status {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.4);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
}

.active-lobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.active-lobby-card {
    padding: 14px;
    display: grid;
    gap: 8px;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.active-lobby-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.32);
}

.active-lobby-card small {
    color: var(--text-muted);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.game-hub-card {
    min-height: 390px;
}

.game-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.game-symbol {
    --game-symbol-accent: var(--accent);
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--game-symbol-accent), white 22%);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--game-symbol-accent), white 18%), transparent 54%),
        rgba(244,241,234,0.045);
    color: var(--text);
    font-size: 20px;
    font-weight: 950;
    line-height: 1;
}

.game-symbol-coinflip { --game-symbol-accent: #d1a642; }
.game-symbol-rps { --game-symbol-accent: #9fa7b5; }
.game-symbol-blackjack,
.game-symbol-highlow,
.game-symbol-carddraw { --game-symbol-accent: #f4f1ea; }
.game-symbol-casino,
.game-symbol-roulette { --game-symbol-accent: #b4162a; }
.game-symbol-slots { --game-symbol-accent: #a676ff; }
.game-symbol-guess { --game-symbol-accent: #67a6ff; }
.game-symbol-vault { --game-symbol-accent: #73b36a; }
.game-symbol-dice { --game-symbol-accent: #d1a642; }

.game-hub-card .game-card-body {
    min-height: 390px;
}

.games-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.player-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.player-stats-grid div {
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.32);
}

.player-stats-grid span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 4px;
}

.full-game-room .game-room-content,
.lobby-room-page .game-room-content {
    grid-template-rows: auto 1fr auto auto;
}

.rich-game-header {
    grid-template-columns: auto minmax(0, 1fr) minmax(250px, 420px);
}

.game-header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
    gap: 8px;
}

.game-header-stats div {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.46);
}

.game-header-stats span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
}

.game-room-layout,
.lobby-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr) 270px;
    gap: 14px;
    min-height: 390px;
}

.lobby-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.players-panel,
.round-log-panel,
.game-board-panel,
.lobby-seats,
.lobby-summary {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.48);
    backdrop-filter: blur(12px);
}

.players-panel,
.round-log-panel {
    padding: 14px;
    display: grid;
    align-content: start;
    gap: 10px;
}

.player-seat,
.lobby-seat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.045);
}

.player-seat.ready,
.lobby-seat.ready {
    border-color: rgba(103,166,92,0.6);
}

.player-seat.bot,
.lobby-seat.bot {
    background: rgba(180,22,42,0.11);
}

.player-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 950;
}

.player-seat small,
.lobby-seat small {
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
}

.game-board-panel {
    position: relative;
    min-height: 390px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.round-log {
    display: grid;
    gap: 8px;
    max-height: 330px;
    overflow-y: auto;
}

.round-log div {
    padding: 9px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.055);
    color: var(--text-muted);
    font-size: 12px;
}

.round-log div span {
    display: block;
    color: rgba(244, 241, 234, 0.42);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.round-log div strong {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.result-overlay {
    position: absolute;
    inset: 18px;
    z-index: 5;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(16px);
}

.result-overlay[hidden] {
    display: none;
}

.result-overlay strong {
    font-size: clamp(28px, 5vw, 54px);
}

.inline-game-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inline-game-input input {
    width: 76px;
}

.lobby-seats {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
}

.lobby-seat.empty {
    border-style: dashed;
}

.lobby-actions {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.52);
}

.lobby-actions input {
    min-width: min(220px, 100%);
}

.lobby-summary {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.lobby-summary article {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.055);
}

.lobby-summary article.success { color: var(--success); }
.lobby-summary article.danger { color: var(--danger); }

.game-countdown-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.38);
    backdrop-filter: blur(4px);
}

.game-countdown-value {
    font-size: clamp(64px, 14vw, 160px);
    font-weight: 950;
    color: var(--text);
    text-shadow: none;
}

.game-countdown-value.pulse {
    animation: countdownPulse 0.56s ease both;
}

.reward-burst {
    position: absolute;
    z-index: 30;
    top: 38%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(28px, 6vw, 64px);
    font-weight: 950;
    color: var(--success);
    text-shadow: none;
    animation: rewardFloat 1.25s ease forwards;
    pointer-events: none;
}

.loss-shake {
    animation: loseShake 0.42s ease both;
}

.glow-win {
    box-shadow: 0 0 100px rgba(74, 222, 128, 0.2);
}

.glow-draw {
    box-shadow: 0 0 50px rgba(148, 163, 184, 0.2);
}

.glow-jackpot {
    box-shadow: 0 0 150px rgba(251, 191, 36, 0.4), inset 0 0 50px rgba(251, 191, 36, 0.2);
    animation: jackpotPulse 1.5s infinite;
}

@keyframes jackpotPulse {
    0%, 100% { box-shadow: 0 0 150px rgba(251, 191, 36, 0.4), inset 0 0 50px rgba(251, 191, 36, 0.2); }
    50% { box-shadow: 0 0 250px rgba(251, 191, 36, 0.6), inset 0 0 100px rgba(251, 191, 36, 0.4); }
}

.game-room.jackpot-won .game-room-overlay {
    background: radial-gradient(circle at 50% 50%, rgba(251,191,36,0.3) 0%, rgba(5,5,8,0.95) 100%);
    animation: jackpotBackground 2s ease-out forwards;
}

@keyframes jackpotBackground {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.win-text { color: var(--text-success, #4ade80); }
.loss-text { color: var(--text-danger, #ef4444); }

.coin-flip-running .coinflip-idle,
.roulette-spin-running .roulette-wheel,
.slot-roll-running .slots-reels span,
.vault-open-running .vault-door,
.number-reveal-running .number-grid span,
.card-flip-running .blackjack-board img,
.card-flip-running .rps-vs span {
    animation-duration: 0.36s;
    animation-iteration-count: infinite;
}

.vault-open-running .vault-door {
    animation-name: loseShake;
}

.number-reveal-running .number-grid span {
    animation-name: slotPulse;
}

@keyframes countdownPulse {
    from { transform: scale(0.62); opacity: 0; }
    45% { transform: scale(1.08); opacity: 1; }
    to { transform: scale(0.96); opacity: 0.22; }
}

@keyframes rewardFloat {
    from { opacity: 0; transform: translate(-50%, 20px) scale(0.8); }
    20% { opacity: 1; }
    to { opacity: 0; transform: translate(-50%, -80px) scale(1.08); }
}

/* ==================== LEADERBOARDS ==================== */
.tabs-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.tab-btn {
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.34);
    color: var(--text-muted);
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--text);
    color: #000;
}

.leaderboard-board {
    display: none;
}

.leaderboard-board.active {
    display: grid;
    gap: 16px;
}

.top-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.top-card {
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(0,0,0,0.46));
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
        "rank value"
        "avatar name"
        "avatar meta";
    column-gap: 12px;
    row-gap: 4px;
    align-content: space-between;
    cursor: pointer;
}

.top-card span {
    grid-area: rank;
    color: var(--red);
    font-weight: 950;
}

.top-card img {
    grid-area: avatar;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-strong);
}

.top-card strong {
    grid-area: name;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-card small {
    grid-area: meta;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-card b {
    grid-area: value;
    justify-self: end;
    font-size: 22px;
}

.top-card.is-me,
.leaderboard-me {
    outline: 1px solid rgba(180,22,42,0.7);
    background: rgba(180,22,42,0.12);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table.rich {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(0,0,0,0.36);
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    color: var(--text-muted);
    font-size: 13px;
}

.leaderboard-table th {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.leaderboard-table td:last-child {
    color: var(--text);
    font-weight: 900;
}

.leaderboard-user {
    display: inline-grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.leaderboard-user img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.leaderboard-user strong,
.leaderboard-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-user strong {
    color: var(--text);
}

.leaderboard-user small {
    color: var(--text-muted);
    font-size: 12px;
}

/* ==================== ADMIN ==================== */
.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 16px;
}

.admin-form {
    display: grid;
    gap: 10px;
}

.admin-form textarea {
    min-height: 96px;
    resize: vertical;
}

.amount-preview {
    min-height: 18px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.amount-preview.invalid {
    color: var(--danger);
}

.field-invalid {
    border-color: var(--danger) !important;
}

.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.admin-sections span {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-weight: 800;
}

/* ==================== PERSONAL ROLES ==================== */
.role-page {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.role-create-card {
    text-align: center;
    padding: 34px 24px;
}

.role-create-card p {
    max-width: 560px;
    margin: 12px auto 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.role-create-card p strong {
    color: var(--accent-hover);
}

.role-create-form {
    margin: 24px auto 0;
    display: grid;
    gap: 12px;
    max-width: 360px;
}

.role-preview-chip {
    --role-color: #b4162a;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--role-color), white 12%);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    box-shadow: none;
}

.role-preview-chip span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--role-color);
    box-shadow: none;
}

.role-preview-chip strong {
    color: var(--role-color);
    overflow-wrap: anywhere;
}

.hex-picker-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
}

.hex-picker-row input[type="color"] {
    width: 58px;
    height: 44px;
    padding: 3px;
    cursor: pointer;
}

.role-form-result {
    min-height: 20px;
    margin-top: 12px;
    font-size: 13px;
}

.role-invite-row > span {
    color: var(--role-color);
}

.role-control-panel {
    --role-color: var(--accent);
    display: grid;
    gap: 18px;
}

.role-hero-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.role-color-orb {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--role-color), white 20%);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--role-color), white 14%), var(--role-color));
}

.role-hero-row h3 {
    color: var(--role-color);
    overflow-wrap: anywhere;
}

.role-hero-row p {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.role-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.role-panel-actions {
    margin-top: 0;
}

.role-page .activity-row strong,
.role-page .activity-row small {
    overflow-wrap: anywhere;
}

.role-page .activity-row {
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1fr) minmax(150px, .8fr) auto auto;
}

.role-page .activity-row .btn {
    width: auto;
    min-width: 112px;
}

.contracts-page {
    display: grid;
    gap: 14px;
}

.contract-empty-state {
    text-align: center;
    padding: 42px 24px;
}

.contract-empty-state p {
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.6;
}

.log-table {
    display: grid;
    grid-template-columns: minmax(110px, 160px) minmax(120px, 1fr) minmax(90px, 150px) minmax(180px, 2fr);
    gap: 0;
    overflow-x: auto;
}

.log-table > div {
    min-height: 44px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 12px;
}

.log-table .log-head {
    color: var(--text);
    font-weight: 900;
    background: rgba(255,255,255,0.05);
}

.log-table small {
    display: block;
    margin-top: 3px;
    color: var(--text-soft);
}

.logs-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.log-summary-grid .core-panel strong {
    display: block;
    margin: 8px 0 3px;
    font-size: 22px;
}

.log-timeline {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.log-event {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.035);
}

.log-event-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-weight: 950;
    font-size: 12px;
    background: rgba(255,255,255,.055);
}

.log-kind-admin .log-event-mark {
    border-color: rgba(180, 22, 42, .5);
    color: #ff8a9a;
}

.log-kind-ledger .log-event-mark {
    border-color: rgba(143, 199, 255, .45);
    color: #8fc7ff;
}

.log-event-body {
    min-width: 0;
}

.log-event-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.log-event-head h3 {
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.25;
}

.log-event-head strong {
    white-space: nowrap;
    font-size: 15px;
}

.log-event-head strong.positive {
    color: #b7f7c1;
}

.log-event-head strong.negative {
    color: #ff98a5;
}

.log-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 7px 12px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.log-event-body p {
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.log-details {
    margin-top: 10px;
}

.log-details summary {
    cursor: pointer;
    color: var(--text-soft);
    font-size: 12px;
}

.log-details pre {
    margin-top: 8px;
    max-height: 220px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: rgba(0,0,0,.22);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

@keyframes coinIdle {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-8px) rotateY(25deg); }
}

@media (max-width: 760px) {
    .top-three { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .log-table { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
    .market-hero,
    .games-hero,
    .inventory-layout,
    .games-dashboard-layout,
    .game-room-grid,
    .bet-panel,
    .game-invite-panel,
    .rich-game-header,
    .game-room-layout,
    .lobby-layout,
    .games-bottom-grid {
        grid-template-columns: 1fr;
    }
    .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lobby-seats { grid-template-columns: 1fr; }
    .game-room-head {
        grid-template-columns: 1fr;
    }
    .inventory-toolbar,
    .games-metrics {
        grid-template-columns: 1fr;
    }
    .inventory-preview,
    .games-side {
        position: static;
    }
}

@keyframes coinFlip {
    to { transform: rotateY(360deg) translateY(-10px); }
}

@keyframes cardDeal {
    from { transform: translateY(-26px) rotate(-8deg); opacity: 0; }
    to { transform: translateY(0) rotate(0); opacity: 1; }
}

@keyframes rollingNumber {
    50% { transform: translateY(-6px); color: var(--red); }
}

@keyframes scanLine {
    0% { transform: translateY(-36px); opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { transform: translateY(36px); opacity: 0; }
}

@keyframes loseShake {
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes rouletteSpin {
    to { transform: rotate(360deg); }
}

@keyframes rouletteStop {
    from { transform: rotate(0deg); }
    to { transform: rotate(var(--roulette-stop, 1440deg)); }
}

@keyframes slotPulse {
    50% { transform: translateY(-8px); filter: brightness(1.35); }
}

@keyframes revealPop {
    0% { transform: scale(.72) translateY(12px); filter: brightness(.75); }
    60% { transform: scale(1.08) translateY(-6px); filter: brightness(1.35); }
    100% { transform: scale(1) translateY(0); filter: brightness(1); }
}

/* ==================== 2026 FRONTEND REDESIGN OVERRIDES ==================== */
.page-animated,
.home-page,
.passport-page,
.market-page,
.games-hub-page,
.logs-page,
.admin-page {
    max-width: 1540px;
    margin: 0 auto;
}

.core-panel,
.card,
.stat-box,
.market-product,
.inventory-card,
.inventory-preview,
.contract-catalog-card,
.game-arena,
.quick-match-panel,
.featured-game,
.active-lobby-card,
.player-stats-panel,
.lobby-summary,
.players-panel,
.round-log-panel,
.game-board-panel,
.lobby-seats,
.lobby-actions,
.log-event,
.top-card,
.leaderboard-table.rich {
    background: var(--surface-glass);
    border-color: var(--border);
    box-shadow: none;
    backdrop-filter: none;
}

.core-panel:hover,
.market-product:hover,
.inventory-card:hover,
.contract-catalog-card:hover,
.active-lobby-card:hover,
.game-arena:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.page-heading {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}

.page-heading h2,
.market-hero h2,
.games-hero h2,
.game-room-head h2 {
    line-height: 1.05;
}

.page-heading h2::after,
.market-hero h2::after,
.games-hero h2::after,
.game-room-head h2::after {
    display: none;
}

.eyebrow,
.panel-title,
.appearance-group-title,
.contract-type-badge,
.welcome-greeting,
.welcome-rank {
    letter-spacing: 0.14em;
}

.panel-title {
    color: var(--cream);
    font-size: 12px;
    margin-bottom: 12px;
}

.home-page {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.home-welcome {
    grid-column: 1 / -1;
    min-height: 232px;
    border-color: var(--border);
    background:
        linear-gradient(90deg, rgba(5,5,6,0.94) 0%, rgba(5,5,6,0.74) 48%, rgba(5,5,6,0.24) 100%),
        url('../images/ryodan-banner.jpg') center / cover no-repeat;
}

.welcome-name {
    font-size: clamp(32px, 4vw, 54px);
    letter-spacing: 0;
}

.welcome-stats {
    background: rgba(5,5,6,0.72);
    border-color: var(--border);
}

.home-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-action-card {
    min-height: 140px;
    border-left: 2px solid transparent;
}

.home-action-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    border-left-color: var(--accent);
}

.home-lore,
.home-invite-center,
.notification-center {
    margin: 0;
}

.home-lore {
    border-left-color: var(--accent);
}

.home-invite-center,
.notification-center {
    grid-column: 2;
}

.notification-card {
    border-radius: var(--radius-sm);
    grid-template-columns: 42px minmax(0, 1fr) auto;
}

.notification-card.unread {
    border-color: rgba(180,22,42,0.5);
    background: rgba(180,22,42,0.09);
}

.notification-mark,
.action-icon,
.stat-icon,
.empty-mark,
.log-event-mark {
    background: rgba(244,241,234,0.04);
    border-color: var(--border);
}

.passport-page::before {
    opacity: .22;
    filter: saturate(.75);
}



.profile-avatar,
.profile-hero .profile-avatar,
.profile-badge-mask,
.logo-icon,
#topbar-avatar {
    border-radius: 8px;
}

.profile-hero-main h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.rank-journey {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
}

.rank-step {
    background: rgba(244,241,234,0.035);
}

.rank-step.current {
    border-color: var(--accent);
    background: rgba(180,22,42,0.14);
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-box {
    text-align: left;
    padding: 16px;
}

.stat-box:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.appearance-items,
.profile-cosmetics-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.appearance-item,
.profile-cosmetic,
.appearance-form {
    background: rgba(244,241,234,0.035);
    border-radius: var(--radius-sm);
}

.activity-row,
.proposal-row {
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr) auto;
    border-color: var(--border-soft);
    background: rgba(244,241,234,0.03);
}

.activity-row strong,
.proposal-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tabs-scroll {
    padding-bottom: 6px;
}

.tab-btn,
.game-mode-switch button,
.segmented button {
    border-radius: 7px;
    font-size: 12px;
}

.tab-btn.active,
.game-mode-switch button.active {
    background: var(--cream);
    color: var(--ink);
    border-color: var(--cream);
}

.segmented button.active {
    background: var(--cream);
    color: var(--ink);
}

.market-hero,
.games-hero {
    min-height: 210px;
    padding: 28px;
    border-color: var(--border);
    background:
        linear-gradient(90deg, rgba(5,5,6,.92), rgba(5,5,6,.62) 55%, rgba(5,5,6,.24)),
        url('../images/ryodan-banner.jpg') center / cover no-repeat;
}

.hero-wallet,
.market-wallet {
    background: rgba(5,5,6,0.78);
    border-color: var(--border);
}

.market-products,
.contract-catalog-grid,
.contracts-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.market-product {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 188px;
    padding: 14px;
    border-radius: var(--radius-sm);
}

.product-preview {
    width: 82px;
    height: 82px;
    background: #090a0c;
}

.market-product .btn {
    min-width: 0;
}

.product-body h3,
.contract-catalog-card h3,
.contract-card h3 {
    line-height: 1.2;
}

.product-meta span,
.featured-stats span,
.game-mode-tags span,
.game-status {
    border-radius: 6px;
    background: rgba(244,241,234,0.035);
}

.contract-board-head,
.market-listing-head,
.notification-head {
    align-items: flex-start;
}

.contract-catalog-card,
.contract-card {
    min-height: 250px;
    border-radius: var(--radius-sm);
}

.contract-catalog-card.locked {
    opacity: .74;
}

.inventory-layout,
.games-dashboard-layout {
    gap: 14px;
}

.inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.inventory-card {
    min-height: 178px;
    border-radius: var(--radius-sm);
}

.inventory-preview {
    top: 14px;
    border-radius: var(--radius-sm);
}

.games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.game-lobby-card,
.game-room,
.featured-game,
.game-board-panel,
.game-arena {
    border-radius: var(--radius-sm);
}

.game-card-shade,
.game-room-overlay {
    background: linear-gradient(180deg, rgba(5,5,6,0.16), rgba(5,5,6,0.9));
}

.game-room {
    min-height: min(760px, calc(100vh - 118px));
}

.game-room-content {
    padding: 18px;
}

.game-room-layout {
    grid-template-columns: 230px minmax(0, 1fr) 280px;
}

.player-seat,
.lobby-seat,
.game-info-panel div,
.round-log div,
.player-stats-grid div,
.games-metrics div,
.room-grid div,
.preview-facts div {
    background: rgba(244,241,234,0.035);
}

.leaderboard-table.rich,
.leaderboard-table {
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px 14px;
}

.top-three {
    gap: 12px;
}

.top-card {
    border-radius: var(--radius-sm);
}

.admin-grid {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 14px;
}

.admin-form {
    min-width: 0;
}

.admin-list-tools {
    grid-template-columns: minmax(0, 1fr) auto;
}

.logs-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.log-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.log-event {
    border-radius: var(--radius-sm);
}

.log-event-head strong {
    color: var(--text);
}

.market-preview-dialog,
.case-opening-box {
    background: #0c0d10;
    border-radius: var(--radius-sm);
}

.market-preview-art {
    background: #07080a;
    border-radius: var(--radius-sm);
}

.price {
    border-radius: 6px;
    color: var(--cream);
    border-color: rgba(180,22,42,0.48);
    background: rgba(180,22,42,0.16);
}

.rarity-rare { border-color: rgba(112, 159, 218, 0.42); }
.rarity-epic { border-color: rgba(172, 121, 214, 0.46); }
.rarity-mythic { border-color: rgba(224, 58, 79, 0.5); }
.rarity-legendary { border-color: rgba(209, 166, 66, 0.6); }

@media (max-width: 1240px) {
    .home-page { grid-template-columns: 1fr; }
    .home-invite-center,
    .notification-center { grid-column: auto; }
    .home-actions-grid,
    .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .game-room-layout,
    .rich-game-header { grid-template-columns: 1fr; }
    .games-bottom-grid,
    .games-dashboard-layout,
    .inventory-layout { grid-template-columns: 1fr; }
    .inventory-preview,
    .games-side { position: static; }
    .log-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .page-animated,
    .home-page,
    .passport-page,
    .market-page,
    .games-hub-page,
    .logs-page,
    .admin-page,
    .profile-hero,
    .market-hero,
    .games-hero,
    .core-panel,
    .card {
        max-width: 100%;
        min-width: 0;
    }
    .passport-page,
    .market-page,
    .games-hub-page,
    .logs-page,
    .admin-page {
        overflow-x: hidden;
    }
    .home-actions-grid,
    .games-grid,
    .market-products,
    .contract-catalog-grid,
    .contracts-grid,
    .log-summary-grid { grid-template-columns: 1fr; }
    .home-welcome,
    .market-hero,
    .games-hero,
    .profile-hero { padding: 20px; }
    .profile-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .profile-avatar-wrap,
    .profile-hero .profile-avatar {
        width: 86px;
        height: 86px;
    }
    .market-product {
        grid-template-columns: 68px minmax(0, 1fr);
    }
    .product-preview {
        width: 68px;
        height: 68px;
    }
    .activity-row,
    .proposal-row,
    .appearance-item,
    .profile-cosmetic,
    .notification-card,
    .log-event {
        grid-template-columns: 1fr;
    }
    .notification-card .btn,
    .activity-row .btn,
    .proposal-row .btn {
        width: 100%;
    }
    .market-preview-detail {
        grid-template-columns: 1fr;
    }
    .market-preview-art {
        min-height: 220px;
    }
}

/* ==================== CONCEPT-MATCH DASHBOARD HOME ==================== */
.dashboard-home {
    max-width: 1560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 16px;
    align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.dashboard-passport-hero,
.dashboard-stat-strip,
.dashboard-panel,
.dashboard-side-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(10, 11, 13, 0.82);
    box-shadow: none;
}

.dashboard-passport-hero {
    min-height: 440px;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr) 220px;
    align-items: end;
    gap: 24px;
    padding: 40px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(90deg, rgba(5,5,6,0.96) 0%, rgba(5,5,6,0.6) 50%, rgba(5,5,6,0.1) 100%) center / cover no-repeat padding-box padding-box,
        var(--dashboard-banner, url('../images/ryodan-banner.jpg')) center / cover no-repeat padding-box padding-box;
    box-shadow: inset 0 0 120px rgba(0,0,0,0.6);
}

.dashboard-passport-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent 46%);
}

.dashboard-avatar-stack {
    position: relative;
    width: 128px;
    height: 128px;
}

.dashboard-avatar,
.dashboard-badge {
    object-fit: cover;
    border: 1px solid var(--border-strong);
    background: #050506;
}

.dashboard-avatar {
    width: 128px;
    height: 128px;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 20px rgba(255,255,255,0.1);
}

.dashboard-badge {
    position: absolute;
    right: -18px;
    bottom: -12px;
    width: 56px;
    height: 56px;
    border-radius: 8px;
}

.dashboard-passport-main {
    min-width: 0;
}

.dashboard-passport-main h1 {
    font-size: clamp(34px, 4.4vw, 52px);
    line-height: .98;
    margin: 6px 0 8px;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    letter-spacing: -0.02em;
}

.dashboard-passport-main p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 850;
    margin-bottom: 12px;
}

.dashboard-passport-main small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
}

.dashboard-xp-line,
.dashboard-mini-progress {
    overflow: hidden;
    background: rgba(244,241,234,.09);
}

.dashboard-xp-line {
    height: 6px;
    max-width: 560px;
    border-radius: 99px;
}

.dashboard-xp-line span,
.dashboard-mini-progress span {
    display: block;
    height: 100%;
    background: var(--accent);
}

.dashboard-wallet-card {
    display: grid;
    gap: 6px;
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dashboard-wallet-card span {
    color: var(--text-muted);
    font-size: 11px;
}

.dashboard-wallet-card strong {
    font-size: 20px;
}

.dashboard-wallet-card b {
    color: var(--accent);
    font-size: 11px;
}

.dashboard-stat-strip {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    overflow: hidden;
}

.dashboard-stat-strip div {
    min-height: 78px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 10px;
    border-right: 1px solid var(--border-soft);
}

.dashboard-stat-strip div:last-child {
    border-right: 0;
}

.dashboard-stat-strip span {
    color: var(--accent);
    font-weight: 950;
}

.dashboard-stat-strip strong {
    font-size: 18px;
    line-height: 1;
}

.dashboard-stat-strip small {
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

.dashboard-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 14px;
}

.dashboard-panel,
.dashboard-side-panel {
    padding: 18px;
}

.dashboard-panel > header,
.dashboard-side-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-panel h3,
.dashboard-side-panel h3 {
    font-size: 18px;
}

.dashboard-task-list,
.dashboard-game-list,
.dashboard-notification-list {
    display: grid;
    gap: 8px;
}

.dashboard-task-row,
.dashboard-game-row,
.dashboard-notification,
.dashboard-family-card {
    min-width: 0;
    display: grid;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(244,241,234,.025);
}

.dashboard-task-row {
    grid-template-columns: 46px minmax(0, 1fr) auto auto;
}

.dashboard-game-row {
    grid-template-columns: 46px minmax(0, 1fr) 46px 42px;
}

.dashboard-notification {
    grid-template-columns: 38px minmax(0, 1fr) auto 8px;
    cursor: pointer;
}

.dashboard-notification:not(.unread) {
    grid-template-columns: 38px minmax(0, 1fr) auto;
}

.dashboard-row-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    background: rgba(244,241,234,.035);
}

.dashboard-task-row strong,
.dashboard-game-row strong,
.dashboard-notification strong,
.dashboard-family-card strong {
    display: block;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-task-row small,
.dashboard-game-row small,
.dashboard-notification small,
.dashboard-family-card small,
.dashboard-panel-note {
    color: var(--text-muted);
    font-size: 11px;
}

.dashboard-task-row > span,
.dashboard-game-row > span {
    color: var(--text-muted);
    font-size: 12px;
    text-align: right;
}

.dashboard-task-row > span {
    grid-column: 3;
    grid-row: 1;
}

.dashboard-task-row b {
    grid-column: 3;
    grid-row: 2;
    color: var(--cream);
    font-size: 12px;
    text-align: right;
}

.dashboard-task-row .btn {
    grid-column: 4;
    grid-row: 1 / span 2;
}

.dashboard-mini-progress {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    margin-top: 8px;
}

.dashboard-panel-note {
    display: block;
    margin-top: 14px;
}

.dashboard-play-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(180,22,42,.5);
    border-radius: 8px;
    background: rgba(180,22,42,.18);
    color: var(--accent-hover);
    cursor: pointer;
}

.dashboard-side-column {
    position: sticky;
    top: 0;
}

.dashboard-side-panel {
    background: rgba(8,9,11,.9);
}

.text-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

.text-btn:hover {
    color: var(--text);
}

.dashboard-notification {
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    padding: 11px 0;
}

.dashboard-notification time {
    color: var(--text-soft);
    font-size: 10px;
    white-space: nowrap;
}

.notification-scope {
    display: block;
    margin-bottom: 2px;
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notification-hit {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    background: var(--danger);
    cursor: pointer;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-quick-action {
    min-height: 74px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(244,241,234,.025);
    color: var(--text);
    cursor: pointer;
}

.dashboard-quick-action:hover {
    border-color: var(--border-strong);
    background: rgba(244,241,234,.055);
}

.dashboard-quick-action .nav-icon {
    width: 26px;
    height: 26px;
}

.dashboard-quick-action strong {
    font-size: 11px;
    color: var(--text-muted);
}

.dashboard-family-card {
    grid-template-columns: 48px minmax(0, 1fr);
}

.dashboard-family-card img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

@media (max-width: 1280px) {
    .dashboard-home {
        grid-template-columns: 1fr;
    }
    .dashboard-side-column {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .dashboard-passport-hero,
    .dashboard-lower-grid,
    .dashboard-side-column {
        grid-template-columns: 1fr;
    }
    .dashboard-stat-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-home {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    .dashboard-passport-hero {
        min-height: 0;
        padding: 20px;
    }
    .dashboard-avatar-stack,
    .dashboard-avatar {
        width: 88px;
        height: 88px;
    }
    .dashboard-wallet-card { grid-template-columns: 1fr; }
    .dashboard-stat-strip { grid-template-columns: 1fr; }
    .dashboard-task-row,
    .dashboard-game-row,
    .dashboard-notification,
    .dashboard-notification:not(.unread) {
        grid-template-columns: 40px minmax(0, 1fr);
    }
    .dashboard-task-row > span,
    .dashboard-task-row b,
    .dashboard-task-row .btn,
    .dashboard-game-row > span,
    .dashboard-game-row .dashboard-play-btn,
    .dashboard-notification time,
    .notification-hit {
        grid-column: 2;
        justify-self: start;
    }
    .dashboard-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==================== MARKET ==================== */
.market-hero,
.games-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
    gap: 20px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(115deg, rgba(0,0,0,0.88), rgba(0,0,0,0.42)),
        url('../images/ryodan-banner.jpg') center / cover no-repeat;
    margin-bottom: 18px;
}

.market-hero h2,
.games-hero h2 {
    margin-bottom: 8px;
}

.market-product {
    position: relative;
}

.market-listing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.market-pager.compact {
    margin: 0;
}

.market-preview-btn {
    margin-top: 8px;
}

.market-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 12px 0 16px;
    color: var(--text-muted);
    font-size: 12px;
}

.market-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0,0,0,.76);
    backdrop-filter: blur(14px);
}

.market-preview-modal[hidden] {
    display: none;
}

.market-preview-dialog {
    width: min(920px, 100%);
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(8,8,10,.96);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    max-height: 90vh;
}

.market-preview-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 2;
}

.market-preview-detail {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 22px;
    padding: 26px;
}

.market-preview-art {
    min-height: 330px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,.55);
}

.market-preview-art img {
    max-width: 100%;
    max-height: 330px;
    object-fit: contain;
}

.market-preview-art span {
    font-size: 48px;
    font-weight: 950;
}

.market-preview-info {
    display: grid;
    align-content: center;
    gap: 14px;
}

.market-preview-info p {
    color: var(--text-muted);
    line-height: 1.6;
}

.proposal-form-grid {
    margin-top: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.proposal-form-grid textarea,
.proposal-form-grid button {
    grid-column: 1 / -1;
}

.proposal-check {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    background: rgba(255,255,255,.025);
}

.proposal-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--text);
}

.contract-proof-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.contract-proof-form textarea {
    min-height: 76px;
    resize: vertical;
}

.contract-proof-note {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.45;
}

.contract-board {
    margin-top: 22px;
}

.contract-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.contract-board-head small {
    color: var(--text-muted);
}

.contract-pager {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.contract-tabs {
    margin-bottom: 16px;
}

.contract-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.contract-catalog-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 244px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.035);
}

.contract-catalog-card.locked {
    opacity: .66;
    background: repeating-linear-gradient(
        135deg,
        rgba(255,255,255,.03),
        rgba(255,255,255,.03) 10px,
        rgba(0,0,0,.12) 10px,
        rgba(0,0,0,.12) 20px
    );
}

.contract-catalog-card h3 {
    font-size: 17px;
    line-height: 1.25;
}

.contract-catalog-card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
    flex: 1;
}

.admin-mini-preview {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255,255,255,.05);
}

.proof-row small {
    max-width: 360px;
    white-space: normal;
    line-height: 1.35;
}

.admin-list-tools {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 10px 0 14px;
}

.admin-list-tools input {
    min-height: 38px;
}

.market-proposal-panel,
.contract-proposal-panel,
.game-room-lobbies {
    margin-top: 18px;
}

.market-hero p,
.games-hero p {
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 620px;
}

.market-balance-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 14px;
}

.market-wallet {
    margin-left: auto;
}

.market-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.market-product {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(5,6,7,0.76);
}

.market-product .btn {
    grid-column: 1 / -1;
}

.product-preview,
.preview-icon {
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    font-weight: 950;
}

.product-preview {
    width: 72px;
    height: 72px;
    overflow: hidden;
}

.product-preview img,
.preview-icon img,
.inventory-card .item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-body p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 13px;
    margin: 8px 0 12px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-meta span {
    padding: 5px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
}

.rarity-rare { border-color: rgba(74,158,255,0.42); }
.rarity-epic { border-color: rgba(180,74,255,0.46); }
.rarity-mythic { border-color: rgba(255,70,112,0.5); }
.rarity-legendary { border-color: rgba(255,167,68,0.6); box-shadow: none; }

/* ==================== INVENTORY ==================== */
.inventory-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 10px;
    margin-bottom: 12px;
}

.inventory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.inventory-card {
    min-height: 176px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(5,6,7,0.74);
    color: var(--text);
    text-align: left;
    display: grid;
    gap: 7px;
    cursor: pointer;
}

.inventory-card:hover,
.inventory-card.selected {
    border-color: rgba(255,255,255,0.36);
    background: rgba(255,255,255,0.07);
}

.inventory-card.equipped {
    outline: 1px solid rgba(103,166,92,0.7);
}

.inventory-card .item-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-weight: 950;
    overflow: hidden;
}

.inventory-card small,
.inventory-card span {
    color: var(--text-muted);
    font-size: 11px;
}

.inventory-card b,
.inventory-card em {
    font-size: 12px;
    font-style: normal;
}

.inventory-preview {
    position: sticky;
    top: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(5,6,7,0.82);
}

.inventory-preview.empty {
    text-align: center;
}

.preview-icon {
    width: 74px;
    height: 74px;
    margin-bottom: 14px;
    overflow: hidden;
}

.inventory-preview p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 10px 0 14px;
}

.preview-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.preview-facts div {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.035);
}

.preview-facts span {
    color: var(--text-muted);
    font-size: 11px;
}

.item-card { display: flex; flex-direction: column; gap: 12px; }

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.item-card h3 { font-size: 16px; color: var(--text); }
.item-card p { color: var(--text-muted); font-size: 13px; line-height: 1.5; flex: 1; }

.item-rarity { display: block; margin-top: 2px; }

.price {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==================== GAMES ==================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(15, 15, 20, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s;
}

.game-card:hover:not(.game-card-disabled) {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    background: rgba(25, 25, 32, 0.7);
}
.game-card-disabled { opacity: 0.5; }

.game-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-icon,
.coin-side {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
}

.game-icon.game-symbol {
    width: 42px;
    height: 42px;
    font-size: 20px;
}

.game-room-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.game-room-mark {
    width: 38px;
    height: 38px;
    font-size: 18px;
    flex: 0 0 auto;
}

.coin-side {
    width: 20px;
    height: 20px;
    font-size: 10px;
}
.game-header h3 { font-size: 18px; flex: 1; }

.wip-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--warning);
    border: 1px solid var(--warning);
    border-radius: 4px;
    padding: 2px 6px;
}

.coinflip-inputs { display: flex; gap: 10px; }
.coinflip-inputs input { flex: 1; }

.coinflip-buttons { display: flex; gap: 10px; }
.coinflip-buttons .btn { flex: 1; }
.coin-side { font-size: 16px; }

.game-result {
    min-height: 24px;
    font-weight: 700;
    text-align: center;
    font-size: 14px;
    transition: color 0.3s;
}

/* ==================== LEADERBOARD ==================== */
.leaderboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.leaderboard-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-table tr:hover td { background: rgba(255,255,255,0.02); }
.leaderboard-rank { font-weight: 900; width: 60px; font-size: 18px; }
.leaderboard-me td { background: var(--accent-soft) !important; }

.case-opening-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(14px);
}

.case-opening-box {
    width: min(360px, calc(100vw - 32px));
    display: grid;
    gap: 14px;
    place-items: center;
    padding: 28px;
    
    border-radius: var(--radius-lg);
    background: rgba(14,14,16,.96);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.case-opening-card {
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    
    background: rgba(255,255,255,.06);
    animation: caseShake 1.05s infinite;
}

.case-opening-card img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.case-opening-card.reward {
    animation: caseReveal .5s ease-out both;
    background: rgba(255,255,255,.12);
}

.case-opening-card.reward span {
    font-size: 24px;
    font-weight: 950;
}

.case-opening-box strong {
    font-size: 22px;
}

.case-opening-box small {
    color: var(--text-muted);
}

@keyframes caseShake {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    20% { transform: translateY(-5px) rotate(-3deg); }
    45% { transform: translateY(4px) rotate(3deg); }
    70% { transform: translateY(-2px) rotate(-1deg); }
}

@keyframes caseReveal {
    from { transform: scale(.72); opacity: .4; }
    to { transform: scale(1); opacity: 1; }
}

/* ==================== LOVE PAGE ==================== */
.love-page, .roles-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .page-grid, .contracts-grid, .games-grid, .leaderboards-grid, .home-actions-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .welcome-stats { flex-wrap: wrap; gap: 16px; }
    .passport-actions { justify-content: flex-start; width: 100%; }
    .profile-view-form { grid-template-columns: 1fr; width: 100%; }
    .profile-hero { grid-template-columns: 1fr; min-height: 260px; }
    .hero-wallet { max-width: 100%; }
    .appearance-grid { grid-template-columns: 1fr; }
    .admin-list-tools { grid-template-columns: 1fr; }
    .market-pager,
    .contract-pager { justify-content: flex-start; flex-wrap: wrap; }
}

/* ==================== REDESIGN FINAL LOCK ==================== */
.core-panel,
.card,
.market-product,
.inventory-card,
.inventory-preview,
.contract-catalog-card,
.game-arena,
.quick-match-panel,
.featured-game,
.active-lobby-card,
.player-stats-panel,
.lobby-summary,
.players-panel,
.round-log-panel,
.game-board-panel,
.lobby-seats,
.lobby-actions,
.log-event,
.top-card,
.case-opening-box {
    background: var(--surface-glass);
    border-color: var(--border);
    box-shadow: none;
    backdrop-filter: none;
}

.home-page,
.passport-page,
.market-page,
.games-hub-page,
.logs-page,
.admin-page {
    max-width: 1540px;
    margin: 0 auto;
}

.home-page {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
    gap: 18px;
    align-items: start;
}

.home-welcome {
    grid-column: 1 / -1;
    min-height: 232px;
    background:
        linear-gradient(90deg, rgba(5,5,6,0.94) 0%, rgba(5,5,6,0.74) 48%, rgba(5,5,6,0.24) 100%),
        url('../images/ryodan-banner.jpg') center / cover no-repeat;
}

.home-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-invite-center,
.notification-center {
    grid-column: 2;
    margin: 0;
}

.market-products,
.contract-catalog-grid,
.contracts-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.market-product {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 188px;
    padding: 14px;
    border-radius: var(--radius-sm);
}

.product-preview {
    width: 82px;
    height: 82px;
    background: #090a0c;
}

.market-product .btn {
    grid-column: 1 / -1;
}


.rank-journey {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
}

.rank-step.current {
    border-color: var(--accent);
    background: rgba(180,22,42,0.14);
}

.activity-row,
.proposal-row {
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr) auto;
    background: rgba(244,241,234,0.03);
}

.tab-btn.active,
.game-mode-switch button.active,
.segmented button.active {
    background: var(--cream);
    color: var(--ink);
    border-color: var(--cream);
}

.market-hero,
.games-hero {
    min-height: 210px;
    background:
        linear-gradient(90deg, rgba(5,5,6,.92), rgba(5,5,6,.62) 55%, rgba(5,5,6,.24)),
        url('../images/ryodan-banner.jpg') center / cover no-repeat;
}

.games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.game-room-layout {
    grid-template-columns: 230px minmax(0, 1fr) 280px;
}

.admin-grid {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.log-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.price {
    border-radius: 6px;
    color: var(--cream);
    border-color: rgba(180,22,42,0.48);
    background: rgba(180,22,42,0.16);
}

@media (max-width: 1240px) {
    .home-page { grid-template-columns: 1fr; }
    .home-invite-center,
    .notification-center { grid-column: auto; }
    .home-actions-grid,
    .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .game-room-layout,
    .rich-game-header,
    .games-bottom-grid,
    .games-dashboard-layout,
    .inventory-layout { grid-template-columns: 1fr; }
    .inventory-preview,
    .games-side { position: static; }
    .log-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .home-actions-grid,
    .games-grid,
    .market-products,
    .contract-catalog-grid,
    .contracts-grid,
    .log-summary-grid { grid-template-columns: 1fr; }
    .home-welcome,
    .market-hero,
    .games-hero,
    .profile-hero { padding: 20px; }
    .profile-hero { grid-template-columns: 1fr; min-height: 0; }
    .profile-avatar-wrap,
    .profile-hero .profile-avatar { width: 86px; height: 86px; }
    .stats-grid,
    .preview-facts,
    .games-metrics,
    .player-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-box,
    .market-product,
    .contract-catalog-card,
    .inventory-card,
    .rank-step,
    .hero-wallet {
        min-width: 0;
    }
    .market-product { grid-template-columns: 68px minmax(0, 1fr); }
    .product-preview { width: 68px; height: 68px; }
    .activity-row,
    .proposal-row,
    .appearance-item,
    .profile-cosmetic,
    .notification-card,
    .log-event { grid-template-columns: 1fr; }
}

/* ==================== RELEASE FRONTEND POLISH ==================== */
.page-heading,
.market-hero,
.games-hero,
.profile-toolbar,
.inventory-toolbar,
.market-pager,
.contract-board-head,
.market-listing-head {
    min-width: 0;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.page-heading h2,
.market-hero h2,
.games-hero h2 {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.05;
    margin: 0;
}

.page-heading h2::after,
.market-hero h2::after,
.games-hero h2::after {
    display: none;
}

.market-page,
.contracts-page,
.logs-page,
.admin-page,
.games-hub-page,
.passport-page,
.leaderboard-page,
.inventory-page {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
}

.market-page,
.logs-page,
.admin-page,
.games-hub-page,
.inventory-page {
    display: grid;
    gap: 14px;
}

.market-hero,
.games-hero,
.profile-hero,
.dashboard-passport-hero {
    border-radius: 8px;
}

.market-products,
.contract-catalog-grid,
.contracts-grid,
.inventory-grid,
.leaderboards-grid {
    align-items: stretch;
}

.market-product,
.contract-catalog-card,
.contract-card,
.inventory-card,
.top-card,
.core-panel,
.card {
    border-radius: 8px;
}

.market-product,
.contract-catalog-card,
.contract-card {
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.market-product:hover,
.contract-catalog-card:hover,
.contract-card:hover,
.inventory-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: rgba(244,241,234,0.055);
}

.market-product .btn,
.contract-catalog-card .btn,
.contract-card .btn {
    width: 100%;
}

.market-preview-btn {
    background: transparent;
    color: var(--text-muted);
}

.market-preview-btn:hover {
    color: var(--text);
}

.market-preview-modal {
    backdrop-filter: none;
}

.market-preview-dialog {
    width: min(980px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: auto;
}

.market-preview-close {
    min-height: 34px;
    padding-inline: 12px;
}

.market-preview-info h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
}

.contract-type-badge {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contract-icon-img {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: cover;
}

.contract-proposal-panel .activity-list,
.market-listing-panel .activity-list {
    margin-top: 12px;
}

.proposal-form-grid input,
.proposal-form-grid select,
.proposal-form-grid textarea {
    width: 100%;
}

.listing-selected-preview {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
}

.listing-selected-preview.empty {
    justify-content: center;
    border-style: dashed;
}

.listing-selected-art {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 800;
}

.listing-selected-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-selected-preview strong,
.listing-selected-preview small {
    display: block;
}

.listing-selected-preview strong {
    color: var(--text);
    margin-bottom: 4px;
}

.logs-page .page-heading {
    margin-bottom: 0;
}

.log-summary-grid {
    gap: 12px;
}

.log-event {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
}

.log-event-head,
.log-event-grid {
    min-width: 0;
}

.log-event-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.log-event p,
.log-event h3,
.market-product h3,
.contract-catalog-card h3,
.contract-card h3,
.inventory-card b {
    overflow-wrap: anywhere;
}

.leaderboard-table,
.leaderboard-table.rich {
    display: table;
    table-layout: fixed;
}

.leaderboard-table td,
.leaderboard-table th {
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabs-scroll {
    scrollbar-width: thin;
}

.empty-inline,
.empty-state {
    color: var(--text-muted);
}

.danger-text {
    color: var(--danger);
}

.error-state {
    display: grid;
    gap: 8px;
    align-content: center;
    min-height: 150px;
    text-align: center;
}

.error-state h3 {
    color: var(--danger);
}

.error-state p {
    color: var(--text-muted);
}

@media (max-width: 980px) {
    .market-hero,
    .games-hero,
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .hero-wallet,
    .market-wallet {
        width: 100%;
        margin-left: 0;
    }

    .market-products,
    .contract-catalog-grid,
    .contracts-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .market-pager,
    .contract-pager,
    .market-listing-head,
    .contract-board-head {
        align-items: stretch;
        flex-direction: column;
    }

    .market-pager .btn,
    .contract-pager .btn,
    .market-listing-head .btn,
    .contract-board-head .btn {
        width: 100%;
    }

    .market-product,
    .contract-catalog-card,
    .contract-card,
    .inventory-card {
        min-height: 0;
    }

    .market-product {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .product-preview {
        width: 56px;
        height: 56px;
    }

    .market-preview-detail {
        padding: 16px;
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .market-preview-art {
        min-height: 190px;
    }

    .dashboard-stat-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .log-event {
        grid-template-columns: 1fr;
    }

    .role-page .activity-row {
        grid-template-columns: 1fr;
    }

    .role-page .activity-row .btn {
        width: 100%;
    }
}

/* Profile Passport Hero (Full Banner Support) */
.passport-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid var(--border);
}

.passport-hero-art {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.passport-hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.passport-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 40%, transparent 100%);
    z-index: 2;
}

.passport-hero-content {
    position: relative;
    z-index: 3;
    padding: 32px;
    display: flex;
    gap: 24px;
    align-items: flex-end;
}

.passport-hero-avatar {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    overflow: hidden;
    background: var(--bg);
}

.passport-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.passport-hero-info {
    flex: 1;
}

.passport-hero-info h1 {
    font-size: 36px;
    margin: 0 0 8px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.passport-hero-info p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.xp-badge {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-row {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-row strong {
    color: var(--text);
    font-size: 14px;
}

.comment-row span {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.comment-row small {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    margin-top: 4px;
}

/* ==================== CONTRACTS REDESIGN ==================== */

.contract-empty-state {
    background: rgba(20, 20, 20, 0.5) !important;
    border: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

.contract-board, .contract-proposal-panel {
    background: rgba(14, 14, 14, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 24px !important;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.contracts-grid, .contract-catalog-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 24px !important;
    margin-top: 24px !important;
}

/* ==================== CORE GAMES MULTIPLAYER ==================== */
.game-multiplayer-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.multiplayer-invite, .multiplayer-lobbies {
    background: rgba(13, 15, 18, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.multiplayer-invite strong, .multiplayer-lobbies strong {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text);
}

.invite-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invite-inputs input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    transition: all 0.2s ease;
}

.invite-inputs input:focus {
    border-color: rgba(143, 199, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    outline: none;
}

.active-lobbies-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.mini-lobby-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.mini-lobby-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(143, 199, 255, 0.2);
}

.mini-lobby-card div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-lobby-card strong {
    font-size: 13px;
    margin: 0;
}

.mini-lobby-card small {
    color: var(--text-muted);
    font-size: 11px;
}

.player-seat.bot .player-avatar {
    background: linear-gradient(135deg, #ff3b3b, #8a0b0b);
    color: white;
    box-shadow: 0 0 15px rgba(255, 59, 59, 0.4);
    animation: pulse-bot 2s infinite ease-in-out;
}

@keyframes pulse-bot {
    0% { box-shadow: 0 0 10px rgba(255, 59, 59, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 59, 59, 0.6); }
    100% { box-shadow: 0 0 10px rgba(255, 59, 59, 0.3); }
}

/* ==================== LOBBY ROOM REDESIGN ==================== */
.lobby-seats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lobby-seat {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lobby-seat.ready {
    background: rgba(143, 199, 255, 0.08);
    border-color: rgba(143, 199, 255, 0.4);
    box-shadow: 0 0 20px rgba(143, 199, 255, 0.15);
}

.lobby-seat.ready .seat-status-indicator {
    color: #8fc7ff;
    text-shadow: 0 0 10px rgba(143, 199, 255, 0.5);
}

.lobby-seat.bot {
    background: rgba(255, 59, 59, 0.05);
    border-color: rgba(255, 59, 59, 0.2);
}

.lobby-seat .player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.1);
    margin-right: 16px;
}

.lobby-seat > div:not(.seat-status-indicator) {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lobby-seat strong {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 4px;
}

.lobby-seat small {
    color: var(--text-muted);
    font-size: 13px;
}

.seat-status-indicator {
    font-weight: 700;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.host-badge {
    color: #ffb800;
}

.contract-card, .contract-catalog-card {
    width: 100% !important;
    max-width: 360px !important;
    flex: 1 1 320px !important;
    background: rgba(20, 20, 20, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative;
    overflow: hidden;
}

.contract-card::before, .contract-catalog-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    opacity: 0.5;
}

.contract-card:hover, .contract-catalog-card:hover {
    border-color: rgba(226, 54, 54, 0.3) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(226, 54, 54, 0.1) !important;
    background: rgba(24, 24, 24, 0.8) !important;
}

.contract-card.locked, .contract-catalog-card.locked {
    opacity: 0.6 !important;
    filter: grayscale(100%);
    pointer-events: none;
}

.contract-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px !important;
    gap: 8px;
}

.contract-type-badge {
    background: rgba(226, 54, 54, 0.1) !important;
    color: #ff6b6b !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    border: 1px solid rgba(226, 54, 54, 0.2) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contract-card h3, .contract-catalog-card h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    color: #fff !important;
    letter-spacing: 0;
}

.contract-card p, .contract-catalog-card p {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
    flex: 1;
}

.contract-card .price, .contract-catalog-card .price {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--accent) !important;
    background: rgba(226, 54, 54, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Progress bar redesign */
.progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 6px !important;
    height: 8px !important;
    margin-top: 12px !important;
    overflow: hidden;
    position: relative;
    border: none !important;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #ff4747, #ff6b6b) !important;
    border-radius: 6px !important;
    box-shadow: 0 0 10px rgba(226, 54, 54, 0.5) !important;
    height: 100% !important;
    transition: width 0.5s ease-out !important;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-top: 8px !important;
    margin-bottom: 16px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Meta Tags inside cards */
.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-meta span {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
}

/* Form redesign (Create Contract) */
.proposal-form-grid input,
.proposal-form-grid textarea,
.proposal-form-grid select {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    transition: all 0.2s ease;
}

.proposal-form-grid input:focus,
.proposal-form-grid textarea:focus,
.proposal-form-grid select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(226, 54, 54, 0.2) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    outline: none;
}

.proposal-form-grid textarea {
    min-height: 100px;
    resize: vertical;
}

/* Activity Lists (History / Reports) */
.proposal-status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-row {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 16px !important;
    transition: background 0.2s;
}

.activity-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

.activity-row span:first-child {
    background: rgba(226, 54, 54, 0.1);
    color: #ff6b6b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    height: max-content;
}

.activity-row strong {
    font-size: 15px !important;
    color: #fff !important;
    flex: 1;
    min-width: 200px;
}

.activity-row small {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 13px !important;
}

/* Proof notes and rejection states */
.contract-proof-note {
    background: rgba(240, 71, 71, 0.05) !important;
    border-left: 3px solid var(--danger) !important;
    border-radius: 0 6px 6px 0 !important;
    padding: 12px 16px !important;
}

.contract-proof-note div {
    line-height: 1.5;
}

.contract-proof-form textarea {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    width: 100%;
    padding: 10px !important;
    font-size: 13px !important;
    color: #fff !important;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

.contract-proof-form textarea:focus {
    border-color: var(--accent) !important;
    outline: none;
}

/* Release UI refresh */
#page-content {
    background:
        linear-gradient(180deg, rgba(244,241,234,0.018), transparent 260px),
        transparent;
}

.core-panel,
.market-product,
.contract-catalog-card,
.contract-card,
.home-action-card,
.top-card,
.game-invite-card,
.active-lobby-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)),
        rgba(13, 15, 18, 0.84) !important;
    border: 1px solid rgba(244, 241, 234, 0.105) !important;
    border-radius: 8px !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.28) !important;
}

.core-panel:hover,
.market-product:hover,
.contract-catalog-card:hover,
.contract-card:hover,
.home-action-card:hover {
    border-color: rgba(143, 199, 255, 0.24) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.018)),
        rgba(17, 20, 24, 0.9) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,0.34) !important;
}

.market-hero,
.games-hero,
.home-welcome {
    border-radius: 8px !important;
    border: 1px solid rgba(244, 241, 234, 0.12) !important;
    background:
        linear-gradient(115deg, rgba(5, 5, 6, 0.92), rgba(14, 18, 22, 0.74)),
        url('../images/banners/ash-rain.svg') center / cover no-repeat !important;
    box-shadow: 0 20px 48px rgba(0,0,0,0.34) !important;
}

.market-hero h2,
.games-hero h2,
.home-welcome h1,
.home-welcome h2 {
    max-width: 760px;
    line-height: 1.08;
}

.tabs-scroll {
    gap: 8px !important;
    padding: 4px !important;
    border: 1px solid rgba(244, 241, 234, 0.08);
    border-radius: 8px;
    background: rgba(5, 6, 8, 0.52);
}

.tab-btn {
    min-height: 34px;
    border-radius: 6px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--text-muted) !important;
}

.tab-btn.active {
    background: rgba(143, 199, 255, 0.12) !important;
    border-color: rgba(143, 199, 255, 0.24) !important;
    color: var(--text) !important;
}

.product-preview,
.market-preview-art {
    border-radius: 8px !important;
    background:
        linear-gradient(135deg, rgba(143,199,255,0.13), rgba(180,22,42,0.10)),
        rgba(5, 6, 8, 0.72) !important;
    border: 1px solid rgba(244, 241, 234, 0.1);
}

.product-preview img,
.market-preview-art img,
.contract-icon-img {
    object-fit: cover;
}

.market-product h3,
.contract-catalog-card h3,
.contract-card h3 {
    color: var(--text) !important;
    line-height: 1.18 !important;
}

.market-product p,
.contract-catalog-card p,
.contract-card p {
    color: var(--text-muted) !important;
}

.product-meta span,
.contract-type-badge,
.eyebrow,
.panel-title {
    letter-spacing: 0 !important;
}

.product-meta span {
    border: 1px solid rgba(244, 241, 234, 0.07);
    background: rgba(244, 241, 234, 0.055) !important;
}

.contract-catalog-card.locked,
.contract-card.locked {
    filter: grayscale(.65) !important;
    opacity: .72 !important;
}

.empty-state,
.contract-empty-state {
    border-style: dashed !important;
    background:
        linear-gradient(180deg, rgba(143,199,255,0.055), rgba(255,255,255,0.012)),
        rgba(10, 12, 15, 0.76) !important;
}

.market-preview-dialog,
.app-dialog,
.notification-drawer {
    border-radius: 8px !important;
    border: 1px solid rgba(244, 241, 234, 0.14) !important;
    background: rgba(10, 12, 15, 0.96) !important;
    box-shadow: 0 24px 80px rgba(0,0,0,0.56) !important;
}

@media (max-width: 768px) {
    .market-hero,
    .games-hero,
    .home-welcome {
        min-height: 220px !important;
        padding: 22px !important;
    }

    .core-panel,
    .market-product,
    .contract-catalog-card {
        padding: 16px !important;
    }

    .tabs-scroll {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .tabs-scroll::-webkit-scrollbar {
        display: none;
    }
}

/* Recent Activity Cards */
.recent-activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.recent-activity-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    transition: background 0.2s;
}
.recent-activity-card:hover {
    background: rgba(255, 255, 255, 0.04);
}
.recent-activity-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}
.recent-activity-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}
.recent-activity-info strong {
    font-size: 14px;
    font-weight: 500;
}
.recent-activity-info small {
    font-size: 12px;
    color: var(--text-muted);
}
.recent-activity-amount {
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ==================== BENTO GRID PASSPORT ==================== */
.passport-bento {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.bento-col-main {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bento-col-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.passport-panel {
    background: rgba(16, 17, 20, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.passport-panel .panel-title {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

/* Bento Stats Grid */
.bento-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.bento-stats-grid .stat-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-fast);
}

.bento-stats-grid .stat-box:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bento-stats-grid .stat-box.primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bento-stats-grid .stat-box.primary:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.stat-icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Comment Bubbles */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-bubble {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    border-top-left-radius: 4px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-header strong {
    font-size: 14px;
    color: var(--accent);
}

.comment-header small {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-body {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    word-break: break-word;
}

/* Like Glow Button */
.btn-like-glow {
    background: linear-gradient(135deg, #ff4b4b, #b4162a);
    color: white;
    font-size: 16px;
    padding: 16px;
    border-radius: 12px;
    width: 100%;
    font-weight: 800;
    border: none;
    box-shadow: 0 8px 24px rgba(255, 75, 75, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-like-glow:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 75, 75, 0.4);
    filter: brightness(1.1);
}

.btn-like-glow:active {
    transform: translateY(0) scale(0.98);
}

/* Popularity Display */
.likes-count-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.03);
    text-align: center;
}

.likes-count-display .likes-icon {
    font-size: 32px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 12px rgba(255,0,0,0.4));
    animation: pulse-heart 2s infinite ease-in-out;
}

.likes-count-display strong {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #ff4b4b, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.likes-count-display span {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes pulse-heart {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@media (max-width: 1100px) {
    .passport-bento {
        flex-direction: column;
    }
}

.svg-icon svg {
    color: var(--accent);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.stat-box.primary .svg-icon svg {
    color: #fff;
}


/* ========================================================
   PREMIUM CORE GAMES UI/UX
   ======================================================== */

.full-game-room {
    position: relative;
    overflow: hidden;
    background: #000;
}

.full-game-room .game-room-overlay {
    background: radial-gradient(circle at 50% 50%, rgba(30,5,10,0.4) 0%, rgba(5,5,8,0.95) 100%);
    z-index: 1;
}

.full-game-room .game-room-content {
    position: relative;
    z-index: 2;
}

.rich-game-header {
    background: rgba(15, 15, 20, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.rich-game-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #f44336);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(244, 67, 54, 0.3);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.game-board-panel {
    background: rgba(20, 20, 25, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-board-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% -20%, rgba(255,255,255,0.05), transparent 60%);
    pointer-events: none;
}

.game-room.won .game-board-panel {
    border-color: rgba(76, 175, 80, 0.4) !important;
    box-shadow: 0 0 50px rgba(76, 175, 80, 0.2), inset 0 0 30px rgba(76, 175, 80, 0.1) !important;
}

.game-room.lost .game-board-panel {
    border-color: rgba(244, 67, 54, 0.4) !important;
    box-shadow: 0 0 50px rgba(244, 67, 54, 0.2), inset 0 0 30px rgba(244, 67, 54, 0.1) !important;
}

.game-action-panel {
    background: rgba(15, 15, 20, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-action-panel input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.game-action-panel input:focus {
    border-color: #f44336;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.3);
    outline: none;
}

.game-action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.game-action-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-action-buttons .btn.btn-primary {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-color: #ff5252;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.game-action-buttons .btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.6);
}

.game-action-buttons .btn:active:not(:disabled) {
    transform: translateY(1px);
}

.players-panel, .round-log-panel {
    background: rgba(15, 15, 20, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
}

/* --------------------------------------------------------
   SPECIFIC GAMES VISUALS
   -------------------------------------------------------- */

/* COINFLIP */
.coinflip-stage {
    position: relative;
    width: min(360px, 100%);
    min-height: 260px;
    perspective: 1200px;
    margin: 0 auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
    display: grid;
    place-items: center;
    gap: 14px;
}
@keyframes coinHover {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(15deg) rotateX(10deg); }
}
.coinflip-wrapper {
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: coinHover 5s ease-in-out infinite;
}
.coin-flip-running .coinflip-wrapper {
    animation: none;
}
.coinflip-coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    border-radius: 50%;
    transition: transform 0.1s;
}
.coinflip-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
    border: 12px solid #8b6508;
    box-shadow: inset 0 0 30px rgba(255,255,255,0.6), inset 0 0 10px rgba(255, 215, 0, 0.8);
    text-shadow: 0 4px 8px rgba(0,0,0,0.6);
}
.coinflip-face::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 3px dashed rgba(255, 255, 255, 0.3);
    pointer-events: none;
}
.coinflip-face.tails {
    transform: rotateY(180deg);
    background: radial-gradient(circle at 30% 30%, #ecf0f1, #7f8c8d);
    border-color: #2c3e50;
    box-shadow: inset 0 0 30px rgba(255,255,255,0.8), 0 0 30px rgba(236, 240, 241, 0.4);
}

.coinflip-chain-track {
    width: min(320px, 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.coinflip-chain-track span {
    min-height: 42px;
    border: 1px solid rgba(244, 241, 234, 0.14);
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text-muted);
    font-weight: 900;
    font-size: 20px;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.coinflip-chain-track span.pending {
    animation: coin-step-pulse 800ms ease-in-out infinite;
}

.coinflip-chain-track span.hit {
    color: #111;
    background: linear-gradient(135deg, #ffe08a, #f3a712);
    border-color: rgba(255, 224, 138, 0.8);
    transform: translateY(-3px) scale(1.03);
}

.coinflip-chain-track span.miss {
    color: var(--danger);
    background: rgba(255, 82, 82, 0.11);
    border-color: rgba(255, 82, 82, 0.45);
}

.coinflip-chain-note {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

@keyframes coin-step-pulse {
    0%, 100% { border-color: rgba(244, 241, 234, 0.14); transform: translateY(0); }
    50% { border-color: rgba(255, 224, 138, 0.62); transform: translateY(-2px); }
}

/* ROULETTE */
.roulette-premium-layout {
    width: min(100%, 820px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(220px, 1fr);
    gap: 1.25rem;
    align-items: center;
}
.roulette-premium-stage {
    --roulette-number-radius: min(150px, 32vw);
    position: relative;
    width: min(380px, 82vw);
    aspect-ratio: 1;
    border-radius: 50%;
    margin: 0 auto;
    border: 14px solid #171717;
    background: radial-gradient(circle at 50% 50%, #303030, #050505 72%);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), inset 0 0 40px rgba(0,0,0,0.9), 0 0 20px rgba(255, 215, 0, 0.2);
    overflow: visible;
}
.roulette-premium-stage::before {
    content: '';
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    pointer-events: none;
    z-index: 20;
}
.roulette-premium-stage::after {
    content: '';
    position: absolute;
    inset: 15%;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: inset 0 0 24px rgba(0,0,0,0.6);
    pointer-events: none;
    z-index: 4;
}
.roulette-premium-pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    width: 28px;
    height: 36px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffe28a, #b86b13);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.65));
    z-index: 22;
    pointer-events: none;
}
.roulette-premium-wheel {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, transparent 0 34%, rgba(255,255,255,0.18) 34.4% 35.4%, transparent 36% 100%),
        repeating-conic-gradient(from -4.8649deg, rgba(255,255,255,0.45) 0deg 0.24deg, transparent 0.24deg 9.7297deg),
        var(--roulette-segments);
    transition: transform cubic-bezier(0.12, 0.72, 0.12, 1) 3s;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}
.roulette-wheel-number {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 20px;
    margin: -10px 0 0 -15px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    transform: rotate(var(--angle)) translateY(calc(-1 * var(--roulette-number-radius))) rotate(var(--counter));
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 2;
}
.roulette-wheel-number.green {
    color: #c9ffd8;
}
.roulette-wheel-number.red {
    color: #ffe1e5;
}
.roulette-wheel-number.black {
    color: #f4f1ea;
}
.roulette-wheel-number.wheel-hit {
    color: #111;
    background: #ffe28a;
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(255, 226, 138, 0.7);
    text-shadow: none;
    z-index: 6;
}
.roulette-premium-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 35% 30%, #ffe28a, #d67c18 62%, #61320b);
    border-radius: 50%;
    border: 6px solid #f8dc72;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.6), inset 0 0 15px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 8;
}
.roulette-ticket {
    min-height: 190px;
    padding: 1.1rem;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02)),
        rgba(8, 14, 24, 0.82);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 18px 40px rgba(0,0,0,0.36);
    display: grid;
    gap: 0.7rem;
    align-content: center;
}
.roulette-ticket span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}
.roulette-ticket strong {
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1;
}
.roulette-ticket div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.roulette-ticket small,
.roulette-ticket em {
    color: var(--text-muted);
    font-style: normal;
}
.roulette-ticket b {
    color: #ffe28a;
    font-size: 1.35rem;
}
.roulette-ticket.win {
    border-color: rgba(86, 211, 145, 0.58);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 0 34px rgba(86, 211, 145, 0.24);
}
.roulette-ticket.loss {
    border-color: rgba(255, 91, 118, 0.44);
}
.roulette-table-shell {
    width: min(100%, 780px);
    display: grid;
    gap: 5px;
    background: rgba(8, 8, 10, 0.9);
    padding: 8px;
    border-radius: 8px;
    margin: 1.25rem auto 0;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}
.roulette-table-main {
    display: grid;
    grid-template-columns: minmax(42px, 58px) 1fr;
    gap: 5px;
}
.roulette-number-grid,
.roulette-outside-row {
    display: grid;
    gap: 5px;
}
.roulette-number-grid {
    grid-template-columns: repeat(12, minmax(28px, 1fr));
}
.roulette-outside-row {
    grid-template-columns: repeat(3, 1fr);
}
.roulette-outside-row-six {
    grid-template-columns: repeat(6, 1fr);
}
.roulette-cell {
    min-width: 0;
    min-height: 38px;
    background: linear-gradient(135deg, #262b33, #0b0f15);
    color: #fff;
    padding: 0.45rem 0.2rem;
    text-align: center;
    font-weight: 900;
    font-size: 0.78rem;
    line-height: 1.05;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}
.roulette-number {
    aspect-ratio: 1.18;
    font-size: 0.95rem;
}
.roulette-zero-cell {
    height: 100%;
    min-height: 124px;
    font-size: 1.35rem;
}
.roulette-cell.red { background: linear-gradient(135deg, #d9443e, #891d28); }
.roulette-cell.black { background: linear-gradient(135deg, #2b2f36, #050607); }
.roulette-cell.green { background: linear-gradient(135deg, #27b470, #11633f); }
.roulette-cell:hover:not(:disabled) {
    transform: translateY(-2px);
    z-index: 2;
    box-shadow: 0 8px 18px rgba(0,0,0,0.5), 0 0 12px rgba(255,255,255,0.12);
    filter: brightness(1.12);
}
.roulette-cell.selected {
    border-color: rgba(255, 226, 138, 0.95);
    box-shadow: 0 0 0 2px rgba(255, 226, 138, 0.22), 0 0 20px rgba(255, 226, 138, 0.24);
}
.roulette-cell.hit-pocket {
    animation: roulette-pocket-pop 0.78s ease both;
    border-color: rgba(255,255,255,0.9);
}
.roulette-cell.won {
    box-shadow: 0 0 0 2px rgba(86, 211, 145, 0.24), 0 0 26px rgba(86, 211, 145, 0.42);
}
.roulette-cell.lost {
    opacity: 0.7;
    border-color: rgba(255, 91, 118, 0.48);
}
@keyframes roulette-pocket-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* SLOTS */
.slots-premium-machine {
    width: min(100%, 460px);
    background:
        linear-gradient(180deg, rgba(36, 48, 65, 0.98), rgba(8, 13, 22, 0.98)),
        radial-gradient(circle at 50% 0%, rgba(255,226,138,0.18), transparent 46%);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(103, 166, 255, 0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 40px rgba(59, 130, 246, 0.24), inset 0 0 30px rgba(0,0,0,0.5);
    display: grid;
    gap: 0.95rem;
    position: relative;
    margin: 0 auto;
}
.slots-premium-machine::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 10px;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.58), rgba(255, 226, 138, 0.3), rgba(236, 72, 153, 0.46));
    z-index: -1;
    filter: blur(14px);
    opacity: 0.45;
}
.slots-machine-head,
.slots-payout-rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.slots-machine-head span {
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #ffe28a;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}
.slots-machine-head strong {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.82);
    letter-spacing: 0;
}
.slots-reel-row {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}
.slots-payline {
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, rgba(255, 226, 138, 0.96), transparent);
    box-shadow: 0 0 18px rgba(255, 226, 138, 0.52);
    z-index: 4;
    pointer-events: none;
}
.slots-premium-reel {
    width: clamp(76px, 20vw, 96px);
    height: 140px;
    background: linear-gradient(180deg, #e2e8f0, #f8fafc, #d9e2ee);
    border-radius: 8px;
    box-shadow: inset 0 15px 25px rgba(0,0,0,0.55), 0 5px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 3px solid #cbd5e1;
}
.slots-premium-reel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2), transparent 34%, transparent 66%, rgba(0,0,0,0.2));
    pointer-events: none;
    z-index: 3;
}
.slots-premium-reel.locked {
    border-color: rgba(255, 226, 138, 0.86);
    box-shadow: inset 0 15px 25px rgba(0,0,0,0.45), 0 0 20px rgba(255, 226, 138, 0.22);
}
.slots-premium-reel.wild-reel {
    border-color: rgba(86, 211, 145, 0.9);
}
.slots-premium-reel-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}
.slots-premium-reel-strip div {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.22));
}
.slot-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    color: #0b1020;
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.9), transparent 26%),
        linear-gradient(145deg, rgba(255,255,255,0.5), rgba(255,255,255,0.06));
    box-shadow: inset 0 0 18px rgba(255,255,255,0.22), 0 10px 18px rgba(0,0,0,0.16);
}
.slot-symbol svg {
    width: 58px;
    height: 58px;
    display: block;
    fill: currentColor;
    stroke: none;
}
.slot-spin-token {
    display: inline-grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.78), transparent 26%),
        linear-gradient(145deg, #f8fafc, #cbd5e1);
    color: #0f172a;
    font-weight: 1000;
    font-size: 1.18rem;
    box-shadow: inset 0 0 16px rgba(255,255,255,0.18), 0 10px 18px rgba(0,0,0,0.14);
}
.slot-symbol-7 {
    color: #b91c1c;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.78), transparent 26%),
        linear-gradient(145deg, #fff1b8, #f7b32b);
}
.slot-symbol-web {
    color: #2563eb;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.76), transparent 26%),
        linear-gradient(145deg, #dbeafe, #93c5fd);
}
.slot-symbol-web svg,
.slot-symbol-mask svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.slot-symbol-ryo {
    color: #8a4f00;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.76), transparent 26%),
        linear-gradient(145deg, #ffe28a, #d1a642);
}
.slot-symbol-core {
    color: #047857;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.72), transparent 26%),
        linear-gradient(145deg, #bbf7d0, #56d391);
}
.slot-symbol-mask {
    color: #5b21b6;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.72), transparent 26%),
        linear-gradient(145deg, #ddd6fe, #a78bfa);
}
.slot-symbol-x {
    color: #475569;
    background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,0.7), transparent 26%),
        linear-gradient(145deg, #e2e8f0, #94a3b8);
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.slots-result-note {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.82);
    font-weight: 800;
    text-align: center;
}
.slots-payout-rail {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}
.slots-premium-machine.tier-triple {
    border-color: rgba(86, 211, 145, 0.76);
    box-shadow: 0 20px 50px rgba(0,0,0,0.78), 0 0 44px rgba(86, 211, 145, 0.28), inset 0 0 30px rgba(0,0,0,0.45);
}
.slots-premium-machine.tier-pair {
    border-color: rgba(255, 226, 138, 0.68);
}
.slots-premium-machine.tier-miss {
    border-color: rgba(255, 91, 118, 0.42);
}
.slots-premium-machine.wild-used .slots-payline {
    background: linear-gradient(90deg, transparent, rgba(86, 211, 145, 0.96), transparent);
    box-shadow: 0 0 18px rgba(86, 211, 145, 0.5);
}

@media (max-width: 760px) {
    .roulette-premium-layout {
        grid-template-columns: 1fr;
    }

    .roulette-ticket {
        min-height: 130px;
    }

    .roulette-number-grid {
        grid-template-columns: repeat(6, minmax(28px, 1fr));
    }

    .roulette-outside-row-six {
        grid-template-columns: repeat(3, 1fr);
    }

    .roulette-cell {
        min-height: 34px;
        font-size: 0.72rem;
    }

    .roulette-zero-cell {
        min-height: 238px;
    }

    .slots-premium-machine {
        padding: 1rem;
    }

    .slots-reel-row {
        gap: 0.45rem;
    }

    .slots-premium-reel {
        width: clamp(66px, 25vw, 86px);
    }
}

/* ROLL */
.casino-roll-premium {
    text-align: center;
    background: rgba(15, 23, 42, 0.6);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
}
.roll-premium-display {
    font-size: 7rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    background: linear-gradient(180deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 10px 30px rgba(255,255,255,0.15);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.casino-roll-premium.running .roll-premium-display {
    background: linear-gradient(180deg, #ffffff, #ffd666 48%, #86efac);
    -webkit-background-clip: text;
    background-clip: text;
}

.casino-roll-premium.cashed-out .roll-premium-display {
    background: linear-gradient(180deg, #ffffff, #86efac);
    -webkit-background-clip: text;
    background-clip: text;
}

.casino-roll-premium.crashed .roll-premium-display {
    background: linear-gradient(180deg, #ffffff, #ff7a7a);
    -webkit-background-clip: text;
    background-clip: text;
}
.roll-premium-bar {
    width: 100%;
    max-width: 400px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.8), 0 0 0 2px rgba(255,255,255,0.1);
    margin: 0 auto;
}
.roll-premium-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ef4444, #eab308, #22c55e);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* VAULT */
.vault-premium {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 30% 30%, #94a3b8, #475569, #1e293b);
    border-radius: 50%;
    border: 20px solid #cbd5e1;
    box-shadow: 0 30px 60px rgba(0,0,0,0.7), inset 0 0 40px rgba(0,0,0,0.9), 0 0 0 2px #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.vault-premium::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 4px dashed rgba(0,0,0,0.2);
    pointer-events: none;
}
.vault-premium-wheel {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 12px dotted #334155;
    background: radial-gradient(circle, #64748b, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 10px 20px rgba(0,0,0,0.5);
}
.vault-premium-handle {
    width: 80px;
    height: 16px;
    background: linear-gradient(to bottom, #cbd5e1, #94a3b8);
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6), inset 0 2px 4px rgba(255,255,255,0.8);
    z-index: 10;
}
.vault-premium.opened {
    box-shadow: 0 0 60px rgba(250, 204, 21, 0.6), inset 0 0 60px rgba(250, 204, 21, 0.4);
    border-color: #fef08a;
}
.vault-premium.opened .vault-premium-wheel {
    transform: rotate(1080deg) scale(0.9);
    border-color: #eab308;
    background: radial-gradient(circle, #fde047, #ca8a04);
    box-shadow: 0 0 50px #eab308, inset 0 0 30px #fef08a;
}

/* RESULT OVERLAY OVERHAUL */
.result-overlay {
    background: rgba(10, 10, 15, 0.85) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 2rem !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.result-overlay:not([hidden]) {
    transform: scale(1);
    opacity: 1;
}
.result-overlay strong {
    font-size: 3rem !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0;
    margin-bottom: 1rem !important;
}
.game-room.won .result-overlay strong {
    background: linear-gradient(135deg, #a8ff78, #78ffd6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(120, 255, 214, 0.4);
}
.game-room.lost .result-overlay strong {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 75, 43, 0.4);
}
.result-overlay p {
    font-size: 1.05rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 1rem !important;
    max-width: 680px;
    line-height: 1.45;
}
.result-metrics {
    width: min(100%, 640px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 0 0 1.2rem;
}
.result-metrics span {
    min-height: 58px;
    display: grid;
    gap: 4px;
    align-content: center;
    padding: 0.65rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
}
.result-metrics small {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}
.result-metrics strong {
    margin: 0 !important;
    color: #fff !important;
    font-size: 1rem !important;
    line-height: 1.1;
    text-transform: none;
    letter-spacing: 0;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    text-shadow: none !important;
}
.result-overlay .btn {
    padding: 1rem 2rem !important;
    font-size: 1.25rem !important;
    border-radius: 12px !important;
}


/* REWARD BURST PREMIUM */
.reward-burst-premium {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 3rem;
    font-weight: 900;
    color: #a8ff78;
    text-shadow: 0 0 20px rgba(168, 255, 120, 0.8), 0 0 40px rgba(168, 255, 120, 0.4);
    z-index: 100;
    pointer-events: none;
    animation: burst-text 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes burst-text {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    20% { transform: translate(-50%, -60%) scale(1.2); opacity: 1; }
    80% { transform: translate(-50%, -70%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -80%) scale(0.9); opacity: 0; }
}

.reward-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99;
    box-shadow: 0 0 10px currentColor;
    animation: burst-particle 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes burst-particle {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; }
}


/* START ANIMATIONS */
.roulette-spin-running .roulette-premium-wheel {
    filter: drop-shadow(0 0 22px rgba(255, 226, 138, 0.25));
}

.coin-flip-running .coinflip-coin {
    animation: coin-flip-infinite 0.5s linear infinite;
}
@keyframes coin-flip-infinite {
    from { transform: rotateY(0deg) scale(1.2); }
    to { transform: rotateY(360deg) scale(1.2); }
}

.slot-roll-running .slots-premium-reel-strip {
    animation: slot-infinite-roll 0.2s linear infinite;
}
@keyframes slot-infinite-roll {
    from { transform: translateY(0); }
    to { transform: translateY(-300px); }
}

.vault-open-running .vault-premium-wheel {
    animation: vault-shake 0.1s linear infinite;
}
@keyframes vault-shake {
    0% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(-5deg); }
}


/* ========================================================
   PREMIUM CORE GAMES UI/UX - PHASE 2 (CARDS, DICE, RPS, GUESS)
   ======================================================== */

/* 3D DICE */
.dice-premium-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    perspective: 1200px;
    width: 100%;
    margin: 2rem 0;
}
.dice-3d-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.dice-3d-wrapper span {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 3px;
    text-shadow: 0 4px 10px rgba(255,255,255,0.1);
}
.dice-3d {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: rotateX(-15deg) rotateY(15deg);
}
.dice-face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    border: 6px solid #cbd5e1;
    border-radius: 20px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 0 10px rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: 900;
    color: #1e293b;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.dice-face.front  { transform: translateZ(60px); }
.dice-face.back   { transform: rotateY(180deg) translateZ(60px); }
.dice-face.right  { transform: rotateY(90deg) translateZ(60px); }
.dice-face.left   { transform: rotateY(-90deg) translateZ(60px); }
.dice-face.top    { transform: rotateX(90deg) translateZ(60px); }
.dice-face.bottom { transform: rotateX(-90deg) translateZ(60px); }

/* Dice Animations */
.is-playing .dice-3d {
    animation: dice-roll 0.4s linear infinite;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}
@keyframes dice-roll {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(-10px); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg) translateY(-10px); }
}

/* 3D CARDS (Blackjack, HighLow, CardDraw) */
.card-premium-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    perspective: 1500px;
    width: 100%;
    margin: 2rem 0;
}
.card-3d-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.card-3d-wrapper span {
    font-size: 1.25rem;
    font-weight: 800;
    color: rgba(255,255,255,0.8);
    letter-spacing: 2px;
}
.playing-card-3d {
    width: 140px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(180deg); /* Back faces up by default */
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(255,255,255,0.05);
    border-radius: 12px;
}
.playing-card-3d.revealed {
    transform: rotateY(0deg) translateY(-10px); /* Front faces up and pops up */
    box-shadow: 0 30px 50px rgba(0,0,0,0.8), 0 0 30px rgba(255,255,255,0.1);
}
.playing-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.playing-card-front {
    background: radial-gradient(circle at top left, #ffffff, #f1f5f9);
    border: 4px solid #e2e8f0;
    color: #0f172a;
    font-size: 4.5rem;
    font-weight: 900;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}
.playing-card-front.red-suit {
    color: #ef4444;
}
.playing-card-back {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 6px solid #e2e8f0;
    transform: rotateY(180deg);
}
.playing-card-back::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 6px;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px);
}

/* Card Deal Animation */
.is-playing .playing-card-3d:not(.revealed) {
    animation: card-deal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes card-deal {
    0% { transform: translateY(-300px) rotateY(180deg) rotateZ(-20deg) scale(0.5); opacity: 0; }
    100% { transform: translateY(0) rotateY(180deg) rotateZ(0deg) scale(1); opacity: 1; }
}

/* RPS ARENA */
.rps-premium-arena {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 180px) minmax(150px, 1fr);
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    width: 100%;
    margin: 2rem 0;
}
.rps-hand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.rps-hand-wrapper span {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
}

.rps-hand-wrapper small {
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(244, 241, 234, 0.13);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.26);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}
.rps-hand {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at 30% 30%, #475569, #1e293b);
    border: 6px solid #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,255,255,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.is-playing .rps-hand {
    animation: rps-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}
.rps-hand.revealed {
    background: radial-gradient(circle at 30% 30%, #fde047, #eab308);
    border-color: #fef08a;
    box-shadow: 0 30px 60px rgba(234, 179, 8, 0.4), 0 0 40px rgba(234, 179, 8, 0.2), inset 0 0 20px rgba(255,255,255,0.5);
    color: #1e293b;
}

.rps-hand.revealed.winner {
    box-shadow: 0 30px 60px rgba(74, 222, 128, 0.32), 0 0 34px rgba(74, 222, 128, 0.25), inset 0 0 20px rgba(255,255,255,0.5);
    border-color: #86efac;
}

.rps-duel-core {
    display: grid;
    place-items: center;
    gap: 10px;
}

.rps-duel-core strong {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(244, 241, 234, 0.16);
    background: rgba(0, 0, 0, 0.34);
    color: var(--text);
    font-size: 24px;
}

.rps-duel-core span {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.26);
    font-size: 12px;
    line-height: 1.25;
}

.rps-duel-core span.win { color: var(--success); }
.rps-duel-core span.draw { color: var(--warning); }
.rps-duel-core span.loss { color: var(--danger); }

.rps-duel-running .rps-duel-core strong {
    animation: rps-core-pulse 620ms ease-in-out infinite;
}

@keyframes rps-core-pulse {
    0%, 100% { transform: scale(1); border-color: rgba(244, 241, 234, 0.16); }
    50% { transform: scale(1.08); border-color: rgba(103, 166, 255, 0.55); }
}
.rps-hand-wrapper:first-child .rps-hand.revealed {
    transform: scale(1.15) translateX(15px) translateY(-10px);
}
.rps-hand-wrapper:last-child .rps-hand.revealed {
    transform: scale(1.15) translateX(-15px) translateY(-10px);
}
@keyframes rps-shake {
    0% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-30px) rotate(-10deg); }
    50% { transform: translateY(0) rotate(0); }
    75% { transform: translateY(20px) rotate(10deg); }
    100% { transform: translateY(0) rotate(0); }
}

@media (max-width: 760px) {
    .rps-premium-arena {
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 0;
    }

    .rps-duel-core {
        order: 2;
    }

    .rps-hand {
        width: 118px;
        height: 118px;
        font-size: 4.2rem;
    }
}

/* CASINO ROLL */
.casino-roll-premium {
    width: min(620px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 14px;
    justify-items: center;
}

.roll-mode-badge {
    padding: 7px 12px;
    border: 1px solid rgba(244, 241, 234, 0.14);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.roll-number-display {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.roll-crash-status {
    max-width: 560px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.roll-premium-bar {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 18px;
    border-radius: 999px;
    overflow: visible;
    border: 1px solid rgba(244, 241, 234, 0.14);
    background: rgba(0, 0, 0, 0.38);
}

.roll-premium-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #67a6ff, #ffd666, #4ade80);
    transition: width 140ms linear;
}

.roll-premium-pointer {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 30px;
    border-radius: 8px;
    transform: translate(-50%, -50%);
    background: #fff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
    transition: left 140ms linear;
}

.roll-ladder {
    width: 100%;
    max-width: 560px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.roll-ladder span {
    padding: 8px 10px;
    border: 1px solid rgba(244, 241, 234, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--text-muted);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.roll-ladder span.active {
    border-color: rgba(74, 222, 128, 0.56);
    color: #86efac;
    background: rgba(74, 222, 128, 0.1);
}

.action-choice-btn.roll-cashout-ready {
    border-color: rgba(74, 222, 128, 0.58) !important;
    background:
        linear-gradient(135deg, rgba(74, 222, 128, 0.24), rgba(0, 0, 0, 0.18)) !important;
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.16), 0 14px 28px rgba(0, 0, 0, 0.26) !important;
}

/* GUESS GRID */
.guess-premium-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.guess-premium-cell {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255,255,255,0.3);
    aspect-ratio: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.is-playing .guess-premium-cell {
    animation: guess-pulse 1s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes guess-pulse {
    0% { border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.3); transform: scale(1); }
    100% { border-color: rgba(56, 189, 248, 0.5); color: rgba(56, 189, 248, 0.8); transform: scale(1.05); box-shadow: 0 0 20px rgba(56, 189, 248, 0.2); }
}
.guess-premium-cell.hit {
    background: radial-gradient(circle, #22c55e, #16a34a);
    border-color: #86efac;
    color: #fff;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.6), inset 0 0 20px rgba(255,255,255,0.4);
    transform: scale(1.15) translateY(-5px);
    z-index: 2;
}

/* PHASE 3: QUICK BET & GLOW EFFECTS */

.bet-controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.bet-quick-actions {
    display: flex;
    gap: 6px;
    width: 100%;
}

.bet-quick-actions .btn {
    flex: 1;
    padding: 6px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 4px;
    transition: all 0.2s;
}

.bet-quick-actions .btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
}

.bet-quick-actions .btn:active {
    transform: translateY(1px);
}

/* Add a glowing hover effect to game cards in the lobby */
.game-hub-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.game-hub-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent 50%, rgba(255,255,255,0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-hub-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.game-hub-card:hover::after {
    opacity: 1;
}

/* Enhanced action buttons */
.games-hero-actions .btn-primary,
.game-card-actions .btn-primary {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent), black 20%));
    box-shadow: 0 4px 15px color-mix(in srgb, var(--accent) 40%, transparent);
    transition: all 0.3s;
}

.games-hero-actions .btn-primary:hover,
.game-card-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* 3D BLACKJACK STYLES */
.bj-room {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: radial-gradient(circle at 50% -20%, #1a4d2e, #0a1f12);
    color: #fff;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 10;
}

.bj-table-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    perspective: 1200px;
    padding: 2rem;
    padding-bottom: 0;
}

.bj-dealer-zone, .bj-player-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.bj-table-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    pointer-events: none;
}

.bj-logo {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 50px;
    transform: rotateX(45deg);
    text-transform: uppercase;
    line-height: 1.4;
}

.bj-shoe {
    position: absolute;
    right: 10%;
    top: 0;
    width: 60px;
    height: 90px;
    background: #111;
    border-radius: 8px;
    border: 2px solid #333;
    box-shadow: inset 0 0 10px #000, 5px 5px 15px rgba(0,0,0,0.5);
}

.bj-cards {
    display: flex;
    gap: -40px; /* Overlap cards */
    min-height: 140px;
    justify-content: center;
}

.bj-card {
    width: 100px;
    height: 140px;
    background: #fff;
    border-radius: 8px;
    box-shadow: -2px 5px 15px rgba(0,0,0,0.4);
    position: relative;
    color: #000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    margin-left: -60px;
    transition: transform 0.3s ease;
    animation: bjCardDeal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.bj-card:first-child {
    margin-left: 0;
}

.bj-card.red { color: #d32f2f; }
.bj-card.black { color: #111; }

.bj-card .bj-val-top { align-self: flex-start; }
.bj-card .bj-val-bottom { align-self: flex-end; transform: rotate(180deg); }
.bj-card .bj-suit-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.2;
}

.bj-card.hidden-card {
    background: repeating-linear-gradient(45deg, #111, #111 10px, #222 10px, #222 20px);
    border: 4px solid #fff;
}

@keyframes bjCardDeal {
    0% { transform: translateY(-200px) rotate(-20deg) scale(0.5); opacity: 0; }
    100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
}

.bj-score {
    background: rgba(0,0,0,0.6);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2);
}

.bj-bet-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.bj-bet-amount {
    font-size: 0.9rem;
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 12px;
}

.bj-controls {
    background: rgba(10, 20, 15, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
}

.bj-betting-phase, .bj-playing-phase, .bj-finished-phase {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    justify-content: center;
    flex-wrap: wrap;
}

.bj-chips-selector {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
}

.bj-chip {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px dashed rgba(255,255,255,0.5);
    background: #333;
    color: #fff;
    font-weight: bold;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.1s, box-shadow 0.1s;
}

.bj-chip:hover {
    transform: translateY(-2px) scale(1.05);
}
.bj-chip:active {
    transform: translateY(2px) scale(0.95);
}

.bj-chip-red { background: #d32f2f; }
.bj-chip-blue { background: #1976d2; }
.bj-chip-green { background: #2e7d32; }
.bj-chip-black { background: #212121; }
.bj-chip-gold { background: #fbc02d; color: #000; }

.bj-chip-placed {
    width: 60px; height: 60px;
    background: #fbc02d;
    color: #000;
    border: 5px dashed #fff;
    margin-bottom: -10px;
}

.bj-result-toast {
    position: absolute;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    z-index: 100;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.bj-result-toast.win { background: rgba(46, 125, 50, 0.9); border: 2px solid #4caf50; color: #fff; }
.bj-result-toast.lose { background: rgba(211, 47, 47, 0.9); border: 2px solid #f44336; color: #fff; }
.bj-result-toast.draw { background: rgba(100, 100, 100, 0.9); border: 2px solid #aaa; color: #fff; }

.bj-anim-pop {
    animation: bjPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bjPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.bj-controls .btn {
    min-width: 120px;
    height: 48px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.2s;
}

.bj-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bj-split-hand {
    transition: transform 0.3s;
    opacity: 0.6;
    transform: scale(0.9);
}
.bj-split-hand.active-hand {
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
}

.bj-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 14, 9, 0.78);
    backdrop-filter: blur(12px);
}

.bj-topbar strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.bj-balance-pill {
    display: grid;
    gap: 2px;
    min-width: 130px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    text-align: right;
}

.bj-balance-pill span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
}

.bj-balance-pill strong {
    font-size: 14px;
}

.bj-advice-panel {
    position: absolute;
    bottom: 10px;
    left: 50%;
    width: min(440px, calc(100vw - 32px));
    transform: translateX(-50%);
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid rgba(244, 241, 234, 0.13);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.42);
    text-align: center;
    pointer-events: auto;
}

.bj-advice-panel strong {
    color: #fff;
    font-size: 15px;
}

.bj-advice-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
    line-height: 1.35;
}

.bj-chip-stack {
    position: relative;
    width: 100px;
    min-height: 72px;
}

.bj-chip-placed {
    position: absolute;
    left: calc(50% - 30px);
    bottom: calc(var(--chip-i, 0) * 7px);
    margin: 0;
}

.bj-playing-phase {
    max-width: 760px;
}

.bj-playing-phase .btn {
    min-width: 116px;
}

.bj-playing-phase #bj-surrender-btn {
    border-color: rgba(255, 214, 102, 0.42);
    color: #ffd666;
}

.bj-split-hand.win .bj-score {
    border-color: rgba(74, 222, 128, 0.62);
    color: #86efac;
}

.bj-split-hand.draw .bj-score {
    border-color: rgba(255, 214, 102, 0.62);
    color: #ffd666;
}

.bj-split-hand.loss .bj-score {
    border-color: rgba(255, 82, 82, 0.62);
    color: #ff8f8f;
}

.bj-card[data-card-value="11"] {
    box-shadow: -2px 5px 15px rgba(0,0,0,0.4), 0 0 22px rgba(255, 214, 102, 0.22);
}

@media (max-width: 760px) {
    .bj-room {
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
    }

    .bj-topbar {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .bj-balance-pill {
        grid-column: 1 / -1;
        text-align: left;
    }

    .bj-table-container {
        min-height: 640px;
        padding: 14px;
    }

    .bj-card {
        width: 82px;
        height: 116px;
        margin-left: -50px;
    }

    .bj-logo {
        font-size: 0.88rem;
        padding: 0.75rem 1rem;
    }

    .bj-controls {
        padding: 12px;
    }

    .bj-chips-selector,
    .bj-betting-phase,
    .bj-playing-phase,
    .bj-finished-phase {
        gap: 8px;
    }

    .bj-controls .btn {
        min-width: 0;
        flex: 1 1 130px;
        height: 44px;
        font-size: 0.92rem;
    }
}

/* Custom animations added by Antigravity */
@keyframes dice-spin {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(1080deg) rotateY(720deg) rotateZ(360deg); }
}

@keyframes card-flip {
    0% { transform: perspective(600px) rotateY(0deg); }
    100% { transform: perspective(600px) rotateY(180deg); }
}

.glow-legendary { color: #e2b714; text-shadow: 0 0 10px #e2b714, 0 0 20px #e2b714; }
.glow-epic { color: #a155e8; text-shadow: 0 0 10px #a155e8, 0 0 20px #a155e8; }
.glow-win { color: var(--text-success); text-shadow: 0 0 10px var(--text-success); }
.glow-lose { color: var(--text-danger); text-shadow: 0 0 10px var(--text-danger); }


/* --- LOBBY SYSTEM --- */
.lobby-browser-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.lobby-browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lobby-browser-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}
.lobby-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}
.lobby-empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}
.lobby-list-item {
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}
.lobby-list-item:hover {
    border-color: var(--primary-color);
}
.lobby-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lobby-info strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}
.lobby-info span {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.lobby-status {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lobby-status span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Room */
.lobby-room-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.lobby-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lobby-room-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}
.lobby-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.player-seat {
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: all 0.2s;
}
.player-seat.ready {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
}
.player-seat.empty {
    border-style: dashed;
    opacity: 0.7;
    flex-direction: column;
    text-align: center;
    gap: 8px;
}
.player-seat .player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}
.player-seat.empty .player-avatar {
    background: var(--bg-surface);
    color: var(--text-muted);
}
.player-seat div {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.player-seat div strong {
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-seat div small {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.player-seat.ready div small {
    color: #2ecc71;
}
.lobby-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* --- PREMIUM GAME HEADER & TOGGLE --- */
.game-header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.premium-toggle {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.premium-toggle .btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: none;
}

.premium-toggle .btn:hover {
    color: var(--text-primary);
}

.premium-toggle .btn.active {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.2));
    color: #ff5252;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.2), inset 0 0 0 1px rgba(244, 67, 54, 0.3);
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

.premium-badge {
    background: rgba(20, 20, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.05);
}

/* --- PREMIUM LOBBY SYSTEM --- */
.lobby-browser-panel, .lobby-room-panel {
    background: rgba(15, 15, 20, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lobby-browser-header h3, .lobby-room-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.lobby-list-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lobby-list-item:hover {
    background: rgba(244, 67, 54, 0.05);
    border-color: rgba(244, 67, 54, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.lobby-info strong {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.lobby-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lobby-status span {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.player-seat {
    background: linear-gradient(180deg, rgba(30, 30, 35, 0.8), rgba(20, 20, 25, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
}

.player-seat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.player-seat:hover::before {
    opacity: 1;
}

.player-seat.ready {
    background: linear-gradient(180deg, rgba(46, 204, 113, 0.1), rgba(20, 20, 25, 0.9));
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.1), inset 0 0 0 1px rgba(46, 204, 113, 0.2);
}

.player-seat.empty {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.player-seat .player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #333, #1a1a1a);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    font-size: 1.2rem;
}

.player-seat.ready .player-avatar {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.player-seat div strong {
    font-size: 1.1rem;
    font-weight: 700;
}

.player-seat div small {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 2px;
}

.player-seat.ready div small {
    color: #2ecc71;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lobby-actions {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== CORE GAMES FINISH PASS ==================== */
.games-hub-page,
.full-game-room {
    --game-line: rgba(244, 241, 234, 0.13);
    --game-panel: rgba(10, 11, 14, 0.76);
    --game-panel-strong: rgba(15, 17, 21, 0.9);
    --game-gold: #d1a642;
    --game-blue: #67a6ff;
}

.games-hub-page {
    gap: 16px;
}

.games-hub-page .games-hero,
.games-hub-page .core-panel,
.games-hub-page .featured-game,
.games-hub-page .quick-match-panel,
.games-hub-page .game-hub-card,
.full-game-room,
.full-game-room .rich-game-header,
.full-game-room .game-board-panel,
.full-game-room .players-panel,
.full-game-room .round-log-panel,
.full-game-room .game-action-panel,
.full-game-room .lobby-room-panel,
.full-game-room .lobby-browser-panel {
    border-radius: 8px !important;
}

.games-hub-page .games-hero {
    min-height: 300px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--game-line);
    background:
        linear-gradient(135deg, rgba(180, 22, 42, 0.2), transparent 46%),
        linear-gradient(180deg, rgba(244, 241, 234, 0.055), rgba(0, 0, 0, 0.28)),
        var(--game-panel);
}

.games-hub-page .games-hero h2,
.full-game-room .rich-game-header h2 {
    letter-spacing: 0 !important;
    -webkit-text-fill-color: currentColor;
    background: none;
    color: var(--text);
    text-shadow: none;
}

.games-hub-page .games-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: stretch;
}

.games-hub-page .games-metrics div,
.full-game-room .game-header-stats div,
.full-game-room .lobby-room-metrics div {
    min-width: 0;
    border: 1px solid var(--game-line);
    background: rgba(0, 0, 0, 0.34);
}

.games-hub-page .game-hub-card,
.games-hub-page .featured-game {
    border-color: var(--game-line);
    background: #050607;
}

.games-hub-page .game-card-shade,
.games-hub-page .game-room-overlay,
.full-game-room .game-room-overlay {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.86)),
        linear-gradient(135deg, rgba(180, 22, 42, 0.18), transparent 48%);
}

.games-hub-page .game-card-body,
.games-hub-page .featured-game-body {
    gap: 12px;
}

.games-hub-page .game-hub-card.has-live-lobbies {
    border-color: rgba(86, 211, 145, 0.42);
    box-shadow: 0 0 0 1px rgba(86, 211, 145, 0.08), var(--shadow-sm);
}

.games-hub-page .game-hub-card.has-live-lobbies .game-status {
    color: #86efac;
    border-color: rgba(86, 211, 145, 0.38);
    background: rgba(34, 197, 94, 0.12);
}

.game-card-playbook,
.featured-playbook,
.rules-playbook {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.game-card-playbook span,
.featured-playbook span,
.rules-playbook span {
    min-width: 0;
    min-height: 48px;
    display: grid;
    gap: 3px;
    align-content: center;
    padding: 7px 8px;
    border: 1px solid rgba(244, 241, 234, 0.09);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.32);
}

.game-card-playbook b,
.featured-playbook b,
.rules-playbook b {
    min-width: 0;
    color: var(--text);
    font-size: 0.75rem;
    line-height: 1.1;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-card-playbook small,
.featured-playbook small,
.rules-playbook small {
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-playbook {
    max-width: 560px;
}

.games-hub-page .product-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.game-risk-meter {
    display: inline-grid;
    grid-template-columns: repeat(5, 6px);
    gap: 2px;
    align-items: center;
}

.game-risk-meter i {
    width: 6px;
    height: 10px;
    border-radius: 999px;
    background: rgba(244, 241, 234, 0.16);
}

.game-risk-meter i.active {
    background: var(--game-gold);
    box-shadow: 0 0 8px rgba(209, 166, 66, 0.32);
}

.rules-modal-backdrop {
    padding: 18px;
    backdrop-filter: blur(14px);
}

.rules-dialog {
    width: min(920px, calc(100vw - 24px));
    max-height: min(88vh, 860px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.rules-dialog-body {
    grid-column: 1 / -1;
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 20px;
    overflow: auto;
    text-align: left;
}

.rules-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--game-line);
}

.rules-title-row {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.rules-title-row h3 {
    margin: 2px 0 4px;
    color: var(--text);
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.rules-title-row p {
    margin: 0;
    max-width: 600px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.rules-game-icon {
    width: 56px;
    height: 56px;
    font-size: 1.55rem;
}

.rules-close-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 8px;
}

.rules-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.rules-modal-grid article {
    min-width: 0;
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--game-line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(209, 166, 66, 0.12), transparent 54%),
        rgba(255, 255, 255, 0.035);
}

.rules-modal-grid span {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.1;
}

.rules-modal-grid strong {
    min-width: 0;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.rules-playbook {
    gap: 8px;
}

.rules-playbook span {
    min-height: 58px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
        rgba(0, 0, 0, 0.28);
}

.rules-playbook b {
    font-size: 0.82rem;
}

.rules-playbook small {
    font-size: 0.72rem;
}

.rules-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.rules-copy,
.rules-guide-list article,
.rules-fair-note {
    border: 1px solid var(--game-line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.24);
}

.rules-copy {
    min-width: 0;
    padding: 12px 14px;
    overflow-wrap: anywhere;
}

.rules-copy h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0;
}

.rules-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.rules-copy p + p {
    margin-top: 8px;
}

.rules-copy strong {
    color: var(--game-gold);
    font-weight: 700;
}

.rules-guide-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}

.rules-guide-list article {
    min-width: 0;
    min-height: 126px;
    padding: 12px;
    position: relative;
    overflow: hidden;
}

.rules-guide-list article::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--game-gold), rgba(180, 22, 42, 0.78), rgba(115, 179, 106, 0.78));
}

.rules-guide-list b,
.rules-fair-note b {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.15;
}

.rules-guide-list p,
.rules-fair-note p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.42;
}

.rules-fair-note {
    padding: 12px 14px;
    border-color: rgba(115, 179, 106, 0.32);
    background:
        linear-gradient(135deg, rgba(115, 179, 106, 0.12), transparent 58%),
        rgba(0, 0, 0, 0.22);
}

.rules-dialog-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    min-width: 0;
    padding: 0 20px 20px;
    border-top: 0;
}

.rules-dialog-actions .btn {
    min-height: 42px;
    white-space: normal;
}

.games-hub-page .game-card-body h3,
.games-hub-page .featured-game-body h3 {
    letter-spacing: 0;
}

.games-hub-page .game-card-actions .btn,
.games-hub-page .games-hero-actions .btn,
.full-game-room .game-action-buttons .btn,
.full-game-room .lobby-actions .btn {
    min-height: 42px;
    white-space: normal;
}

.full-game-room {
    min-height: calc(100vh - 92px);
    border-color: var(--game-line);
}

.full-game-room .game-room-content {
    padding: 16px;
    gap: 14px;
}

.full-game-room .rich-game-header {
    margin: 0;
    padding: 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(230px, 360px);
    gap: 14px;
    align-items: center;
    border: 1px solid var(--game-line);
    background: var(--game-panel);
    box-shadow: var(--shadow-sm);
}

.full-game-room .rich-game-header p {
    max-width: 760px;
    color: var(--text-muted);
}

.full-game-room .game-room-layout {
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) minmax(220px, 280px);
    gap: 12px;
    min-height: 420px;
}

.full-game-room .game-board-panel,
.full-game-room .players-panel,
.full-game-room .round-log-panel,
.full-game-room .game-action-panel,
.full-game-room .lobby-room-panel,
.full-game-room .lobby-browser-panel {
    border: 1px solid var(--game-line) !important;
    border-radius: 8px !important;
    background: var(--game-panel) !important;
    box-shadow: var(--shadow-sm) !important;
}

.full-game-room .game-board-panel {
    min-height: 420px;
    position: relative;
}

.full-game-room .game-action-panel {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(210px, 320px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px;
}

.full-game-room .bet-controls-wrapper {
    display: grid;
    gap: 10px;
}

.full-game-room .game-action-panel .amount-preview {
    grid-column: 1;
}

.full-game-room .game-action-panel .game-playbook {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.full-game-room .game-action-panel .game-action-cluster {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.full-game-room .game-action-buttons {
    justify-content: flex-end;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    width: 100%;
}

.full-game-room .game-action-cluster {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.full-game-room .game-playbook {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(244, 241, 234, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
}

.full-game-room .game-playbook strong {
    color: var(--text);
    font-size: 14px;
}

.full-game-room .game-playbook div {
    display: grid;
    gap: 5px;
}

.full-game-room .game-playbook div span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.full-game-room .game-action-buttons .btn {
    justify-content: center;
    padding-inline: 10px;
}

.full-game-room .game-action-buttons .action-choice-btn {
    position: relative;
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 8px;
    padding: 9px 10px;
    border-radius: 8px;
    text-align: left;
    letter-spacing: 0;
    overflow: hidden;
}

.full-game-room .game-action-buttons .action-choice-btn.previewing,
.full-game-room .game-action-buttons .action-choice-btn.selected-preview {
    transform: translateY(-1px);
    border-color: rgba(209, 166, 66, 0.55);
    box-shadow: 0 0 0 1px rgba(209, 166, 66, 0.14), 0 12px 24px rgba(0,0,0,0.28);
}

.full-game-room .game-action-buttons .action-choice-btn.selected-preview::after {
    content: "";
    position: absolute;
    inset: auto 8px 7px 8px;
    height: 2px;
    border-radius: 999px;
    background: var(--game-gold);
    box-shadow: 0 0 10px rgba(209, 166, 66, 0.45);
}

.action-decision-preview {
    min-width: 0;
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(244, 241, 234, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(103, 166, 255, 0.1), transparent 56%),
        rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.action-decision-preview[data-tone="safe"] {
    border-color: rgba(86, 211, 145, 0.3);
    background:
        linear-gradient(135deg, rgba(86, 211, 145, 0.13), transparent 58%),
        rgba(0, 0, 0, 0.28);
}

.action-decision-preview[data-tone="hot"] {
    border-color: rgba(209, 166, 66, 0.36);
    background:
        linear-gradient(135deg, rgba(209, 166, 66, 0.15), transparent 58%),
        rgba(0, 0, 0, 0.28);
}

.action-decision-preview[data-tone="danger"] {
    border-color: rgba(255, 91, 118, 0.34);
    background:
        linear-gradient(135deg, rgba(255, 91, 118, 0.13), transparent 58%),
        rgba(0, 0, 0, 0.28);
}

.action-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.action-preview-head span {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.action-preview-head strong {
    min-width: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.15;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-decision-preview p {
    min-height: 34px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.38;
}

.action-preview-meter {
    height: 8px;
    border-radius: 999px;
    background: rgba(244, 241, 234, 0.1);
    overflow: hidden;
}

.action-preview-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #56d391, #d1a642, #ff5b76);
    transition: width 0.24s ease;
}

.action-preview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.action-preview-metrics span {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 7px 8px;
    border: 1px solid rgba(244, 241, 234, 0.08);
    border-radius: 8px;
    background: rgba(244, 241, 234, 0.055);
}

.action-preview-metrics small {
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.62rem;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-preview-metrics strong {
    min-width: 0;
    color: var(--text);
    font-size: 0.74rem;
    line-height: 1.08;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-choice-btn .action-main {
    min-width: 0;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: 0;
    text-transform: none;
    overflow-wrap: anywhere;
}

.action-choice-btn .action-sub {
    grid-column: 1 / span 2;
    min-width: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
}

.action-choice-btn .action-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.48);
    box-shadow: 0 0 12px rgba(255,255,255,0.18);
}

.action-choice-btn .action-dot[data-tone="safe"] {
    background: #56d391;
    box-shadow: 0 0 14px rgba(86, 211, 145, 0.42);
}

.action-choice-btn .action-dot[data-tone="danger"] {
    background: #ff5b76;
    box-shadow: 0 0 14px rgba(255, 91, 118, 0.42);
}

.full-game-room .player-seat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-radius: 8px;
    padding: 11px;
    background: rgba(244, 241, 234, 0.055);
}

.full-game-room .player-seat.me {
    border-color: rgba(103, 166, 255, 0.45);
}

.full-game-room .player-seat.empty {
    display: grid;
    opacity: 0.78;
}

.full-game-room .player-seat div,
.full-game-room .player-seat div strong,
.full-game-room .player-seat div small {
    min-width: 0;
}

.full-game-room .player-seat div strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

.full-game-room .player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.full-game-room .lobby-room-panel {
    display: grid;
    gap: 12px;
    margin-top: 0;
    padding: 14px;
}

.full-game-room .lobby-room-header,
.full-game-room .lobby-room-actions,
.full-game-room .lobby-status,
.full-game-room .lobby-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.full-game-room .lobby-room-header {
    justify-content: space-between;
}

.full-game-room .lobby-code-join {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.full-game-room .lobby-code-join input {
    min-width: 0;
    height: 38px;
    text-transform: uppercase;
}

.full-game-room .lobby-create-settings {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: end;
}

.full-game-room .lobby-create-settings label,
.full-game-room .lobby-bet-editor {
    display: grid;
    gap: 5px;
}

.full-game-room .lobby-create-settings label span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.full-game-room .lobby-create-settings input,
.full-game-room .lobby-bet-editor input {
    width: 100%;
    min-width: 0;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(244, 241, 234, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
    font-weight: 900;
}

.full-game-room .lobby-create-settings small,
.full-game-room .lobby-bet-metric small {
    color: var(--text-muted);
    font-size: 11px;
}

.full-game-room .lobby-room-header h3 {
    margin: 2px 0 0;
    color: var(--text);
    letter-spacing: 0;
}

.full-game-room .lobby-room-metrics {
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(130px, 1fr));
    gap: 8px;
}

.full-game-room .lobby-room-metrics div {
    padding: 10px;
    border-radius: 8px;
}

.full-game-room .lobby-room-metrics span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 3px;
}

.full-game-room .lobby-bet-metric {
    min-width: 0;
}

.full-game-room .lobby-bet-editor {
    grid-template-columns: minmax(110px, 1fr) auto;
    align-items: center;
}

.full-game-room .lobby-bet-editor input {
    padding: 0 10px;
}

.full-game-room .lobby-state-note {
    padding: 10px 12px;
    border: 1px solid rgba(244, 241, 234, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.full-game-room .lobby-turn-panel {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(103, 166, 255, 0.28);
    border-radius: 8px;
    background: rgba(103, 166, 255, 0.08);
}

.full-game-room .lobby-results-mini {
    display: grid;
    gap: 8px;
}

.full-game-room .lobby-results-mini div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(244, 241, 234, 0.055);
}

.full-game-room .lobby-results-mini .win { color: var(--success); }
.full-game-room .lobby-results-mini .loss { color: var(--danger); }
.full-game-room .lobby-results-mini .draw { color: var(--warning); }

.full-game-room .lobby-result-table {
    width: min(520px, 100%);
    display: grid;
    gap: 8px;
    margin: 4px auto 8px;
}

.full-game-room .lobby-result-table div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border: 1px solid rgba(244, 241, 234, 0.12);
    border-radius: 8px;
    background: rgba(244, 241, 234, 0.06);
    font-size: 13px;
}

.full-game-room .lobby-result-table span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.full-game-room .lobby-result-table span b,
.full-game-room .lobby-result-table span small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.full-game-room .lobby-result-table span b {
    color: var(--text);
    font-size: 0.84rem;
}

.full-game-room .lobby-result-table span small {
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 2px;
}

.full-game-room .lobby-result-table .win strong { color: var(--success); }
.full-game-room .lobby-result-table .draw strong { color: var(--warning); }
.full-game-room .lobby-result-table .loss strong { color: var(--danger); }

.full-game-room .lobby-browser-panel {
    margin-top: 0;
    padding: 14px;
}

.full-game-room .lobby-list-item {
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
}

.full-game-room .game-board-panel {
    overflow: hidden;
}

.full-game-room .game-board-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 54%);
    transform: translateX(-80%);
}

.full-game-room .game-board-panel.is-playing::after,
.full-game-room .game-board-panel.coin-flip-running::after,
.full-game-room .game-board-panel.slot-roll-running::after,
.full-game-room .game-board-panel.roulette-spin-running::after,
.full-game-room .game-board-panel.number-reveal-running::after,
.full-game-room .game-board-panel.vault-open-running::after {
    opacity: 1;
    animation: game-board-scan 1.2s ease-in-out infinite;
}

@keyframes game-board-scan {
    0% { transform: translateX(-80%); opacity: 0; }
    18% { opacity: 0.7; }
    100% { transform: translateX(80%); opacity: 0; }
}

.coin-flip-armed .coinflip-wrapper {
    filter: drop-shadow(0 0 18px rgba(255, 215, 120, 0.32));
}

.coin-flip-running .coinflip-coin {
    animation: core-coin-spin 0.42s linear infinite;
}

@keyframes core-coin-spin {
    from { transform: rotateY(0deg) rotateZ(var(--coin-tilt, 0deg)) scale(1.08); }
    to { transform: rotateY(360deg) rotateZ(var(--coin-tilt, 0deg)) scale(1.08); }
}

.slots-premium-reel-strip {
    will-change: transform;
}

.slot-roll-running .slots-premium-reel {
    box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.08), 0 0 18px rgba(103, 166, 255, 0.22);
}

.roulette-spin-running .roulette-premium-wheel {
    will-change: transform;
}

.number-reveal-running .guess-premium-cell.scanning {
    transform: translateY(-4px) scale(1.06);
    border-color: rgba(103, 166, 255, 0.55);
    box-shadow: 0 0 18px rgba(103, 166, 255, 0.36);
}

.guess-premium-cell.picked {
    border-color: rgba(255, 214, 102, 0.72);
    box-shadow: 0 0 18px rgba(255, 214, 102, 0.28);
}

.vault-premium {
    position: relative;
}

.vault-spark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd666;
    pointer-events: none;
    animation: vault-spark 820ms ease-out forwards;
}

@keyframes vault-spark {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)), calc(-50% + var(--spark-y))) scale(0.05); }
}

.guess-premium-stage {
    width: min(100%, 680px);
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.guess-readout {
    min-height: 94px;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(8, 14, 24, 0.76);
    border: 1px solid rgba(103, 166, 255, 0.28);
    display: grid;
    gap: 0.35rem;
    align-content: center;
}

.guess-readout span,
.vault-status-panel span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.guess-readout strong,
.vault-status-panel strong {
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1;
}

.guess-readout small,
.vault-status-panel small,
.vault-status-panel em {
    color: var(--text-muted);
    font-style: normal;
}

.guess-premium-stage .guess-premium-grid {
    max-width: none;
    gap: 0.55rem;
}

.guess-premium-stage .guess-premium-cell {
    border-radius: 8px;
    border-width: 1px;
    color: rgba(255,255,255,0.64);
    font-size: clamp(1.55rem, 5vw, 2.8rem);
    cursor: pointer;
    background:
        radial-gradient(circle at 50% 0%, rgba(103, 166, 255, 0.16), transparent 68%),
        rgba(15, 23, 42, 0.84);
}

.guess-premium-stage .guess-premium-cell:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.32);
}

.guess-premium-cell.exact,
.guess-premium-cell.hit {
    background: radial-gradient(circle, #22c55e, #118144);
    border-color: #86efac;
    color: #fff;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.6), inset 0 0 20px rgba(255,255,255,0.24);
}

.guess-premium-cell.near {
    border-color: rgba(255, 226, 138, 0.72);
    color: #ffe28a;
}

.guess-premium-cell.save {
    border-color: rgba(103, 166, 255, 0.55);
    color: #9cc7ff;
}

.guess-premium-cell.miss {
    opacity: 0.45;
}

.guess-premium-cell.picked {
    border-color: rgba(255, 226, 138, 0.95);
    box-shadow: 0 0 0 2px rgba(255, 226, 138, 0.22), 0 0 24px rgba(255, 226, 138, 0.22);
}

.guess-meter {
    height: 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    position: relative;
}

.guess-meter-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #ffe28a, #22c55e);
    transition: width 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.guess-meter span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.guess-band-ladder {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.guess-band-ladder span {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
}

.vault-premium-layout {
    width: min(100%, 720px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(230px, 1fr);
    gap: 1.25rem;
    align-items: center;
}

.vault-premium-layout .vault-premium {
    width: min(280px, 74vw);
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
}

.vault-core-light {
    position: absolute;
    inset: 34%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 226, 138, 0.32), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.vault-premium.opened .vault-core-light {
    opacity: 1;
}

.vault-premium.locked {
    box-shadow: 0 30px 60px rgba(0,0,0,0.7), inset 0 0 40px rgba(0,0,0,0.9), 0 0 26px rgba(255, 91, 118, 0.22);
}

.vault-status-panel {
    min-height: 230px;
    padding: 1.1rem;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(115, 179, 106, 0.12), rgba(103, 166, 255, 0.08)),
        rgba(8, 14, 24, 0.82);
    border: 1px solid rgba(255,255,255,0.14);
    display: grid;
    gap: 0.72rem;
    align-content: center;
}

.vault-skill-meter {
    position: relative;
    height: 36px;
    border-radius: 999px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255, 91, 118, 0.2), rgba(255, 226, 138, 0.16), rgba(86, 211, 145, 0.18)),
        rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: inset 0 0 18px rgba(0,0,0,0.36);
}

.vault-skill-zone {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 46%;
    width: 8%;
    border-radius: 999px;
    background: linear-gradient(180deg, #e7ff91, #73b36a);
    box-shadow: 0 0 18px rgba(134, 239, 172, 0.56);
}

.vault-skill-marker {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0%;
    width: 7px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 14px rgba(255,255,255,0.82);
    transform: translateX(-50%);
}

.game-action-buttons [data-play-action^="open:"] {
    touch-action: manipulation;
}

.vault-tumbler-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
}

.vault-tumbler-track b {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.44);
    font-size: 1.35rem;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.vault-tumbler-track b.active {
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.72);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.22);
    transform: translateY(-3px);
}

.vault-tumbler-track b.failed {
    color: rgba(255,255,255,0.25);
    border-color: rgba(255, 91, 118, 0.28);
}

.vault-pressure {
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.vault-pressure-fill {
    width: 48%;
    height: 100%;
    background: linear-gradient(90deg, #73b36a, #ffe28a, #ff5b76);
    transition: width 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 760px) {
    .guess-band-ladder {
        grid-template-columns: repeat(2, 1fr);
    }

    .vault-premium-layout {
        grid-template-columns: 1fr;
    }

    .vault-status-panel {
        min-height: 190px;
    }
}

.card-flip-running .playing-card-3d {
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35));
}

.dice-face.front {
    padding: 8px;
    text-align: center;
    word-break: break-word;
    line-height: 1.15;
}

.dice-premium-stage {
    flex-wrap: wrap;
    gap: 1.25rem;
}

.dice-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(76px, 104px));
    gap: 0.9rem;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

.dice-pair .dice-3d {
    --dice-depth: 52px;
    width: min(104px, 23vw);
    height: min(104px, 23vw);
    min-width: 76px;
    min-height: 76px;
}

.dice-pair .dice-face {
    width: 100%;
    height: 100%;
    border-width: 4px;
    border-radius: 18px;
    font-size: clamp(3rem, 8vw, 4.55rem);
}

.dice-pair .dice-face.front { transform: translateZ(var(--dice-depth)); }
.dice-pair .dice-face.back { transform: rotateY(180deg) translateZ(var(--dice-depth)); }
.dice-pair .dice-face.right { transform: rotateY(90deg) translateZ(var(--dice-depth)); }
.dice-pair .dice-face.left { transform: rotateY(-90deg) translateZ(var(--dice-depth)); }
.dice-pair .dice-face.top { transform: rotateX(90deg) translateZ(var(--dice-depth)); }
.dice-pair .dice-face.bottom { transform: rotateX(-90deg) translateZ(var(--dice-depth)); }

.dice-rolling {
    filter: drop-shadow(0 18px 24px rgba(255, 226, 138, 0.18));
}

.dice-3d-wrapper small {
    min-height: 22px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.dice-duel-panel,
.hl-status-panel,
.carddraw-status-panel {
    width: min(100%, 240px);
    min-height: 190px;
    padding: 1rem;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03)),
        rgba(8, 14, 24, 0.84);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 16px 34px rgba(0,0,0,0.34);
    display: grid;
    gap: 0.55rem;
    align-content: center;
    text-align: center;
}

.dice-duel-panel span,
.hl-status-panel span,
.carddraw-status-panel span {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dice-duel-panel strong,
.hl-status-panel strong,
.carddraw-status-panel strong {
    font-size: 1.3rem;
    line-height: 1;
}

.dice-duel-panel small,
.hl-status-panel small,
.carddraw-status-panel small,
.hl-status-panel em {
    color: var(--text-muted);
    font-style: normal;
}

.dice-scoreline,
.carddraw-scoreline {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
}

.dice-scoreline b,
.carddraw-scoreline b {
    font-size: 1.55rem;
    color: #fff;
}

.dice-scoreline em,
.carddraw-scoreline em {
    color: var(--text-muted);
    font-style: normal;
    font-weight: 900;
}

.dice-duel-panel p,
.carddraw-status-panel p {
    min-height: 34px;
    margin: 0;
    color: rgba(255,255,255,0.78);
    font-weight: 800;
}

.dice-duel-panel.win,
.hl-status-panel.win,
.carddraw-status-panel.win {
    border-color: rgba(86, 211, 145, 0.58);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 28px rgba(86, 211, 145, 0.22);
}

.dice-duel-panel.loss,
.hl-status-panel.loss,
.carddraw-status-panel.loss {
    border-color: rgba(255, 91, 118, 0.42);
}

.dice-duel-panel.draw,
.carddraw-status-panel.draw {
    border-color: rgba(255, 226, 138, 0.5);
}

.hl-premium-layout,
.carddraw-premium-layout {
    width: min(100%, 760px);
    margin: 0 auto;
}

.hl-number-layout {
    width: min(100%, 820px);
}

.hl-number-stage {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(210px, 260px) minmax(130px, 1fr);
    gap: 1rem;
    align-items: center;
}

.hl-number-card {
    min-height: 190px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background:
        radial-gradient(circle at 50% 0%, rgba(103, 166, 255, 0.18), transparent 62%),
        rgba(8, 14, 24, 0.86);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 16px 34px rgba(0,0,0,0.34);
    display: grid;
    gap: 0.45rem;
    place-items: center;
    padding: 1rem;
    text-align: center;
}

.hl-number-card.core {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 226, 138, 0.16), transparent 62%),
        rgba(8, 14, 24, 0.86);
}

.hl-number-card span,
.hl-number-card small {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.hl-number-card strong {
    color: #fff;
    font-size: clamp(3.3rem, 9vw, 5.6rem);
    line-height: 0.9;
    text-shadow: 0 0 26px rgba(103, 166, 255, 0.26);
}

.hl-choice-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.hl-choice-buttons[hidden] {
    display: none;
}

.hl-premium-layout .card-premium-stage,
.carddraw-premium-layout .card-premium-stage {
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hl-status-panel {
    min-height: 230px;
}

.hl-chance-meter {
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.hl-chance-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff5b76, #ffe28a, #56d391);
    transition: width 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hl-status-panel b {
    justify-self: center;
    min-width: 74px;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #ffe28a;
    font-size: 1.15rem;
}

.hl-status-panel.safe { border-color: rgba(86, 211, 145, 0.48); }
.hl-status-panel.balanced { border-color: rgba(255, 226, 138, 0.48); }
.hl-status-panel.danger { border-color: rgba(255, 91, 118, 0.48); }

.card-face-rank,
.card-face-suit {
    display: block;
    line-height: 1;
}

.hl-premium-layout .playing-card-front,
.carddraw-premium-layout .playing-card-front {
    flex-direction: column;
}

.card-face-suit {
    margin-top: 0.35rem;
    font-size: 0.54em;
}

.card-face-suit.red {
    color: #ef4444;
}

.carddraw-status-panel.critical {
    border-color: rgba(255, 226, 138, 0.74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 0 30px rgba(255, 226, 138, 0.26);
}

@media (max-width: 760px) {
    .dice-premium-stage,
    .hl-premium-layout .card-premium-stage,
    .carddraw-premium-layout .card-premium-stage {
        gap: 1rem;
    }

    .dice-duel-panel,
    .hl-status-panel,
    .carddraw-status-panel {
        order: 3;
        width: min(100%, 360px);
        min-height: 160px;
    }

    .hl-premium-layout .playing-card-3d,
    .carddraw-premium-layout .playing-card-3d {
        width: 112px;
        height: 160px;
    }

    .hl-premium-layout .playing-card-front,
    .carddraw-premium-layout .playing-card-front {
        font-size: 3.3rem;
    }

    .dice-pair {
        grid-template-columns: repeat(2, minmax(70px, 88px));
        gap: 0.65rem;
    }

    .dice-pair .dice-3d {
        --dice-depth: 44px;
        width: min(88px, 28vw);
        height: min(88px, 28vw);
    }

    .hl-number-stage {
        grid-template-columns: 1fr;
    }

    .hl-number-card {
        min-height: 150px;
    }
}

.full-game-room .player-kick-btn {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 82, 82, 0.34);
    border-radius: 8px;
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.full-game-room .player-kick-btn:hover,
.full-game-room .btn-danger-soft:hover {
    border-color: rgba(255, 82, 82, 0.62);
    background: rgba(255, 82, 82, 0.18);
}

.full-game-room .btn-danger-soft {
    border-color: rgba(255, 82, 82, 0.34);
    color: var(--danger);
}

.draw-text {
    color: var(--warning);
}

@media (max-width: 1240px) {
    .games-hub-page .games-hero,
    .full-game-room .rich-game-header,
    .full-game-room .game-room-layout,
    .full-game-room .game-action-panel {
        grid-template-columns: 1fr;
    }

    .full-game-room .game-action-panel .amount-preview,
    .full-game-room .game-action-panel .game-playbook,
    .full-game-room .game-action-panel .game-action-cluster {
        grid-column: auto;
        grid-row: auto;
    }

    .full-game-room .game-action-buttons {
        justify-content: flex-start;
        grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    }
}

@media (max-width: 760px) {
    .games-hub-page .games-hero,
    .full-game-room .game-room-content,
    .full-game-room .rich-game-header {
        padding: 12px;
    }

    .games-hub-page .games-metrics,
    .game-card-playbook,
    .featured-playbook,
    .rules-playbook,
    .rules-modal-grid,
    .rules-guide-list,
    .full-game-room .game-header-stats,
    .full-game-room .lobby-room-metrics,
    .full-game-room .lobby-turn-panel,
    .full-game-room .lobby-code-join {
        grid-template-columns: 1fr;
    }

    .full-game-room .game-board-panel {
        min-height: 330px;
    }

    .action-preview-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .action-preview-head strong {
        max-width: 100%;
        text-align: left;
    }

    .action-preview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
