/* ========================================
   ROULETTE STYLES - CS:GO SPIN STYLE
   ======================================== */

/* Light Mode Variables */
:root {
    --roulette-bg: #EFEFED;
    --roulette-card-bg: rgba(255, 255, 255, 0.95);
    --roulette-slot-bg: #ffffff;
    --roulette-text: #2c3e50;
    --roulette-text-secondary: #7f8c8d;
    --roulette-border: rgba(0, 0, 0, 0.1);
    --roulette-shadow: rgba(0, 0, 0, 0.1);
    --roulette-machine-bg: linear-gradient(135deg, #ffffff, #f0f2f5);
    --roulette-window-bg: #f8f9fa;
    --roulette-item-bg: linear-gradient(135deg, #ffffff, #f8f9fa);
}

/* Dark Mode Variables */
.dark-mode {
    --roulette-bg: linear-gradient(135deg, #0a0a15 0%, #15152a 100%);
    --roulette-card-bg: rgba(0, 0, 0, 0.5);
    --roulette-slot-bg: #0a0a0f;
    --roulette-text: #ffffff;
    --roulette-text-secondary: #a0a0a0;
    --roulette-border: rgba(255, 255, 255, 0.1);
    --roulette-shadow: rgba(0, 0, 0, 0.3);
    --roulette-machine-bg: linear-gradient(135deg, #0f0f1a, #1a1a2e);
    --roulette-window-bg: #0a0a0f;
    --roulette-item-bg: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

/* Main Page */
.roulette-page {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
    background: var(--roulette-bg);
    transition: all 0.3s ease;
}

.roulette-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.roulette-header {
    text-align: center;
    margin-bottom: 40px;
}

.roulette-header h1 {
    font-size: 48px;
    background: linear-gradient(135deg, #002eff, #544dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.roulette-header p {
    color: var(--roulette-text-secondary);
    font-size: 16px;
}

/* Balance Card */
.balance-card {
    background: var(--roulette-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid var(--roulette-border);
    box-shadow: 0 4px 15px var(--roulette-shadow);
}

.balance-info {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-item i {
    font-size: 28px;
    color: #544dff;
}

.balance-item .label {
    color: var(--roulette-text-secondary);
    font-size: 13px;
}

.balance-item .value {
    font-size: 22px;
    font-weight: 700;
    color: #544dff;
}

.spin-cost {
    background: rgba(84, 77, 255, 0.15);
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(84, 77, 255, 0.3);
}

.spin-cost i {
    font-size: 20px;
    color: #544dff;
}

.spin-cost span {
    font-size: 20px;
    font-weight: 700;
    color: #544dff;
}

/* Slot Machine Area */
.slot-machine {
    background: var(--roulette-machine-bg);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--roulette-border);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--roulette-shadow);
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #544dff, #002eff, transparent);
}

/* Window with items */
.slot-window {
    background: var(--roulette-window-bg);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--roulette-border);
}

.slot-track {
    overflow: hidden;
    position: relative;
}

.slot-items {
    display: flex;
    gap: 15px;
    transition: transform 15s cubic-bezier(0.08, 0.82, 0.17, 1);
    will-change: transform;
}

/* Плавная остановка для доводки */
.slot-items.finalize {
    transition: transform 2s cubic-bezier(0.2, 0.9, 0.4, 1) !important;
}

/* Arrow indicator */
.slot-arrow {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #544dff;
    z-index: 10;
    filter: drop-shadow(0 0 10px rgba(84, 77, 255, 0.5));
}

.slot-arrow::after {
    content: '▼';
    position: absolute;
    top: -35px;
    left: -8px;
    color: #544dff;
    font-size: 16px;
}

/* Individual item card */
.slot-item {
    flex: 0 0 180px;
    background: var(--roulette-item-bg);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--roulette-border);
    position: relative;
    overflow: hidden;
}

.slot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

/* Rarity colors - сохраняем цвета для обоих режимов */
.slot-item.blue::before { background: #3498db; }
.slot-item.purple::before { background: #9b59b6; }
.slot-item.pink::before { background: #e91e63; }
.slot-item.red::before { background: #e74c3c; }
.slot-item.yellow::before { background: #f1c40f; }

.slot-item.winner {
    border: 2px solid #544dff;
    box-shadow: 0 0 30px rgba(84, 77, 255, 0.5);
    transform: scale(1.02);
    background: linear-gradient(135deg, rgba(84, 77, 255, 0.15), rgba(84, 77, 255, 0.05));
}

.slot-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.slot-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--roulette-text);
    margin-bottom: 8px;
}

.slot-value {
    font-size: 14px;
    color: #544dff;
    font-weight: 600;
}

.slot-chance {
    font-size: 11px;
    color: var(--roulette-text-secondary);
    margin-top: 8px;
}

/* Spin Button */
.spin-btn {
    display: block;
    width: 300px;
    margin: 30px auto 0;
    padding: 18px 30px;
    background: linear-gradient(135deg, #002eff, #544dff);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(84, 77, 255, 0.3);
}

.spin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.spin-btn:hover::before {
    left: 100%;
}

.spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(84, 77, 255, 0.5);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Items Grid (available prizes) */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.item-card {
    background: var(--roulette-card-bg);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
    border-left: 3px solid;
    cursor: default;
    backdrop-filter: blur(5px);
}

.item-card:hover {
    transform: translateY(-3px);
    background: rgba(84, 77, 255, 0.1);
}

.item-card.blue { border-left-color: #3498db; }
.item-card.purple { border-left-color: #9b59b6; }
.item-card.pink { border-left-color: #e91e63; }
.item-card.red { border-left-color: #e74c3c; }
.item-card.yellow { border-left-color: #f1c40f; }

.item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--roulette-text);
}

.item-chance {
    font-size: 11px;
    color: var(--roulette-text-secondary);
    margin-top: 5px;
}

/* History */
.history-section {
    background: var(--roulette-card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-top: 30px;
    border: 1px solid var(--roulette-border);
}

.history-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--roulette-text);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-list::-webkit-scrollbar {
    width: 5px;
}

.history-list::-webkit-scrollbar-track {
    background: var(--roulette-border);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #544dff;
    border-radius: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid var(--roulette-border);
    transition: all 0.3s;
}

.history-item:hover {
    background: rgba(84, 77, 255, 0.05);
}

.history-icon {
    font-size: 28px;
}

.history-info {
    flex: 1;
}

.history-name {
    font-weight: 500;
    color: var(--roulette-text);
}

.history-name .winner {
    color: #544dff;
    font-weight: 700;
}

.history-time {
    font-size: 11px;
    color: var(--roulette-text-secondary);
    margin-top: 3px;
}

/* Animations */
@keyframes slotShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.spinning {
    animation: slotShake 0.3s ease-in-out 4;
}

@keyframes winnerGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(84, 77, 255, 0.5); }
    50% { box-shadow: 0 0 30px rgba(84, 77, 255, 0.8); }
}

.winner-glow {
    animation: winnerGlow 1s ease-in-out 3;
}

/* Responsive */
@media (max-width: 992px) {
    .slot-item { flex: 0 0 160px; }
    .slot-icon { font-size: 48px; }
    .balance-card { flex-direction: column; gap: 15px; }
    .balance-info { justify-content: center; }
}

@media (max-width: 768px) {
    .slot-item { flex: 0 0 140px; padding: 15px 10px; }
    .slot-icon { font-size: 40px; }
    .slot-name { font-size: 13px; }
    .balance-info { gap: 20px; }
    .items-grid { grid-template-columns: repeat(2, 1fr); }
    .spin-btn { width: 250px; font-size: 18px; padding: 15px 20px; }
    .roulette-header h1 { font-size: 36px; }
}

@media (max-width: 576px) {
    .slot-item { flex: 0 0 120px; }
    .slot-icon { font-size: 32px; }
    .balance-item .value { font-size: 16px; }
    .balance-item i { font-size: 20px; }
    .items-grid { grid-template-columns: 1fr; }
}
