
/* Blackjack playing cards */
.playing-card {
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.playing-card.black { color: #111; }
.playing-card.red { color: #c62828; }
.playing-card .corner {
    position: absolute;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.1;
    text-align: center;
}
.playing-card .corner .suit { font-size: 14px; display: block; }
.playing-card .corner.top { top: 4px; left: 5px; }
.playing-card .corner.bottom { bottom: 4px; right: 5px; transform: rotate(180deg); }
.playing-card .center-suit {
    font-size: 32px;
    opacity: 0.9;
}
.playing-card.back {
    background: repeating-linear-gradient(45deg, #1e2740, #1e2740 6px, #273055 6px, #273055 12px);
    border-color: rgba(255,255,255,0.08);
}
/* Slight spread for multiple hands */
.bj-cards .playing-card { margin-right: 6px; }

/* Blackjack in-game actions */
.bj-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}
.bj-actions .btn-start,
.bj-actions .btn-secondary {
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 10px;
}
.bj-actions .btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid #4a5168;
    color: #e5e7eb;
}
.bj-actions .btn-secondary:hover:not(:disabled) {
    background: #3a4158;
    border-color: #6b7280;
}

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

:root {
    --bg-primary: #1a1f2e;
    --bg-secondary: #212738;
    --bg-tertiary: #2a3142;
    --accent-green: #00e701;
    --accent-red: #ff4444;
    --accent-blue: #3b82f6;
    --text-primary: #ffffff;
    --text-secondary: #8b92a7;
    --border-color: #3a4158;
    --mine-color: #ff4444;
    --gem-color: #00e701;
    --card-width: 72px;
    --card-height: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    min-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--accent-blue);
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 15px;
}

.btn-primary {
    padding: 14px;
    background: var(--accent-green);
    border: none;
    border-radius: 8px;
    color: black;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 231, 1, 0.3);
}

.hidden {
    display: none !important;
}

/* Header */
header {
    background: var(--bg-secondary);
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    min-width: 240px;
}

.game-selector {
    display: flex;
    gap: 6px;
}

.game-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    color: #e5e7eb; /* ensure visible icon color */
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0; /* hide any incidental text spacing */
    font-weight: 500;
}

.game-btn i {
    font-size: 22px;
    line-height: 1;
}

.game-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

.game-btn iconify-icon {
    width: 22px;
    height: 22px;
}

.game-btn.active {
    background: var(--accent-green);
    color: black;
}

.game-btn.active i,
.game-btn.active svg {
    color: black;
}

.game-btn:hover:not(.active) {
    background: #3a4158;
    color: white;
}

.game-btn:hover i,
.game-btn:hover svg {
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    color: var(--text-secondary);
    font-size: 14px;
}

.balance {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-green);
}

