:root {
    /* Color system */
    --clr-bg: #0f1321;
    --clr-bg-deep: #0b0d19;
    --clr-surface: rgba(255, 255, 255, 0.05);
    --clr-border: rgba(255, 255, 255, 0.08);
    --clr-text: #f3f4f8;
    --clr-text-muted: #d8e3ff;
    --clr-text-dim: #aec4ff;
    /* Accent colors */
    --clr-orange: #ffa053;
    --clr-orange-dk: #ff7200;
    --clr-blue: #6d7cff;
    --clr-blue-dk: #3f58ff;
    --clr-green: #35c759;
    --clr-green-dk: #2b9e44;
    --clr-red: #ff5e65;
    --clr-red-dk: #d7263d;
    --clr-gold: #ffd67a;
    /* Radius scale */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-full: 999px;
    /* Shadows */
    --sh-btn: 0 18px 30px -20px rgba(255, 136, 0, 0.9);
    --sh-card: 0 14px 35px rgba(0, 0, 0, 0.22);
    --sh-modal: 0 24px 80px rgba(0, 0, 0, 0.62);
}

html {
    scroll-behavior: smooth;
}

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

html, body {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    position: relative;
    overflow: hidden;
    background-image: url('slot-bg.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image .6s ease, background-position .6s ease, background-size .6s ease;
    color: #f3f4f8;
}

body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(106, 188, 255, 0.18), transparent 18%),
                radial-gradient(circle at 85% 25%, rgba(255, 142, 72, 0.12), transparent 16%),
                radial-gradient(circle at 50% 80%, rgba(93, 207, 161, 0.12), transparent 22%);
    opacity: 1;
    pointer-events: none;
    animation: glowPulse 12s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.65;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.container {
    width: 100%;
    max-width: none;
    height: calc(100vh - 2rem);
    margin: 1rem auto;
    padding: 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(15, 19, 33, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: background-image .8s ease, background-color .6s ease;
}

.admin-shell {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 1rem;
    align-items: start;
}

.admin-sidebar {
    background: rgba(9, 13, 25, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
    align-self: start;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.07);
    padding: 0.6rem;
}

.sidebar-brand-subtitle {
    font-size: 0.86rem;
    color: #aec4ff;
}

.sidebar-nav {
    display: grid;
    gap: 0.55rem;
}

.sidebar-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: #d8e3ff;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.admin-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.3rem;
}

.topbar-subtitle {
    margin: 0.35rem 0 0;
    color: #c6d4ff;
    font-size: 0.95rem;
}

.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-content section {
    padding: 1.25rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.overview-card {
    padding: 1.25rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.overview-card h3 {
    margin-top: 0;
}

.overview-chart {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.overview-chart-canvas-wrap {
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.02);
    border-radius: 24px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.overview-chart-legend {
    display: grid;
    gap: 0.75rem;
    max-width: 260px;
}

.overview-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #fff;
}

.overview-chart-legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    flex-shrink: 0;
    display: inline-block;
}

.overview-chart-legend-label {
    flex: 1;
    color: #d7d7d7;
}

.overview-chart-legend-value {
    white-space: nowrap;
}

@media (max-width: 860px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

.page-background-preview {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.page-background-preview-image {
    width: 100%;
    display: block;
    object-fit: cover;
}

.page-background-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.72) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45);
    pointer-events: none;
}

#user-table {
    position: relative;
}

.section-modal-overlay,
.delete-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1200;
    place-items: center;
    padding: 1.5rem;
}

.section-modal-overlay[aria-hidden="false"],
.delete-modal-overlay[aria-hidden="false"] {
    display: grid;
}

.section-modal-overlay .modal,
.delete-modal-overlay .modal {
    max-width: 560px;
    width: 100%;
}





.admin-footer {
    padding: 1rem 1.25rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #d3dff9;
    font-size: 0.95rem;
}

.admin-container {
    width: 100%;
    max-width: none;
    height: 100vh;
    margin: 0;
    padding: 1.25rem;
    border-radius: 0;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: static;
        top: auto;
    }
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    place-items: center;
    padding: 1rem;
}

.modal-overlay[aria-hidden="false"] {
    display: grid;
}

.section-modal-overlay {
    position: absolute;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.72);
    z-index: 20;
    place-items: center;
    padding: 1.5rem;
}

.section-modal-overlay[aria-hidden="false"] {
    display: grid;
}

.section-modal-overlay .modal {
    max-width: 560px;
    width: 100%;
}

.modal {
    width: min(520px, 100%);
    background: rgba(15, 19, 33, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    border: none;
    background: transparent;
    color: #f9fafb;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
}

.modal-body p {
    margin: 0.75rem 0 0;
}

.modal-body .message {
    margin-bottom: 1rem;
}

.favorite-machine-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

@media (max-width: 700px) {
    .favorite-machine-grid {
        grid-template-columns: 1fr;
    }
}

.favorite-machine-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.favorite-machine-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.favorite-machine-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

.favorite-machine-card-image {
    min-height: 140px;
    background-color: #1f2937;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    opacity: 0.94;
}

.favorite-machine-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.18));
    pointer-events: none;
}

.favorite-machine-card-body {
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
}

.favorite-machine-card-body h3 {
    margin: 0;
    font-size: 1rem;
}

.favorite-machine-card-body p {
    margin: 0;
    color: #d1d5db;
    font-size: 0.95rem;
}

.favorite-machine-card-meta {
    font-size: 0.88rem;
    color: #a1aab9;
}

