:root {
    --sky-purple: #bc00ff;
    --sky-bg: #f8f9fd;
}

body {
    background-color: var(--sky-bg);
    font-family: "Inter", sans-serif;
    margin: 0;
    padding: 0;
}

.app-container {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 100px;
}

/* Header & Balance */
.wallet-icon {
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 4px;
    position: relative;
}

.wallet-icon::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    width: 6px;
    height: 4px;
    background: #fff;
    border-radius: 1px;
    transform: translateY(-50%);
}

.notification-bar {
    background-color: #fef9c3;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #fde68a;
}

/* Time Selection */
.scroll-timers {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 12px;
    scrollbar-width: none;
    background: #fff;
}

.scroll-timers::-webkit-scrollbar {
    display: none;
}

.time-slot {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 8px 15px;
    text-align: center;
    cursor: pointer;
    min-width: 90px;
}

.time-slot.active {
    border: 2px solid var(--sky-purple);
    background: #fdf4ff;
}

/* Banner & Timer */
.game-banner {
    background: #e9d5ff;
    padding: 15px;
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer-unit {
    background: #000;
    color: #fff;
    border-radius: 4px;
    padding: 3px 6px;
    font-family: monospace;
    font-weight: bold;
    font-size: 18px;
    margin: 0 1px;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    background: #e9ecef;
    border-radius: 8px;
    margin: 15px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.cat-tab {
    flex: 1;
    padding: 12px 5px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    color: #6c757d;
    border: none;
    background: transparent;
}

.cat-tab.active {
    background: var(--sky-purple);
    color: #fff;
}

/* Content Sections */
.game-content {
    display: none;
    padding: 0 15px;
}

.game-content.active {
    display: block;
}

/* Bet Grids */
.bet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.dice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.bet-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px 5px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bet-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 5px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.odds {
    font-size: 11px;
    font-weight: bold;
    color: #888;
}

/* Dice Display within Cards */
.dice-container {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.dice-single {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.dice-double {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.dice-triple {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* History Table */
.history-section {
    margin-top: 20px;
    border-top: 8px solid var(--sky-bg);
}

.history-tabs {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.h-tab {
    font-weight: bold;
    color: #6c757d;
    cursor: pointer;
    font-size: 13px;
    padding-bottom: 5px;
}

.history-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.history-table thead {
    background: #f3f4f9;
    color: #6c757d;
}

.history-table th,
.history-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

/* Footer Checkout */
.footer-checkout {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.pay-btn {
    background: #d38cff;
    color: #fff;
    border: none;
    padding: 10px 35px;
    border-radius: 30px;
    font-weight: bold;
}

a {
    text-decoration: none;
}
.tab-btn {
    background: white;
    border-radius: 4px;
    border-top-right-radius: 16px;
    border: 1px solid #dee2e6;
    min-height: 70px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: 0.3s;
}
.tab-active {
    background: #e9d5ff !important;
    border: 2px solid #a855f7 !important;
    opacity: 1 !important;
    position: relative;
}
.timer-box {
    background: #fff;
    color: #7c3aed;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.timer-separator {
    color: #7c3aed;
    font-size: 24px;
    font-weight: bold;
    padding-bottom: 5px;
}
.game-disabled {
    filter: grayscale(1);
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
.dice-triple,
.dice-double,
.dice-single {
    width: 45px;
    height: 45px;
    object-fit: contain;
}
.bet-item {
    cursor: pointer;
}

/* Bottom Sheet Modal Style */
.modal.bottom .modal-dialog {
    position: fixed;
    margin: auto;
    width: 100%;
    height: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.3s ease-out;
}
.modal.bottom.show .modal-dialog {
    transform: translate3d(0, 0, 0);
}
.modal-content {
    border-radius: 24px 24px 0 0 !important;
    border: none;
    max-height: 90vh;
    overflow-x: hidden;
}
.bet-modal-header {
    background: #fff;
    border: none;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.bet-preview-area {
    background: #fffff0;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 120px;
}

/* Responsive Dice Styles */
.modal-dice-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}
.modal-dice-img-sm {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.amount-selector .btn {
    background: #f3f4f6;
    border: none;
    font-weight: bold;
    padding: 10px;
    color: #333;
    border-radius: 8px;
    font-size: 14px;
}
.amount-selector .btn.active {
    background: #a855f7;
    color: #fff;
}
.multiplier-box {
    background: #f3f4f6;
    border: none;
    width: 60px;
    text-align: center;
    font-weight: bold;
    height: 38px;
}
.quick-multiplier .btn {
    background: #f3f4f6;
    border: none;
    font-size: 12px;
    padding: 6px 12px;
    margin: 2px;
    border-radius: 6px;
}
.quick-multiplier .btn.active {
    background: #f0abfc;
    color: #701a75;
    border: 1px solid #701a75;
}
.total-pay-btn {
    background: #a855f7;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    padding: 12px;
    width: 100%;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3);
}

/* History Ball Styles */
.res-ball {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    margin: 0 2px;
}
.ball-0 {
    background: linear-gradient(to bottom, #dc2626 50%, #9333ea 50%);
}
.ball-5 {
    background: linear-gradient(to bottom, #22c55e 50%, #9333ea 50%);
}
.ball-green {
    background-color: #22c55e;
}
.ball-red {
    background-color: #dc2626;
}
.ball-violet {
    background-color: #9333ea;
}
.res-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
}
.tab-btn {
    background: white;
    border-radius: 4px;
    border-top-right-radius: 16px;
    border: 1px solid #dee2e6;
    min-height: 70px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: 0.3s;
}

.tab-active {
    background: #e9d5ff !important;
    border: 2px solid #a855f7 !important;
    opacity: 1 !important;
    position: relative;
}

.timer-box {
    background: #fff;
    color: #7c3aed;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-section {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    font-family: sans-serif;
}
.history-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.h-tab {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    font-weight: 600;
}
.h-tab.active {
    color: #000;
    position: relative;
}
.h-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 35%;
    width: 30%;
    height: 3px;
    background: #9c27b0;
    border-radius: 10px;
}

/* Tables */
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.history-table th {
    background: #f1f3f9;
    color: #888;
    font-weight: 500;
    font-size: 12px;
    padding: 10px;
    text-align: left;
}
.history-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f8f8f8;
    font-size: 13px;
    vertical-align: middle;
}

/* Result Badges */
.dice-icon {
    width: 24px;
    height: 24px;
    margin-right: 2px;
    vertical-align: middle;
}
.badge-big-circle {
    background: #dc2626;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}
.badge-small-circle {
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}
.badge-odd-pill {
    background: #fee2e2;
    color: #b91c1c;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid #fecaca;
}
.badge-even-pill {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid #bae6fd;
}

/* Winners */
.winner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #f8f8f8;
    background: #fff;
}
.rank-badge {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: bold;
    font-size: 12px;
    color: #777;
    background: #eee;
}
.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffae00);
    color: #fff;
}
.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #8e8e8e);
    color: #fff;
}
.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
}
.winner-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

/* Order Card */
.order-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.draw-results-header {
    background: #fefff0;
    border-bottom: 1px dashed #ddd;
}
.draw-box {
    background: #b0b0a0;
    padding: 6px;
    border-radius: 8px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #000;
    font-weight: bold;
}
.point-badge {
    background: #dc2626;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #fff;
}
.badge-big {
    background: #dc2626;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}
.badge-odd {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}
.status-bar {
    background: #f3f4f6;
    padding: 8px 15px;
    font-size: 12px;
}
.wrong-guessing {
    color: #d946ef;
    font-weight: 500;
    font-size: 14px;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-top: 1px solid #eee;
}
.page-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
}
.page-link.active {
    font-weight: bold;
    color: #000;
    font-size: 18px;
}
.page-nav {
    background: #f3f4f6;
    color: #9ca3af;
    width: 35px;
    height: 35px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.page-nav.enabled {
    color: #4b5563;
}
a{
    text-decoration: none;
}