.btn-admin {
    padding: 8px 16px;
    background: var(--accent-blue);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #3a4158;
    border-color: #4a5168;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Admin Page Styles */
/* Note: .admin-main styles are now defined in individual admin pages */

.admin-controls {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar button {
        width: 100%;
    }
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 15px;
    min-width: 0;
    box-sizing: border-box;
}

.admin-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Transaction History Section - Full Width */
.transaction-history-section {
    width: calc(100vw - 40px);
    max-width: none;
    margin: 20px;
    padding: 40px;
}

/* Coinflip list cards */
#coinflipGame .history-list { gap: 8px; display: flex; flex-direction: column; }
.cf-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
}
.cf-left { display: flex; align-items: center; gap: 12px; }
.cf-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: #38405b; color: #e5e7eb; font-weight: 700; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.cf-user { font-weight: 600; }
.cf-sub { color: var(--text-secondary); font-size: 12px; }
.cf-mid { display: flex; align-items: center; gap: 10px; }
.cf-amount { font-weight: 700; }
.cf-side-badge {
    padding: 4px 8px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1;
    border: 1px solid transparent;
}
.cf-side-badge.heads { background: rgba(59,130,246,0.15); color: #93c5fd; border-color: #3b82f6; }
.cf-side-badge.tails { background: rgba(244,63,94,0.15); color: #fca5a5; border-color: #f43f5e; }
.cf-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 700px) {
  .cf-card { flex-direction: column; align-items: flex-start; }
  .cf-actions { width: 100%; justify-content: flex-end; }
}

.admin-section h2 {
    margin-bottom: 20px;
    font-size: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Ensure transaction table scrolls properly */
.table-container:has(.transactions-table) {
    overflow-x: auto;
    overflow-y: visible;
    display: block;
    width: 100%;
    max-width: none;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 800px;
}

/* Transaction table specific sizing */
.users-table.transactions-table {
    width: 100%;
    table-layout: auto;
}

.users-table.transactions-table th,
.users-table.transactions-table td {
    padding: 12px 15px;
    white-space: nowrap;
}

.users-table.transactions-table th:nth-child(4),
.users-table.transactions-table td:nth-child(4) {
    text-align: right;
}

.users-table.transactions-table th:nth-child(5),
.users-table.transactions-table td:nth-child(5) {
    text-align: right;
}

.users-table.transactions-table th:nth-child(6),
.users-table.transactions-table td:nth-child(6) {
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
}

.users-table th {
    text-align: left;
    padding: 12px 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.users-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 250px;
}


.users-table tr:hover {
    background: var(--bg-tertiary);
}

@media (max-width: 768px) {
    .users-table th,
    .users-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    white-space: nowrap;
}

.badge-admin {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.badge-beta {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.badge-user {
    background: rgba(139, 146, 167, 0.2);
    color: var(--text-secondary);
}

.badge-you {
    background: rgba(0, 231, 1, 0.2);
    color: var(--accent-green);
}

.role-select {
    margin-left: 8px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.role-select:hover {
    border-color: var(--accent-blue);
    background: var(--bg-secondary);
}

.role-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-action {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .btn-action {
        padding: 4px 8px;
        font-size: 10px;
    }
}

.btn-promote {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.btn-promote:hover {
    background: var(--accent-blue);
    color: white;
}

.btn-demote {
    background: rgba(255, 68, 68, 0.2);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.btn-demote:hover {
    background: var(--accent-red);
    color: white;
}

.btn-grant {
    background: rgba(0, 231, 1, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.btn-grant:hover {
    background: var(--accent-green);
    color: black;
}

.btn-remove {
    background: rgba(255, 68, 68, 0.2);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.btn-remove:hover {
    background: var(--accent-red);
    color: white;
}

.btn-set {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}

.btn-set:hover {
    background: #fbbf24;
    color: black;
}

.btn-delete {
    background: rgba(139, 0, 0, 0.3);
    color: #ff4444;
    border: 1px solid #8b0000;
}

.btn-delete:hover {
    background: #8b0000;
    color: white;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.pagination span {
    color: var(--text-secondary);
    font-size: 14px;
}

.grant-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
}

.form-group select {
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-green);
}

.currency-subsection {
    background: var(--bg-tertiary);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .currency-subsection {
        padding: 15px;
    }
}

.currency-subsection h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.btn-danger {
    padding: 14px;
    background: var(--accent-red);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.3);
}

.btn-warning {
    padding: 14px;
    background: #fbbf24;
    border: none;
    border-radius: 8px;
    color: black;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(251, 191, 36, 0.3);
}

/* Transaction History Styles */
.transaction-filters {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.transaction-filters .form-row {
    margin-bottom: 15px;
}

.transaction-filters button {
    margin-right: 10px;
    margin-top: 10px;
}

.positive {
    color: var(--accent-green);
    font-weight: 600;
}

.negative {
    color: var(--accent-red);
    font-weight: 600;
}


.btn-admin:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.btn-logout {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--accent-red);
    color: white;
}

/* Login button - match header button style */
.btn-login {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
}

.btn-login:hover {
    background: var(--accent-green);
    color: black;
    border-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 231, 1, 0.2);
}

/* Main Layout */
main {
    display: grid;
    grid-template-columns: 320px 1fr 280px;
    gap: 20px;
}

/* Control Panel */
.control-panel {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-section label {
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-section input,
.control-section select {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 15px;
}

.mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mode-btn {
    padding: 10px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active {
    background: var(--accent-blue);
    color: white;
}

.multiplier-display,
.potential-win {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.multiplier-label,
.win-label {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.multiplier-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-green);
}

.win-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-green);
}

.btn-start,
.btn-cashout {
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-start {
    background: var(--accent-green);
    color: black;
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 231, 1, 0.3);
}

.btn-cashout {
    background: var(--accent-blue);
    color: white;
}

.btn-cashout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Game Grid */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 40px;
    position: relative;
}

.game-grid,
.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

/* Towers Grid */
.towers-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    width: 100%;
}

.towers-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.towers-row-label {
    width: 35px;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.towers-tiles {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.towers-tile {
    width: 80px;
    height: 60px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 28px;
}

.towers-tile:hover:not(.disabled) {
    background: #3a4158;
    border-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 231, 1, 0.3);
}

.towers-tile.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.towers-tile.safe {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: black;
}

.towers-tile.bomb {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.towers-tile.safe-revealed {
    background: #FFC107;
    border-color: #FFC107;
    color: white;
}

.towers-multiplier-label {
    width: 80px;
    text-align: center;
    color: var(--accent-green);
    font-weight: 600;
    font-size: 13px;
}

.tile {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
}

.tile:hover:not(.revealed):not(.disabled) {
    background: #3a4158;
    transform: scale(1.05);
    border-color: var(--accent-green);
}

.tile.revealed {
    cursor: default;
}

.tile.gem {
    background: linear-gradient(135deg, #00e701 0%, #00b801 100%);
    border-color: var(--gem-color);
    animation: gemReveal 0.4s ease;
}

.tile.mine {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border-color: var(--mine-color);
    animation: mineExplode 0.4s ease;
}

.tile.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.tile.selected {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    cursor: pointer;
    opacity: 1;
}

@keyframes gemReveal {
    0% {
        transform: scale(0.8) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes mineExplode {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.game-message {
    margin-top: 30px;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-message.win {
    background: rgba(0, 231, 1, 0.1);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
}

.game-message.lose {
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
}

/* History Panel */
.history-panel {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
}

.history-panel h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.history-item {
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
}

.history-item.win {
    border-left: 3px solid var(--accent-green);
}

.history-item.lose {
    border-left: 3px solid var(--accent-red);
}

.history-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.history-item-label {
    color: var(--text-secondary);
}

.history-item-value {
    font-weight: 600;
}

.history-item-value.positive {
    color: var(--accent-green);
}

.history-item-value.negative {
    color: var(--accent-red);
}

/* Admin Panel */
.admin-modal {
    min-width: 600px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-close:hover {
    background: var(--bg-tertiary);
    color: white;
}

.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.admin-section {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 12px;
}

.admin-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-primary);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.user-item {
    background: var(--bg-primary);
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.user-item:hover {
    background: var(--bg-secondary);
}

.user-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.user-item-balance {
    font-weight: 600;
    color: var(--accent-green);
}

.grant-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grant-form select,
.grant-form input {
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.grant-form select {
    cursor: pointer;
}

.grant-form button {
    margin-top: 8px;
}

/* Simulation Results Card */
.results-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.results-icon {
    font-size: 28px;
}

.results-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.result-item {
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.result-item.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(0, 231, 1, 0.1) 100%);
    border: 1px solid var(--accent-blue);
}

.result-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.result-value.positive {
    color: var(--accent-green);
}

.result-value.negative {
    color: var(--accent-red);
}

.results-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.results-footer small {
    color: var(--text-secondary);
    font-size: 13px;
}

.simulation-progress {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: var(--accent-blue);
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Plinko Board */
.plinko-board {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    width: 100%;
    padding: 20px;
}

.plinko-canvas-wrapper {
    position: relative;
    display: inline-block;
    max-width: 760px;
    width: 100%;
}

#plinkoCanvas {
    display: block;
    width: 100%;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.8) 100%);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 40px rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom: none;
}

.plinko-multipliers {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 12px 8px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    gap: 2px;
}

.plinko-multiplier {
    flex: 1;
    padding: 12px 4px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    min-width: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.plinko-multiplier.low {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.4) 0%, rgba(55, 65, 81, 0.4) 100%);
    color: #9ca3af;
    border-color: rgba(107, 114, 128, 0.3);
}

.plinko-multiplier.medium {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.3) 100%);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

.plinko-multiplier.high {
    background: linear-gradient(135deg, rgba(0, 231, 1, 0.3) 0%, rgba(0, 180, 1, 0.3) 100%);
    color: #00e701;
    border-color: rgba(0, 231, 1, 0.4);
}

.plinko-multiplier.very-high {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.3) 100%);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
}

.plinko-multiplier.landing {
    transform: scale(1.2);
    box-shadow: 
        0 0 30px currentColor,
        0 0 50px currentColor,
        0 8px 25px rgba(0, 0, 0, 0.5);
    animation: plinkoHit 0.8s var(--ease-out);
    z-index: 10;
    border-width: 2px;
    border-color: currentColor;
}

@keyframes plinkoHit {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 currentColor;
    }
    50% {
        transform: scale(1.3);
        box-shadow: 
            0 0 40px currentColor,
            0 0 60px currentColor,
            0 12px 30px rgba(0, 0, 0, 0.6);
    }
    100% {
        transform: scale(1.2);
        box-shadow: 
            0 0 30px currentColor,
            0 0 50px currentColor,
            0 8px 25px rgba(0, 0, 0, 0.5);
    }
}

@keyframes pulse-landing {
    0%, 100% {
        transform: scale(1.15);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.25);
        filter: brightness(1.3);
    }
}

/* Roll Game Styles */
.roll-type-toggle {
    display: flex;
    gap: 10px;
}

.roll-type-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.roll-type-btn.active {
    border-color: var(--accent-green);
    background: rgba(0, 231, 1, 0.1);
}

.roll-type-btn.under.active {
    border-color: var(--accent-red);
    background: rgba(255, 68, 68, 0.1);
    color: var(--accent-red);
}

.roll-type-btn.over.active {
    border-color: var(--accent-green);
    background: rgba(0, 231, 1, 0.1);
    color: var(--accent-green);
}

.slider-container {
    position: relative;
    padding: 20px 0;
}

.roll-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #ff4444 0%, #00e701 100%);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.roll-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.roll-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slider-value {
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-blue);
    margin-top: 10px;
}

.win-chance-display {
    background: rgba(0, 231, 1, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.win-chance-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-green);
}

.strategy-section {
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.strategy-section h4 {
    margin-bottom: 8px;
    color: var(--accent-blue);
    font-size: 13px;
}

.strategy-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.strategy-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.strategy-option input[type="number"] {
    padding: 4px 8px;
    font-size: 12px;
}

.strategy-option label {
    margin: 0;
    color: var(--text-primary);
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.checkbox-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-option label {
    margin: 0;
    color: var(--text-primary);
}

.auto-info {
    background: rgba(59, 130, 246, 0.1);
    padding: 10px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 12px;
    text-align: center;
    color: var(--accent-blue);
    line-height: 1.4;
}

.roll-display {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.roll-bar-container {
    position: relative;
    height: 80px;
    background: linear-gradient(to right, #ff4444 0%, #00e701 100%);
    border-radius: 10px;
    margin: 30px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.roll-bar-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    z-index: 2;
    transition: left 0.3s ease;
}

.roll-bar-target {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-blue);
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-blue);
}

.roll-result {
    text-align: center;
    margin-top: 40px;
}

.roll-number {
    font-size: 4rem;
    font-weight: bold;
    color: var(--accent-blue);
    margin-bottom: 20px;
    text-shadow: 0 0 20px currentColor;
}

.roll-status {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.roll-status.win {
    color: var(--accent-green);
    text-shadow: 0 0 10px currentColor;
}

.roll-status.loss {
    color: var(--accent-red);
    text-shadow: 0 0 10px currentColor;
}

.roll-payout {
    font-size: 1.3rem;
    color: #ffd700;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    main {
        grid-template-columns: 280px 1fr;
    }
    
    .history-panel {
        display: none;
    }
    
    .admin-modal {
        min-width: 90vw;
    }
}

@media (max-width: 768px) {
    /* Main Layout */
    main {
        grid-template-columns: 1fr;
    }
    
    /* Game Grids */
    .game-grid,
    .mines-grid {
        max-width: 100%;
        gap: 8px;
        padding: 0;
    }
    
    .game-container {
        padding: 20px;
    }
    
    /* Mines Grid - Responsive */
    .tile {
        font-size: 24px;
        border-width: 1px;
    }
    
    /* Towers Game */
    .towers-tile {
        width: 60px;
        height: 50px;
        font-size: 22px;
    }
    
    .towers-row {
        gap: 8px;
    }
    
    .towers-grid {
        gap: 6px;
    }
    
    /* Plinko */
    .plinko-canvas-wrapper {
        max-width: 100%;
    }
    
    .plinko-multiplier {
        font-size: 10px;
        padding: 8px 2px;
    }
    
    /* Roll Display */
    .roll-bar-container {
        height: 60px;
        margin: 20px 0;
    }
    
    .roll-number {
        font-size: 3rem;
    }
    
    .roll-status {
        font-size: 1.4rem;
    }
    
    .roll-payout {
        font-size: 1.1rem;
    }
    
    /* Modals */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        min-width: 95vw;
        max-width: 95vw;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .admin-modal {
        min-width: 95vw;
        padding: 20px;
    }
    
    /* Control Panels */
    .control-panel {
        padding: 20px;
        gap: 15px;
    }
    
    .control-section input,
    .control-section select {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Buttons */
    .btn-start,
    .btn-cashout,
    .btn-large {
        padding: 14px;
        font-size: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn-small {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Game Message */
    .game-message {
        padding: 15px 20px;
        font-size: 16px;
        margin-top: 20px;
    }
    
    /* Slot Machine Modal */
    .slot-machine-modal {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .slot-machine-content {
        grid-template-columns: 1fr;
    }
    
    .slot-machine-controls {
        border-right: none;
        border-bottom: 1px solid #1e1f35;
        order: 2;
    }
    
    .slot-machine-display {
        order: 1;
    }
    
    .slots-symbol {
        font-size: 36px;
    }
    
    .slots-reels {
        gap: 6px;
        max-width: 100%;
    }
    
    /* Crypto Deposit */
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .deposit-content {
        gap: 15px;
    }
    
    /* Depo Modal */
    .depo-option-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .depo-option-btn {
        padding: 15px;
    }
    
    /* Coinflip Cards */
    .cf-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
        gap: 10px;
    }
    
    .cf-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .cf-actions button {
        flex: 1;
    }
    
    /* Odds Modal */
    .modal-panel {
        max-width: 95vw !important;
        padding: var(--space-2);
    }
    
    .leaderboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .users-table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    /* Very Small Screens */
    .game-container {
        padding: 15px;
    }
    
    .tile {
        font-size: 20px;
        border-width: 1px;
    }
    
    .game-grid,
    .mines-grid {
        gap: 6px;
    }
    
    .towers-tile {
        width: 50px;
        height: 45px;
        font-size: 20px;
    }
    
    .roll-number {
        font-size: 2.5rem;
    }
    
    .roll-status {
        font-size: 1.2rem;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .control-panel {
        padding: 15px;
        gap: 12px;
    }
    
    .btn-start,
    .btn-cashout {
        padding: 12px;
        font-size: 14px;
    }
    
    .multiplier-value {
        font-size: 24px;
    }
    
    .win-value {
        font-size: 20px;
    }
    
    .slots-symbol {
        font-size: 28px;
    }
    
    .game-message {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .quick-amount-btn {
        padding: 8px;
        font-size: 13px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .control-panel {
        width: 280px;
    }
    
    .game-grid {
        max-width: 450px;
    }
    
    .history-panel {
        width: 250px;
    }
}

/* iPad Specific */
@media (min-width: 768px) and (max-width: 1024px) {
    main {
        grid-template-columns: 260px 1fr;
        gap: 16px;
    }
    
    .game-container {
        padding: 30px;
    }
    
    .control-panel {
        padding: 20px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .tile,
    .towers-tile,
    button,
    .sidebar-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-action {
        padding: 8px 14px;
        min-height: 40px;
    }
    
    /* iOS Safari Specific - Prevent overlap */
    .tile {
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .game-grid,
    .mines-grid {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Remove hover effects on touch devices */
    .tile:hover:not(.revealed):not(.disabled),
    .towers-tile:hover:not(.disabled),
    .sidebar-item:hover {
        transform: none;
    }
    
    /* Use active states instead */
    .tile:active:not(.revealed):not(.disabled) {
        transform: scale(0.95);
    }
    
    button:active {
        transform: scale(0.98);
    }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .tile {
        -webkit-tap-highlight-color: transparent;
    }
    
    .game-grid,
    .mines-grid {
        -webkit-overflow-scrolling: touch;
    }
}

/* Crypto Deposit Styles */
.btn-deposit {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-deposit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.deposit-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.deposit-info {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    color: var(--text-secondary);
    margin: 0;
    border-left: 3px solid var(--accent-blue);
}

.crypto-select {
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 15px;
    width: 100%;
    cursor: pointer;
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.quick-amount-btn {
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.quick-amount-btn:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.deposit-estimate {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 15px;
}

.estimate-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.estimate-row:last-child {
    border-bottom: none;
}

.estimate-value {
    color: var(--accent-green);
    font-weight: 600;
}

.deposit-address-section {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.deposit-address-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.address-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.deposit-address {
    flex: 1;
    background: var(--bg-primary);
    padding: 12px;
    border-radius: 6px;
    color: var(--accent-green);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

.btn-copy {
    padding: 12px 16px;
    background: var(--accent-blue);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #2563eb;
}

.deposit-details {
    margin-bottom: 20px;
}

.deposit-details p {
    margin: 10px 0;
    color: var(--text-secondary);
}

.deposit-details strong {
    color: var(--text-primary);
}

.warning {
    color: #fbbf24 !important;
    font-weight: 600;
}

.deposit-status {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    background: var(--bg-primary);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}

.status-badge.status-completed {
    background: rgba(0, 231, 1, 0.1);
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.status-badge.status-pending {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: #fbbf24;
}

.status-badge.status-failed {
    background: rgba(255, 68, 68, 0.1);
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-primary);
}

/* Coinflip 3D Animation */
.coin-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.coin-wrapper {
    perspective: 1000px;
    width: 200px;
    height: 200px;
}

.coin {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.coin.flipping {
    animation: coinFlip 3s ease-in-out forwards;
}

.coin.flipping-heads {
    animation: coinFlipHeads 3s ease-in-out forwards;
}

.coin.flipping-tails {
    animation: coinFlipTails 3s ease-in-out forwards;
}

.coin-side {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: bold;
    backface-visibility: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.coin-heads {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    color: #1a1f3a;
    border: 8px solid #ffed4e;
    transform: rotateY(0deg);
}

.coin-tails {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 50%, #c0c0c0 100%);
    color: #1a1f3a;
    border: 8px solid #e8e8e8;
    transform: rotateY(180deg);
}

.coin-result-text {
    font-size: 32px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 0.5s ease-in 2.5s forwards;
}

@keyframes coinFlipHeads {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(1800deg);
    }
}

@keyframes coinFlipTails {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(1980deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slots Selection Screen */
.slots-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.slot-machine-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.slot-machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 231, 1, 0.2);
    border-color: var(--accent-green);
}

.slot-machine-card.slot-card-coming-soon {
    opacity: 0.6;
    cursor: default;
    border-style: dashed;
}

.slot-machine-card.slot-card-coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.slot-card-header {
    background: linear-gradient(135deg, rgba(0, 231, 1, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.slot-card-icon {
    font-size: 64px;
    margin-bottom: 10px;
    display: block;
    animation: slotCardBounce 2s ease-in-out infinite;
}

@keyframes slotCardBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.slot-card-header h3 {
    margin: 0;
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 700;
}

.slot-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slot-card-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.slot-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.slot-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.stat-item {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-green);
}

.slot-card-play-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #00b801 100%);
    border: none;
    color: black;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slot-card-play-btn:hover {
    background: linear-gradient(135deg, #00ff00 0%, var(--accent-green) 100%);
    box-shadow: 0 5px 20px rgba(0, 231, 1, 0.4);
}

/* Slot Machine Modal */
.slot-machine-modal {
    max-width: 1100px;
    max-height: 90vh;
    overflow: auto;
    background: #0a0a15;
    border: 1px solid #1e1f35;
}

.slot-machine-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    margin-top: 0;
    min-height: 600px;
}

.slot-machine-display.full {
    max-width: 100%;
}

.slot-machine-controls {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #0f1023;
    border-right: 1px solid #1e1f35;
    padding: 20px;
}

.slot-machine-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.slot-results-display {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.result-row .result-value {
    color: var(--accent-green);
    font-weight: 700;
}

.slot-message {
    text-align: center;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: pre-line;
    margin-top: 20px;
    background: #0d0e1a;
    border-top: 1px solid #1e1f35;
}

.slot-message.success {
    color: #3ba55d;
}

.slot-message.error {
    color: #ed4245;
}

.slot-message.info {
    color: #5865f2;
}

@media (max-width: 900px) {
    .slot-machine-content {
        grid-template-columns: 1fr;
    }
    
    .slot-machine-controls {
        order: 2;
    }
    
    .slot-machine-display {
        order: 1;
    }
    
    .leaderboard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Slots Game Area */
.slot-machine-display {
    display: flex;
    flex-direction: column;
    background: #0f0f23;
    padding: 20px;
}

.slots-game-area {
    position: relative;
    background: #12131f;
    padding: 40px 32px;
    overflow: hidden;
    flex: 1;
    min-height: 400px;
}

.slots-game-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(88, 101, 242, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(255, 115, 179, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

.slots-reels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.slots-reel {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
}

.slots-symbol {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    background: #1a1b2e;
    border: 1px solid #2d2e44;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.slots-symbol.winning {
    animation: slotWin 0.5s ease-in-out infinite;
    background: #232441;
    border-color: #5865f2;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.slots-symbol.spinning {
    filter: blur(1.5px);
    opacity: 0.8;
}

@keyframes slotWin {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.05);
    }
}

/* Control Panel */
.control-group {
    margin-bottom: 14px;
    border-bottom: 1px solid #1a1b2e;
    padding-bottom: 14px;
}

.control-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #5a5b6a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bet-input-group {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.bet-value {
    flex: 1;
    background: #1a1b2e;
    border: 1px solid #2d2e44;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-align: left;
}

.bet-btn {
    width: 48px;
    height: 48px;
    background: #1a1b2e;
    border: 1px solid #2d2e44;
    font-size: 13px;
    font-weight: 600;
    color: #a1a3a8;
    cursor: pointer;
    transition: background 0.1s ease, border-color 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-btn:hover {
    background: #232441;
    border-color: #3d3e54;
}

.bet-btn:active {
    background: #141526;
}

.bet-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.preset-btn {
    padding: 8px;
    background: #1a1b2e;
    border: 1px solid #2d2e44;
    font-size: 12px;
    font-weight: 600;
    color: #a1a3a8;
    cursor: pointer;
    transition: background 0.1s ease;
}

.preset-btn:hover {
    background: #232441;
    color: #ffffff;
}

.mode-selector {
    display: flex;
    gap: 0;
    background: #1a1b2e;
    border: 1px solid #2d2e44;
}

.mode-option {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #71727a;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
}

.mode-option:first-child {
    border-right: 1px solid #2d2e44;
}

.mode-option.active {
    background: #232441;
    color: #ffffff;
}

.control-input {
    width: 100%;
    background: #1a1b2e;
    border: 1px solid #2d2e44;
    padding: 12px 14px;
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 8px;
}

.spin-btn-primary {
    width: 100%;
    padding: 16px;
    background: #5865f2;
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: background 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 14px;
    margin-bottom: 14px;
    border-top: 1px solid #1a1b2e;
    border-bottom: 1px solid #1a1b2e;
    padding-top: 18px;
    padding-bottom: 18px;
}

.spin-btn-primary:hover {
    background: #4752c4;
}

.spin-btn-primary:active {
    background: #3c45a3;
}

.stop-btn {
    width: 100%;
    padding: 14px;
    background: #ed4245;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stats-panel {
    background: transparent;
    border: none;
    border-top: 1px solid #1a1b2e;
    padding: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.stat-label {
    font-size: 10px;
    color: #5a5b6a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #3ba55d;
    font-variant-numeric: tabular-nums;
}

.odds-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    border-top: 1px solid #1a1b2e;
    font-size: 11px;
    font-weight: 600;
    color: #5a5b6a;
    cursor: pointer;
    transition: color 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 14px;
    padding-top: 14px;
}

.odds-btn:hover {
    color: #8a8b9a;
}

@media (max-width: 900px) {
    .slot-machine-content {
        grid-template-columns: 1fr;
    }
    
    .slot-machine-display {
        order: 1;
    }
    
    .slot-machine-controls {
        order: 2;
    }
}

/* Slots particle effects */
.slots-particle {
    position: absolute;
    pointer-events: none;
    animation: slotsParticleFloat 2s ease-out forwards;
    z-index: 10;
}

@keyframes slotsParticleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0.3);
        opacity: 0;
    }
}

.slots-cascade-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b9d 0%, #f093fb 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
    animation: bounceIn 0.5s ease-out;
    z-index: 20;
}

@keyframes bounceIn {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Slots display styling for smaller viewport */
.slots-display {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .slots-machine {
        padding: 20px;
        border-radius: 15px;
    }
    
    .slots-reels {
        gap: 8px;
        padding: 15px;
    }
    
    .slots-symbol {
        font-size: 32px;
        border-radius: 8px;
    }
    
    .slots-cascade-badge {
        font-size: 12px;
        padding: 6px 12px;
        top: 10px;
        right: 10px;
    }
}

/* Depo Modal Styles */
.depo-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.depo-option-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.depo-option-btn {
    padding: 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.depo-option-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.depo-option-btn h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.depo-option-btn p {
    margin: 5px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.depo-option-btn .small-text {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.depo-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.depo-form h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
}

.depo-payment-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-details {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-blue);
}

.payment-details p {
    margin: 10px 0;
    color: var(--text-primary);
}

.payment-details strong {
    color: var(--text-primary);
}

.timer-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.timer-section p {
    font-size: 18px;
    color: var(--accent-blue);
}

.status-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.depo-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.depo-progress-bar {
    height: 100%;
    background: var(--accent-blue);
    width: 0%;
    transition: width 0.3s;
    border-radius: 4px;
}

.depo-success {
    text-align: center;
    padding: 20px;
}

.depo-success h3 {
    color: #4caf50;
    margin-bottom: 15px;
}

.depo-error {
    text-align: center;
    padding: 20px;
}

.depo-error h3 {
    color: #f44336;
    margin-bottom: 15px;
}