.login-modal-body {
    display: grid;
    grid-template-columns: minmax(180px, 230px) minmax(260px, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.login-modal-main {
    display: grid;
    gap: 0.75rem;
}

.login-brand-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-width: 0;
}

.login-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.09);
    padding: 0.35rem;
}

.login-brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fbff;
}

.login-brand-label {
    font-size: 0.9rem;
    color: #cfd8ff;
}

.login-modal-form {
    display: grid;
    gap: 0.85rem;
}

.modal-body label {
    display: grid;
    gap: 0.35rem;
}

@media (max-width: 720px) {
    .login-modal-body {
        grid-template-columns: 1fr;
    }
}

.container::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.container {
    -ms-overflow-style: none;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    align-items: start;
    grid-auto-rows: minmax(min-content, max-content);
    margin-bottom: 1rem;
}

.filter-form label {
    display: grid;
    gap: 0.4rem;
    width: 100%;
}

.filter-form .button {
    align-self: start;
}

.filter-form--compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.filter-form--compact label {
    gap: 0.3rem;
}

.filter-form--compact .filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

header, footer {
    text-align: center;
    margin-bottom: 1.5rem;
}

.home-machine-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.home-machine-info h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.home-machine-info p {
    margin: 0.25rem 0;
    color: #dbe9ff;
}

a.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffa053, #ff7200);
    color: #111;
    border: none;
    padding: .85rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 18px 30px -20px rgba(255, 136, 0, 0.9);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

a.button:hover, button:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 35px -22px rgba(255, 136, 0, 0.95);
}

