:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --accent: #fbbf24;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --item-width: 120px;
    --item-height: 120px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 20px 15px 40px;
}

/* Balance Dashboard */
#user-profile {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 30px;
}

.greeting {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

#user-info {
    color: var(--accent);
    font-weight: 700;
    font-size: 22px;
}

#balance {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.balance-item {
    text-align: center;
    flex: 1;
}

.balance-item:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.balance-value {
    font-size: 26px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    transition: transform 0.2s, color 0.2s;
}

.gold-text {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.balance-highlight {
    color: #4ade80 !important;
    transform: scale(1.15);
}

/* Roulette Card */
.roulette-container {
    background: #1e293b;
    border-radius: 24px;
    padding: 25px 0 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    margin-bottom: 30px;
    position: relative;
    border: 1px solid #334155;
    overflow: hidden;
    text-align: center;
}

.roulette-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
}

.roulette-container h3 {
    margin: 0 0 5px;
    font-size: 24px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.roulette-price {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 25px;
}

.roulette-price span {
    color: #fff;
    font-weight: 700;
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 12px;
    margin-left: 8px;
}

/* The Viewport */
.roulette-viewport {
    width: 100%;
    height: var(--item-height);
    background: #0b0f19;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.3);
    border-top: 2px solid #334155;
    border-bottom: 2px solid #334155;
}

/* Gradients for edges */
.roulette-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #0b0f19 0%, rgba(11,15,25,0) 20%, rgba(11,15,25,0) 80%, #0b0f19 100%);
    z-index: 5;
    pointer-events: none;
}

/* Center Glass/Pointer Overlay */
.roulette-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--item-width);
    height: 100%;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left: 2px solid rgba(251, 191, 36, 0.8);
    border-right: 2px solid rgba(251, 191, 36, 0.8);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
    box-sizing: border-box;
}

.roulette-pointer::before, .roulette-pointer::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
}

.roulette-pointer::before {
    top: 0;
    border-top: 14px solid #fbbf24;
}

.roulette-pointer::after {
    bottom: 0;
    border-bottom: 14px solid #fbbf24;
}

.roulette-track {
    display: flex;
    height: 100%;
    width: max-content;
    will-change: transform;
}

/* Items */
.roulette-item {
    width: var(--item-width);
    height: var(--item-height);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, #1e293b, #0f172a);
    color: #e2e8f0;
}

.roulette-item.tier-common {
    background: linear-gradient(180deg, #334155, #1e293b);
}

.roulette-item.tier-rare {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    color: #fff;
    box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.5);
}

.roulette-item.tier-epic {
    background: linear-gradient(180deg, #a855f7, #7e22ce);
    color: #fff;
    box-shadow: inset 0 0 15px rgba(168, 85, 247, 0.5);
}

.roulette-item.tier-legendary {
    background: linear-gradient(180deg, #fbbf24, #d97706);
    color: #000;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.8);
    border-right: 1px solid #fcd34d;
}

.item-value {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 2px;
}

.item-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Buttons */
.spin-button {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #451a03;
    border: none;
    border-radius: 100px;
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 30px;
    box-shadow: 0 8px 0 #b45309, 0 15px 20px rgba(0,0,0,0.4);
    transition: all 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.spin-button:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 #b45309, 0 5px 10px rgba(0,0,0,0.4);
}

.spin-button:disabled {
    background: #334155;
    color: #64748b;
    box-shadow: 0 6px 0 #1e293b;
    cursor: not-allowed;
    transform: none;
}

/* Close Button */
.back-to-bot {
    text-align: center;
}

.back-to-bot button {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 15px 30px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}
