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

body {
    background: linear-gradient(135deg, #0d2b1a, #1a3d2b);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

.container {
    background: linear-gradient(180deg, #1e4d34, #143a26);
    border-radius: 30px;
    padding: 30px;
    max-width: 1000px;
    width: 100%;
    border: 2px solid #b48b4a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

h1 {
    text-align: center;
    color: #f5eac1;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.game-area {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

/* Колесо */
.wheel-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 8px #3d2817, 0 10px 40px rgba(0,0,0,0.8);
    background: #2b1b0e;
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    color: #ffd700;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.result-display {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f1f12;
    padding: 8px 20px;
    border-radius: 40px;
    border: 2px solid #b48b4a;
    color: #f5eac1;
    font-weight: 600;
    font-size: 1.1rem;
}

.result-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    min-width: 40px;
    text-align: center;
}

/* Ставки */
.bets-section {
    flex: 1;
    min-width: 280px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.number-cell {
    padding: 10px 0;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #7b5f34;
    transition: all 0.15s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    background: #2c5a3e;
}

.number-cell:hover {
    transform: scale(1.05);
}

.number-cell:active {
    transform: scale(0.95);
}

.number-cell.red {
    background: #c0392b;
    border-color: #e74c3c;
}

.number-cell.black {
    background: #2c3e50;
    border-color: #34495e;
}

.number-cell.green {
    background: #27ae60;
    border-color: #2ecc71;
}

.number-cell.chosen {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.special-bets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
}

.bet-chip {
    padding: 8px 16px;
    border-radius: 25px;
    border: 2px solid #b48b4a;
    background: #2d3f2a;
    color: #f5eac1;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}

.bet-chip:hover {
    transform: scale(1.05);
}

.bet-chip:active {
    transform: scale(0.95);
}

.bet-chip.active {
    background: #f5d742;
    color: #1a1a0a;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(245, 215, 66, 0.3);
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.bet-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0d1f13;
    padding: 4px 16px 4px 12px;
    border-radius: 30px;
    border: 2px solid #b48b4a;
    color: #f5eac1;
    font-weight: 600;
}

.bet-control input {
    width: 70px;
    padding: 6px 8px;
    border-radius: 15px;
    border: 1px solid #b48b4a;
    background: #1f3d28;
    color: #f5eac1;
    font-weight: 700;
    text-align: center;
    font-size: 1rem;
}

.bet-control input:focus {
    outline: none;
    border-color: #ffd700;
}

.btn-spin {
    padding: 10px 30px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #f5d742, #d4a017);
    color: #1a1a0a;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 15px rgba(245, 215, 66, 0.3);
    letter-spacing: 1px;
}

.btn-spin:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(245, 215, 66, 0.5);
}

.btn-spin:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-spin:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    background: #555;
    box-shadow: none;
}

.bet-info {
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bet-info.warning {
    background: rgba(255, 200, 0, 0.15);
    color: #f5d742;
    border: 1px solid #f5d742;
}

.bet-info.success {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

/* Статус */
.status-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #1d3d28;
    padding: 12px 20px;
    border-radius: 60px;
    border: 2px solid #b48b4a;
    margin-bottom: 10px;
}

.balance {
    color: #f5eac1;
    font-weight: 600;
    font-size: 1.1rem;
}

.balance span {
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: 700;
}

.history {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f5eac1;
    font-weight: 600;
}

.history-dot {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #b48b4a;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    margin: 0 2px;
}

.history-dot.red { background: #c0392b; }
.history-dot.black { background: #2c3e50; }
.history-dot.green { background: #27ae60; }

.btn-reset {
    padding: 6px 18px;
    border-radius: 30px;
    border: 2px solid #b48b4a;
    background: #3f5a3a;
    color: #f5eac1;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-reset:hover {
    background: #5a7a52;
}

.btn-reset:active {
    transform: scale(0.95);
}

.message {
    text-align: center;
    padding: 10px;
    border-radius: 30px;
    background: #0f1f12;
    border-left: 4px solid #f5d742;
    color: #f5eac1;
    font-weight: 500;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Мобильная адаптация */
@media (max-width: 700px) {
    .container { padding: 15px; }
    .game-area { flex-direction: column; align-items: center; }
    .wheel-wrapper { width: 240px; height: 240px; }
    .numbers-grid { grid-template-columns: repeat(6, 1fr); }
    .number-cell { padding: 8px 0; font-size: 0.8rem; }
    .status-bar { flex-direction: column; align-items: stretch; }
    .history { flex-wrap: wrap; justify-content: center; }
    .history-dot { width: 26px; height: 26px; line-height: 26px; font-size: 0.7rem; }
    h1 { font-size: 1.5rem; }
    .pointer { font-size: 30px; top: -15px; }
}