a.button:disabled, button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-danger,
button.button-danger {
    background: linear-gradient(135deg, #ff5e65, #d7263d);
    color: #111;
}

a.button.button-success,
button.button-success {
    background: linear-gradient(135deg, #35c759, #2b9e44) !important;
    color: #fff;
}

.button-secondary {
    background: linear-gradient(135deg, #6d7cff, #3f58ff);
    color: #fff;
}

.favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.favorite-toggle.favorite-active {
    color: #ffd700;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 215, 0, 0.35);
}

.favorite-toggle.favorite-active:hover {
    transform: translateY(-1px);
    background: rgba(255, 235, 120, 0.18);
}

.favorite-toggle.favorite-inactive {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.favorite-toggle.favorite-inactive:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
}

.favorite-card-button {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 2;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.edit-machine-panel {
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color .3s ease, box-shadow .3s ease, background-color .3s ease;
}

.edit-machine-panel.active {
    border-color: rgba(255, 184, 50, 0.9);
    box-shadow: 0 0 0 2px rgba(255, 184, 50, 0.18);
    background: rgba(255, 221, 153, 0.12);
}

.image-preview-container {
    position: relative;
}

.image-preview-container img {
    display: block;
    width: 100%;
    border-radius: 14px;
}

.image-preview-container .image-preview-overlay {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    pointer-events: none;
    transition: background 0.2s ease;
}

.edit-machine-panel label {
    min-width: 180px;
}

.machine-rule-preview {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.machine-rule-preview h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.machine-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 184, 50, 0.16);
    color: #ffe8b3;
    border: 1px solid rgba(255, 184, 50, 0.35);
    font-size: 0.96rem;
    margin: 0;
}

.symbol-preview-panel {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

.symbol-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
}

.symbol-preview-item {
    text-align: center;
    padding: 0.75rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.symbol-preview-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.5rem;
}

.symbol-preview-label {
    color: #dbe9ff;
    font-size: 0.9rem;
}

.rule-preview-row {
    margin-bottom: 0.65rem;
    color: #e4f2ff;
}

.rule-preview-list {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
    list-style: disc;
}

.rule-preview-list li {
    margin-bottom: 0.3rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

td, th {
    padding: .8rem;
    border-bottom: 1px solid #333;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea:not(.cke_source), select, input[type="file"], input[type="color"] {
    width: 100%;
    padding: .9rem 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #f9fafb;
    margin-top: .5rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

select, select option {
    background: rgba(15, 23, 39, 0.95);
    color: #f9fafb;
}

select option:hover,
select option:focus {
    background: rgba(96, 165, 250, 0.2);
    color: #ffffff;
}

textarea:not(.cke_source) {
    min-height: 9rem;
    resize: vertical;
}

input[type="file"], input[type="color"] {
    padding: .75rem 1rem;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, textarea:not(.cke_source):focus, select:focus, input[type="file"]:focus, input[type="color"]:focus {
    outline: none;
    border-color: rgba(255, 152, 0, 0.75);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.12);
}

#bet {
    width: 140px;
    max-width: 160px;
}

.inline-form {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin: 0;
}

.inline-form input,
.inline-form select {
    width: auto;
    min-width: 100px;
}

.background-input-disabled {
    opacity: 0.48;
}

.background-input-disabled input {
    cursor: not-allowed;
}

.background-input-disabled input[type="color"] {
    background-color: #1f2739;
}

.line-selection {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0.7rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    margin: 0.75rem 0;
    background: rgba(255, 255, 255, 0.05);
}

.line-selection legend {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.line-selection label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message {
        padding: 0.65rem 0.9rem;
        margin: 0;
        border-radius: 10px;
        min-height: 2.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
        word-break: break-word;
    }

    .message.success {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        background: #194d0f;
        color: #d4ffd4;
        max-width: 220px;
        justify-self: center;
        width: 100%;
    }

    .message.success .user-role {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .message.error {
        background: #5d1515;
        color: #ffcdd2;
    }
.slot-machine {
    position: relative;
    background: radial-gradient(circle at top, rgba(255,255,255,0.14), rgba(255,255,255,0.02) 30%),
                linear-gradient(180deg, rgba(13, 19, 38, 0.98), rgba(10, 13, 25, 0.97));
    border: 1px solid rgba(118, 186, 255, 0.22);
    border-radius: 30px;
    padding: 1.4rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 24px 60px rgba(0, 0, 0, 0.35);
}

.slot-header {
    text-align: center;
    margin-bottom: 1rem;
}

.machine-select-row {
    margin-top: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
}

.machine-select-row label {
    font-size: 0.95rem;
    color: #cbd6ff;
}

.machine-select-row select {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f3f4f8;
}

.machine-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0 0;
}

.page-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.sidebar-panel {
    position: sticky;
    top: 1rem;
    align-self: start;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(15, 19, 33, 0.92);
    display: grid;
    gap: 1rem;
    min-height: fit-content;
}

.sidebar-panel.collapsed {
    width: 72px;
    min-width: 72px;
    padding: 0.75rem 0.5rem;
}

.sidebar-panel.collapsed .sidebar-content {
    display: none;
}

.sidebar-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f3f4f8;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.sidebar-title {
    margin: 0;
    font-size: 0.95rem;
    color: #b8c6ff;
}

.sidebar-actions {
    display: grid;
    gap: 0.75rem;
    justify-items: start;
}

.sidebar-actions a,
.sidebar-actions button {
    width: auto;
    text-align: left;
}

.sidebar-link {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 0.55rem 0.8rem;
    border-radius: 16px;
    font-size: 0.95rem;
    text-decoration: none;
    color: #f3f4f8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
}

.main-panel {
    min-width: 0;
}

@media (max-width: 900px) {
    html, body {
        height: 100dvh;
        width: 100%;
        overflow: hidden;
    }
    body {
        align-items: stretch;
        justify-content: stretch;
    }
    .container {
        padding: 0.75rem;
        margin: 0;
        height: 100dvh;
        width: 100%;
        border-radius: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }
    .page-layout {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        align-items: stretch;
        gap: 0;
    }
    .sidebar-panel {
        position: static;
        align-self: auto;
        width: 100%;
        min-width: auto;
        flex-shrink: 0;
    }
    .sidebar-panel.collapsed {
        width: 100%;
        padding: 0.5rem 1rem;
    }
    .main-panel {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        flex: 1;
    }
    .main-panel > header {
        display: none;
    }
    .slot-machine {
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    .slot-grid {
        width: 100%;
        max-width: 100%;
    }
    .input-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    .input-group {
        min-width: 0;
        width: 100%;
    }
    .input-group input[type="number"],
    .input-group select {
        width: 100%;
    }
    .line-selection {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .action-row .action-button,
    .action-row .audio-status {
        min-width: 0;
        flex: 1 1 0;
        white-space: normal;
        font-size: 0.82rem;
        padding: 0.55rem 0.5rem;
    }
    .controls-panel {
        padding: 0.5rem 0;
    }
    .spin-form {
        gap: 0.4rem;
    }
}

.machine-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.machine-card:hover,
.machine-card.active,
.machine-card-link:hover,
.machine-card-link.active {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}

.machine-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.button-card-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
}

.machine-card-image {
    min-height: 120px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 55%);
    background-size: cover;
    background-position: center;
}

.machine-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    background: rgba(70, 196, 255, 0.18);
    border: 1px solid rgba(70, 196, 255, 0.24);
    margin-bottom: 0.5rem;
}

.machine-badge.active {
    background: rgba(102, 255, 156, 0.16);
    border-color: rgba(102, 255, 156, 0.28);
    color: #e8ffeb;
}

.machine-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
}

.machine-card-body h3 {
    margin: 0;
    font-size: 1rem;
}

.machine-card-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.4;
}

.machine-card-body .button {
    display: block;
    margin: 1rem auto 0;
}

.machine-card-meta {
    font-size: 0.92rem;
    color: #dbe9ff;
}

.select-machine-button {
    justify-self: start;
    padding: 0.7rem 1rem;
    background: rgba(92, 160, 255, 0.15);
    border: 1px solid rgba(92, 160, 255, 0.2);
    color: #e7f3ff;
}

.select-machine-button:hover {
    background: rgba(92, 160, 255, 0.25);
}

.slot-title-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    justify-content: center;
}

.title-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.title-info-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
}

.machine-info {
    background: rgba(12, 18, 38, 0.92);
    border: 1px solid rgba(118, 186, 255, 0.18);
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: grid;
    gap: 0.75rem;
}
.machine-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.info-button {
    padding: 0.85rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 112, 255, 0.14);
    color: #e7f3ff;
    font-weight: 700;
    letter-spacing: .01em;
    transition: transform .2s ease, background .2s ease;
}
.info-button:hover {
    transform: translateY(-1px);
    background: rgba(0, 112, 255, 0.22);
}
.audio-status {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #c8e8ff;
    margin-left: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    appearance: none;
    background-clip: padding-box;
}
.audio-status-icon {
    margin-right: 0.35rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.audio-status.audio-off {
    color: #ffcccb;
    background: rgba(255, 82, 82, 0.12);
    border-color: rgba(255, 82, 82, 0.18);
}
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.68);
    z-index: 50;
    padding: 1rem;
}
.modal-window {
    max-width: 520px;
    width: 100%;
    background: rgba(15, 19, 33, 0.98);
    border: 1px solid rgba(118, 186, 255, 0.18);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #fff;
}
.modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.modal-body {
    padding: 1rem 1.25rem 1.5rem;
    color: #dde7ff;
    line-height: 1.6;
}
.paytable-list {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
    list-style: disc;
}
.paytable-list li {
    margin-bottom: 0.55rem;
}

.machine-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255,255,255,0.82);
    font-size: 0.95rem;
}

.machine-label {
    color: #a7d4ff;
    font-weight: 700;
}

.machine-odds {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 0.5rem;
}

.odds-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 0.65rem 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: #f4f6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.symbol-badge {
    width: 24px;
    height: 24px;
}

.line-symbol {
    width: 20px;
    height: 20px;
    margin: 0 0.15rem;
    vertical-align: middle;
}

.line-symbol-row {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.5rem;
}

.history-symbol-row {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.history-symbol {
    width: 18px;
    height: 18px;
}

.slot-title {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
    color: #fff;
}

.slot-subtitle {
    color: rgba(255,255,255,0.72);
    font-size: 0.82rem;
}

.controls-panel {
    display: flex;
    justify-content: center;
    z-index: 2;
    background: rgba(15, 19, 33, 0.94);
    padding: 0.75rem 0;
    margin: 0.8rem auto 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 540px;
}

.spin-form {
    width: 100%;
    max-width: 500px;
    display: grid;
    gap: 0.6rem;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
    min-width: 0;
}

.balance-display {
    justify-self: end;
    min-width: 0;
}

.total-bet-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffd07f;
    overflow-wrap: anywhere;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.8rem;
}

.action-row .action-button {
    width: auto;
    flex: 1 1 110px;
    min-width: 112px;
    padding: 0.65rem 0.8rem;
    font-size: 0.88rem;
}

.action-row .audio-status {
    flex: 1 1 120px;
    min-width: 104px;
}

@media (max-width: 720px) {
    .controls-panel {
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .spin-form {
        max-width: 100%;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .balance-display {
        justify-self: start;
    }

    .action-row {
        justify-content: stretch;
    }

    .action-row .action-button,
    .action-row .audio-status {
        min-width: 0;
        flex: 1 1 auto;
    }
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 0.9rem 0 0.4rem;
    background: linear-gradient(180deg, rgba(15,19,33,0.96), rgba(15,19,33,0.2));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}


.spin-button {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font-size: 0.92rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.8rem;
}

.action-row .action-button {
    width: auto;
    flex: 1 1 110px;
    min-width: 120px;
    padding: 0.65rem 0.8rem;
    font-size: 0.88rem;
}

.action-row .audio-status {
    flex: 0 0 auto;
    min-width: 120px;
}

.autoplay-range-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.autoplay-range-value {
    min-width: 3.5rem;
    text-align: right;
    font-weight: 700;
    color: #fff;
}

.autoplay-range {
    width: 100%;
}

.modal-body input[type="range"] {
    width: 100%;
    accent-color: #5b9cff;
}

.slot-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.18rem;
    margin: 0.8rem auto;
    max-width: 500px;
    padding: 0.35rem;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 35%),
                linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
}

.slot-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--reel-background-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: var(--reel-background-image-opacity, 0.35);
    pointer-events: none;
    z-index: 0;
}

.slot-grid > .slot-reel {
    position: relative;
    z-index: 1;
}

.reels-area {
    position: relative;
    --reel-background-image: none;
    --reel-background-image-opacity: 0.35;
}

.reels-area > .slot-reel {
    position: relative;
    z-index: 1;
}

.reel-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: auto;
    max-height: none;
    height: auto;
    background: var(--slot-cell-background, linear-gradient(180deg, var(--slot-cell-color-1, #111726), var(--slot-cell-color-2, #152135)));
    background-image: var(--reel-background-image), var(--slot-cell-background, linear-gradient(180deg, var(--slot-cell-color-1, #111726), var(--slot-cell-color-2, #152135)));
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-blend-mode: normal;
}

.slot-machine[data-reel-background-active="true"] .reel-viewport {
    background-color: rgba(0, 0, 0, 0.16);
}

.payline-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.payline-line {
    position: absolute;
    width: 100%;
    height: 4px;
    background: rgba(255, 214, 122, 0.95);
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.payline-line.active {
    opacity: 1;
}

.payline-line[data-line="Diagonal TL-BR"],
.payline-line[data-line="Diagonal BL-TR"] {
    width: 140%;
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.payline-line[data-line="Diagonal TL-BR"] {
    transform: translate(-50%, -50%) rotate(45deg);
}

.payline-line[data-line="Diagonal BL-TR"] {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.slot-cell {
    background: linear-gradient(180deg, var(--slot-cell-color-1, #111726), var(--slot-cell-color-2, #152135));
    border: none;
    border-radius: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 0.25rem;
    box-sizing: border-box;
}

.slot-reel {
    overflow: hidden;
}

.slot-machine[data-reel-background-active="true"] .slot-grid {
    background: rgba(0, 0, 0, 0.12) !important;
}

.slot-machine[data-reel-background-active="true"] .slot-cell {
    background: rgba(17, 23, 38, 0.28) !important;
}

.reel-strip {
    display: grid;
    gap: 0;
    grid-auto-rows: minmax(0, 1fr);
    width: 100%;
    height: 100%;
}

.reel-viewport::before,
.reel-viewport::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 0.75rem;
    background: inherit;
    pointer-events: none;
    z-index: 2;
}

.reel-viewport::before {
    top: 0;
}

.reel-viewport::after {
    bottom: 0;
}

.reel-strip {
    display: grid;
    gap: 0;
    grid-auto-rows: 1fr;
    transform: translateY(0);
    will-change: transform;
}

.reel-strip .slot-cell {
    aspect-ratio: auto;
}

.slot-machine[data-cell-transparent="true"] .slot-cell {
    background: transparent;
}

.slot-machine[data-cell-transparent="true"] .reel-viewport::before,
.slot-machine[data-cell-transparent="true"] .reel-viewport::after {
    background: inherit;
}

.reel-strip.animating {
    transition: transform 0.85s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.slot-cell.win {
    border-color: #ffd67a;
    box-shadow: 0 0 0 3px rgba(255, 214, 122, 0.35), inset 0 0 20px rgba(255,255,255,0.12);
    transform: scale(1.02);
}

.slot-cell img {
        width: auto;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
        margin: 0 auto;
}

.slot-cell.spinning {
    animation: slot-spin 0.18s ease-in-out infinite;
    background: linear-gradient(180deg, #ffe3a6, #ff9e4f);
    color: #111;
    box-shadow: 0 24px 40px rgba(255, 166, 0, 0.3), inset 0 0 30px rgba(255,255,255,0.18);
}

@keyframes slot-spin {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

@media (max-height: 820px) {
    .container {
        padding: 0.45rem;
        max-height: calc(100vh - 0.75rem);
    }

    .slot-machine {
        padding: 1rem;
    }

    .slot-title {
        font-size: clamp(1.2rem, 3vw, 1.7rem);
    }

    .slot-subtitle {
        font-size: 0.74rem;
    }

    .spin-form {
        gap: 0.45rem;
    }

    .line-selection {
        gap: 0.4rem;
        padding: 0.55rem;
    }

    .line-selection label,
    .input-group label {
        font-size: 0.84rem;
    }

    input[type="number"] {
        padding: 0.7rem 0.8rem;
    }

    .spin-button {
        padding: 0.65rem 0.8rem;
        font-size: 0.88rem;
    }

    .slot-grid {
        gap: 0.35rem;
        padding: 0.45rem;
    }

    .slot-cell {
        padding: 0.45rem;
        font-size: 1rem;
        border-radius: 14px;
    }

    .slot-cell img {
        width: 86%;
        height: 86%;
        max-width: 86%;
        max-height: 86%;
        object-fit: contain;
        display: block;
    }

    .nav-links {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }
}

@media (max-height: 700px) {
    .container {
        max-width: 780px;
        padding: 0.35rem;
    }

    .slot-machine {
        padding: 0.85rem;
    }

    .slot-title {
        font-size: 1.4rem;
    }

    .slot-subtitle {
        font-size: 0.72rem;
    }

    .slot-cell {
        padding: 0.4rem;
        font-size: 0.95rem;
    }

    .slot-cell img {
        width: 82%;
        height: 82%;
        max-width: 82%;
        max-height: 82%;
        object-fit: contain;
        display: block;
    }

    .line-selection {
        grid-template-columns: repeat(1, minmax(120px, 1fr));
    }
}

@media (max-height: 820px) {
}

@media (max-height: 760px) {
    .slot-grid {
        gap: 0.3rem;
        padding: 0.35rem;
    }
    .slot-cell {
        padding: 0.4rem;
    }
    .slot-cell img {
        width: 80%;
        height: 80%;
        max-width: 80%;
        max-height: 80%;
        object-fit: contain;
        display: block;
    }
}

/* ============================================================
   GOOGLE FONTS — loaded via @import so pages without a <link>
   still get Inter automatically.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   SITE NAVBAR
   ============================================================ */
.site-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    margin-bottom: 1.25rem;
    background: rgba(9, 13, 25, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-lg);
    gap: 0.75rem;
    flex-wrap: wrap;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}
.site-navbar-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.07);
    padding: 0.35rem;
    flex-shrink: 0;
}
.site-navbar-brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
}
.site-navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}
.site-navbar-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--r-full);
    background: rgba(12, 30, 66, 0.92);
    border: 1px solid rgba(88, 149, 255, 0.22);
    font-size: 0.9rem;
    color: #eaf4ff;
    font-weight: 600;
    white-space: nowrap;
}
.site-navbar-balance strong {
    color: var(--clr-gold);
}
.site-navbar-btn {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    box-shadow: none;
}
.site-navbar-btn:hover {
    box-shadow: none;
}
.site-navbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f3f4f8;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}
.site-navbar-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-orange), var(--clr-blue));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.navbar-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(9, 13, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--r-md);
    box-shadow: var(--sh-modal);
    min-width: 200px;
    overflow: hidden;
    display: none;
    z-index: 200;
}
.navbar-dropdown.open {
    display: block;
}
.navbar-dropdown a,
.navbar-dropdown button.navbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1rem;
    color: #d8e3ff;
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    letter-spacing: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.navbar-dropdown a:hover,
.navbar-dropdown button.navbar-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: none;
    box-shadow: none;
}
.navbar-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.25rem 0;
}
@media (max-width: 600px) {
    .site-navbar {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }
    .site-navbar-balance {
        display: none;
    }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    position: relative;
    padding: 3rem 2rem 2.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--r-lg);
    background: radial-gradient(ellipse at 20% 50%, rgba(106, 188, 255, 0.1), transparent 55%),
                radial-gradient(ellipse at 80% 30%, rgba(255, 142, 72, 0.12), transparent 55%),
                linear-gradient(145deg, rgba(13, 17, 35, 0.98), rgba(9, 12, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    text-align: center;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M20 20h-2v2h2v-2zm2 0h-2v2h2v-2zM20 18h-2v2h2v-2z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--r-full);
    background: rgba(255, 160, 83, 0.1);
    border: 1px solid rgba(255, 160, 83, 0.28);
    color: #ffc98e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin: 0 0 0.75rem;
    background: linear-gradient(135deg, #ffffff 25%, #ffa053 65%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.62);
    margin: 0 auto 2rem;
    max-width: 500px;
    line-height: 1.65;
}
.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.hero-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--clr-gold);
    display: block;
}
.hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.2rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
@media (max-width: 600px) {
    .hero-section {
        padding: 2rem 1.25rem 1.75rem;
    }
    .hero-stats {
        gap: 1.5rem;
    }
}

/* ============================================================
   CATEGORY FILTER TABS
   ============================================================ */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 1.25rem;
}
.category-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: var(--r-full);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    box-shadow: none;
    letter-spacing: 0;
}
.category-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: none;
}
.category-tab.active {
    background: linear-gradient(135deg, rgba(255, 160, 83, 0.22), rgba(255, 114, 0, 0.15));
    border-color: rgba(255, 160, 83, 0.45);
    color: #ffcf9e;
}

/* ============================================================
   IMPROVED MACHINE CARD
   ============================================================ */
.machine-card-image-wrap {
    position: relative;
    overflow: hidden;
}
.machine-card-image {
    min-height: 150px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 55%);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}
.machine-card:hover .machine-card-image {
    transform: scale(1.04);
}
.machine-card-badges {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 2;
}
.mc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.55rem;
    border-radius: var(--r-full);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.mc-badge-hot {
    background: rgba(255, 80, 50, 0.85);
    color: #fff;
}
.mc-badge-new {
    background: rgba(53, 199, 89, 0.85);
    color: #fff;
}
.mc-badge-free {
    background: rgba(109, 124, 255, 0.85);
    color: #fff;
}
.machine-card-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.4rem;
    flex: 1;
}
.machine-card-body h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
}
.machine-card-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.84rem;
    line-height: 1.4;
}
.machine-card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.machine-cat-tag {
    padding: 0.18rem 0.55rem;
    border-radius: var(--r-full);
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}
.machine-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 0.5rem;
}
.machine-card-minbet {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}
.machine-card-play-btn {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    box-shadow: none;
    border-radius: var(--r-full);
}
.machine-card-play-btn:hover {
    box-shadow: none;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    background: rgba(12, 18, 40, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #f3f4f8;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 260px;
    max-width: 340px;
    pointer-events: all;
    animation: toastIn 0.28s ease-out;
    line-height: 1.4;
}
.toast.toast-success { border-color: rgba(53, 199, 89, 0.35); }
.toast.toast-error { border-color: rgba(255, 94, 101, 0.35); }
.toast.toast-info { border-color: rgba(109, 124, 255, 0.35); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.toast-message { flex: 1; }
.toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.05rem;
    box-shadow: none;
    border-radius: 0;
    min-width: auto;
    height: auto;
}
.toast-close:hover { color: #fff; transform: none; box-shadow: none; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(16px) scale(0.97); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(16px); }
}
.toast.removing { animation: toastOut 0.22s ease-in forwards; }

/* ============================================================
   SITE FOOTER (responsible gambling)
   ============================================================ */
.site-footer {
    margin-top: 2.5rem;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: var(--r-lg);
    background: rgba(9, 13, 25, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.site-footer-age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    font-size: 0.72rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 auto 1rem;
}
.site-footer-disclaimer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.65;
    max-width: 620px;
    margin: 0 auto 1.1rem;
}
.site-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1.1rem;
}
.site-footer-links a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    transition: color 0.15s ease;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    font-weight: 400;
    letter-spacing: 0;
}
.site-footer-links a:hover { color: rgba(255, 255, 255, 0.7); transform: none; box-shadow: none; }
.site-footer-copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.22);
}

/* ============================================================
   AUTH (LOGIN / REGISTER) SPLIT LAYOUT
   ============================================================ */
.auth-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 2rem);
    padding: 1rem 0;
}
.auth-card {
    width: min(860px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: rgba(13, 17, 32, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--sh-modal);
}
.auth-branding {
    background:
        radial-gradient(ellipse at 25% 40%, rgba(106, 188, 255, 0.14), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 142, 72, 0.18), transparent 60%),
        linear-gradient(150deg, #080c1c, #0e1528);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}
.auth-branding::after {
    content: '🎰';
    position: absolute;
    font-size: 15rem;
    opacity: 0.04;
    bottom: -3rem;
    left: -2rem;
    line-height: 1;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}
.auth-brand-top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.auth-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.38rem;
    flex-shrink: 0;
}
.auth-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}
.auth-branding-headline {
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 900;
    line-height: 1.15;
    background: linear-gradient(135deg, #fff 35%, var(--clr-orange) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 0.6rem;
}
.auth-branding-sub {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    margin: 0;
}
.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}
.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.68);
}
.auth-feature-list li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: rgba(53, 199, 89, 0.16);
    color: #35c759;
    font-size: 0.68rem;
    font-weight: 900;
    flex-shrink: 0;
}
.auth-form-panel {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}
.auth-form-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 0.3rem;
    color: #fff;
}
.auth-form-subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.48);
    margin: 0 0 1.75rem;
}
.auth-form {
    display: grid;
    gap: 0.9rem;
}
.auth-form label {
    display: grid;
    gap: 0.28rem;
    font-size: 0.87rem;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 500;
}
.auth-form label input {
    margin-top: 0;
    font-size: 0.95rem;
}
.auth-message {
    display: none;
    padding: 0.65rem 0.9rem;
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
}
.auth-message.error {
    display: flex;
    background: rgba(93, 21, 21, 0.8);
    color: #ffcdd2;
    border: 1px solid rgba(255, 94, 101, 0.25);
}
.auth-message.success {
    display: flex;
    background: rgba(25, 77, 15, 0.8);
    color: #d4ffd4;
    border: 1px solid rgba(53, 199, 89, 0.25);
    max-width: none;
    justify-self: auto;
    width: auto;
}
.auth-form-footer {
    margin-top: 1.1rem;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.auth-form-footer a {
    color: var(--clr-orange);
    text-decoration: none;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    display: inline;
    border-radius: 0;
    font-size: inherit;
}
.auth-form-footer a:hover { text-decoration: underline; transform: none; box-shadow: none; }
@media (max-width: 680px) {
    .auth-card {
        grid-template-columns: 1fr;
    }
    .auth-branding {
        padding: 1.75rem 1.5rem 1.25rem;
    }
    .auth-branding::after { display: none; }
    .auth-feature-list { display: none; }
    .auth-branding-sub { display: none; }
    .auth-branding-headline { font-size: 1.4rem; }
    .auth-form-panel { padding: 1.75rem 1.5rem; }
}

/* ============================================================
   HISTORY PAGE — STATS BAR + MOBILE CARDS
   ============================================================ */
.history-page-header {
    margin-bottom: 1.5rem;
}
.history-page-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
    font-weight: 800;
}
.history-page-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.92rem;
}
.history-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.history-stat-card {
    padding: 1.1rem 1.1rem;
    border-radius: var(--r-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.history-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.history-stat-icon.green {
    background: rgba(53, 199, 89, 0.12);
    border: 1px solid rgba(53, 199, 89, 0.2);
}
.history-stat-icon.red {
    background: rgba(255, 94, 101, 0.12);
    border: 1px solid rgba(255, 94, 101, 0.2);
}
.history-stat-icon.blue {
    background: rgba(109, 124, 255, 0.12);
    border: 1px solid rgba(109, 124, 255, 0.2);
}
.history-stat-icon.gold {
    background: rgba(255, 214, 122, 0.12);
    border: 1px solid rgba(255, 214, 122, 0.2);
}
.history-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}
.history-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
/* Mobile card view */
.tx-table-wrap { overflow-x: auto; }
.tx-card-list {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
}
.tx-card {
    padding: 1rem;
    border-radius: var(--r-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}
.tx-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    gap: 0.5rem;
}
.tx-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tx-type-badge.deposit {
    background: rgba(53, 199, 89, 0.12);
    color: #7fdfaa;
    border: 1px solid rgba(53, 199, 89, 0.2);
}
.tx-type-badge.withdrawal {
    background: rgba(255, 94, 101, 0.12);
    color: #ff9ca0;
    border: 1px solid rgba(255, 94, 101, 0.2);
}
.tx-amount { font-size: 1.05rem; font-weight: 800; color: #fff; }
.tx-amount.deposit { color: #7fdfaa; }
.tx-amount.withdrawal { color: #ff9ca0; }
.tx-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}
.tx-meta-label { color: rgba(255, 255, 255, 0.32); }
.tx-ref {
    font-family: 'Courier New', monospace;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.55rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 760px) {
    .tx-table-wrap { display: none; }
    .tx-card-list { display: flex; }
}

/* ============================================================
   PROFILE / ACCOUNT PAGE
   ============================================================ */
.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.profile-sidebar-card {
    padding: 1.5rem;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    position: sticky;
    top: 1rem;
}
.profile-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-orange), var(--clr-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 0.85rem;
    overflow: hidden;
}
.profile-avatar-large img,
.site-navbar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
.avatar-upload-form {
    display: grid;
    gap: 0.75rem;
    margin: 0 auto 1rem;
    max-width: 100%;
    text-align: left;
}
.avatar-upload-form label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.82);
}
.avatar-upload-form input[type="file"] {
    border-radius: 0.85rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}
.avatar-upload-form button {
    justify-self: start;
}
.avatar-upload-preview,
.auth-avatar-preview {
    display: grid;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.75rem;
    color: rgba(255,255,255,0.82);
    font-size: 0.95rem;
}
.avatar-upload-preview img,
.auth-avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.16);
}
.profile-username {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem;
}
.profile-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(109, 124, 255, 0.15);
    color: #c0caff;
    border: 1px solid rgba(109, 124, 255, 0.22);
    text-transform: capitalize;
}
.profile-balance-display {
    margin: 1rem 0;
    padding: 0.85rem;
    border-radius: var(--r-md);
    background: rgba(12, 30, 66, 0.7);
    border: 1px solid rgba(88, 149, 255, 0.18);
}
.profile-balance-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}
.profile-balance-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--clr-gold);
}
.profile-sidebar-actions {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}
.profile-content-area {
    display: grid;
    gap: 1rem;
}
.profile-section-card {
    padding: 1.5rem;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-section-card h2 {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
.profile-info-item {
    display: grid;
    gap: 0.2rem;
}
.profile-info-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.profile-info-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}
@media (max-width: 760px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-sidebar-card {
        position: static;
    }
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   BUTTON LOADING STATE
   ============================================================ */
button.is-loading,
a.button.is-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
}
button.is-loading::after,
a.button.is-loading::after {
    content: '';
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spinLoader 0.6s linear infinite;
}
@keyframes spinLoader {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ── tx-type-deposit/withdrawal aliases ── */
.tx-type-badge.tx-type-deposit { background: rgba(53,199,89,0.12); color: #7fdfaa; border: 1px solid rgba(53,199,89,0.2); }
.tx-type-badge.tx-type-withdrawal { background: rgba(255,94,101,0.12); color: #ff9ca0; border: 1px solid rgba(255,94,101,0.2); }
.tx-amount-deposit { color: #7fdfaa; font-weight: 700; }
.tx-amount-withdrawal { color: #ff9ca0; font-weight: 700; }
.btn-page-active { font-weight: 800 !important; background: var(--clr-orange) !important; color: #fff !important; }
.spin-win-row { background: rgba(53,199,89,0.06); }
.history-symbol-grid { display: flex; flex-direction: column; gap: 2px; }
.tx-card-date { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.tx-card-amount { font-size: 1.15rem; font-weight: 800; margin: 0.35rem 0; }
.tx-card-meta { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.tx-card-desc { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-top: 0.4rem; }

/* ── Profile role badges ── */
.profile-role-badge { display: inline-block; padding: 0.25rem 0.85rem; border-radius: var(--r-full); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-role-admin { background: rgba(232,184,75,0.18); color: #e8b84b; border: 1px solid rgba(232,184,75,0.3); }
.profile-role-user { background: rgba(139,184,255,0.12); color: #8bb8ff; border: 1px solid rgba(139,184,255,0.2); }

/* ── Profile stat mini-grid ── */
.profile-stat-item { text-align: center; }
.profile-stat-value { font-size: 1.1rem; font-weight: 800; color: #fff; }
.profile-stat-label { font-size: 0.68rem; opacity: 0.5; margin-top: 0.1rem; }

/* ════════════════════════════════════════════
   Auth modals — login / register / forgot-pw
   Reuse auth-card layout inside a modal overlay
   ════════════════════════════════════════════ */
.modal-overlay-auth {
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
/* The auth-card needs size-capping inside a modal */
.modal-overlay-auth .modal-auth-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(900px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--r-xl);
    background: #14151a;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.7);
}
/* Single-column variant for forgot-password */
.modal-overlay-auth .modal-auth-card.modal-auth-card-sm {
    grid-template-columns: 1fr;
    width: min(460px, 95vw);
}
/* Left branding panel reuses .auth-branding */
.modal-overlay-auth .auth-branding {
    border-radius: var(--r-xl) 0 0 var(--r-xl);
}
/* Close button */
.modal-auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--r-full);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.15s, color 0.15s;
}
.modal-auth-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}
/* Inline link-styled button */
.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--clr-orange);
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}
.link-btn:hover { opacity: 0.8; text-decoration: underline; }
/* Responsive: stack to single column on small screens */
@media (max-width: 620px) {
    .modal-overlay-auth .modal-auth-card {
        grid-template-columns: 1fr;
        max-height: 100dvh;
        width: 100vw;
        border-radius: 0;
        border: none;
        overflow-y: auto;
    }
    .modal-overlay-auth .auth-branding {
        display: none;
    }
}

/* ════════════════════════════════════════════
   Auth modals — login / register / forgot-pw
   Reuse auth-card layout inside a modal overlay
   ════════════════════════════════════════════ */
.modal-overlay-auth {
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
/* The auth-card needs size-capping inside a modal */
.modal-overlay-auth .modal-auth-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(900px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--r-xl);
    background: #14151a;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.7);
}
/* Single-column variant for forgot-password */
.modal-overlay-auth .modal-auth-card.modal-auth-card-sm {
    grid-template-columns: 1fr;
    width: min(460px, 95vw);
}
/* Left branding panel reuses .auth-branding */
.modal-overlay-auth .auth-branding {
    border-radius: var(--r-xl) 0 0 var(--r-xl);
}
/* Close button */
.modal-auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--r-full);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.15s, color 0.15s;
}
.modal-auth-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}
/* Inline link-styled button */
.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--clr-orange);
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}
.link-btn:hover { opacity: 0.8; text-decoration: underline; }
/* Responsive: stack to single column on small screens */
@media (max-width: 620px) {
    .modal-overlay-auth .modal-auth-card {
        grid-template-columns: 1fr;
        max-height: 100dvh;
        width: 100vw;
        border-radius: 0;
        border: none;
        overflow-y: auto;
    }
    .modal-overlay-auth .auth-branding {
        display: none;
    }
}

/* ── Responsible Gambling modal ── */
.rg-modal-inner {
    max-width: min(680px, 95vw);
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.rg-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 1.5rem 1.75rem 2rem;
}
.rg-modal-content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
}
.rg-modal-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin: 1.5rem 0 0.5rem;
}
.rg-modal-content p {
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}
.rg-modal-content ul {
    margin: 0.4rem 0 0.8rem 1.25rem;
    padding: 0;
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    line-height: 1.65;
}
.rg-modal-content li {
    margin-bottom: 0.3rem;
}
.rg-modal-content strong {
    color: rgba(255,255,255,0.85);
    font-weight: 700;
}
.rg-modal-content a {
    color: var(--clr-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rg-modal-content a:hover {
    opacity: 0.8;
}

/* ── Responsible Gambling modal ── */
.rg-modal-inner {
    max-width: min(680px, 95vw);
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.rg-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 1.5rem 1.75rem 2rem;
}
.rg-modal-content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
}
.rg-modal-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin: 1.5rem 0 0.5rem;
}
.rg-modal-content p {
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}
.rg-modal-content ul {
    margin: 0.4rem 0 0.8rem 1.25rem;
    padding: 0;
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    line-height: 1.65;
}
.rg-modal-content li {
    margin-bottom: 0.3rem;
}
.rg-modal-content strong {
    color: rgba(255,255,255,0.85);
    font-weight: 700;
}
.rg-modal-content a {
    color: var(--clr-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rg-modal-content a:hover {
    opacity: 0.8;
}
