/* Dice Game Styles */

.dice-game-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
}

.dice-game-container * {
    box-sizing: border-box;
}

/* Dark Theme */
.dice-game-container[data-theme="dark"] {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%);
    color: #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Light Theme */
.dice-game-container[data-theme="light"] {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    color: #2d3748;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Header */
.dice-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.game-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
}

.logo-icon {
    font-size: 32px;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-label {
    font-size: 14px;
    opacity: 0.7;
}

.balance-amount {
    font-size: 24px;
    font-weight: bold;
    color: #48bb78;
}

.balance-currency {
    font-size: 14px;
    opacity: 0.7;
}

/* Game Interface */
.dice-game-interface {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    padding: 0 20px 20px;
}

@media (max-width: 1024px) {
    .dice-game-interface {
        grid-template-columns: 1fr;
    }
}

/* Left Panel - Controls */
.game-controls-panel {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-section {
    margin-bottom: 25px;
}

.control-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

.game-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
}

.game-input:focus {
    outline: none;
    border-color: #4299e1;
    background: rgba(255, 255, 255, 0.08);
}

.game-input.small {
    width: auto;
    padding: 8px 12px;
}

/* Quick Bet Buttons */
.quick-bet-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.quick-bet-btn {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quick-bet-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Slider */
.game-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.game-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4299e1;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.5);
}

.game-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4299e1;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.6;
}

/* Multiplier and Profit Display */
.multiplier-display,
.profit-display {
    padding: 12px 16px;
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #4299e1;
}

.profit-display {
    background: rgba(72, 187, 120, 0.1);
    border-color: rgba(72, 187, 120, 0.3);
    color: #48bb78;
}

/* Roll Button */
.roll-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
}

.roll-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.6);
}

.roll-button:active {
    transform: translateY(0);
}

.roll-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.button-icon {
    font-size: 24px;
}

/* Auto Roll Controls */
.auto-roll-section {
    margin-top: 15px;
}

.auto-roll-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auto-roll-btn,
.stop-auto-btn {
    flex: 1;
    padding: 10px 16px;
    background: rgba(72, 187, 120, 0.2);
    border: 1px solid rgba(72, 187, 120, 0.4);
    border-radius: 6px;
    color: #48bb78;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.stop-auto-btn {
    background: rgba(245, 101, 101, 0.2);
    border-color: rgba(245, 101, 101, 0.4);
    color: #f56565;
}

.auto-roll-btn:hover,
.stop-auto-btn:hover {
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* Reset Button */
.reset-button {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.reset-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Right Panel - Display */
.game-display-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Roll Result Display */
.roll-result-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.result-header {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 15px;
}

.result-number {
    font-size: 72px;
    font-weight: bold;
    margin: 20px 0;
    color: #4299e1;
    text-shadow: 0 0 20px rgba(66, 153, 225, 0.5);
}

.result-status {
    font-size: 18px;
    font-weight: 600;
    margin-top: 15px;
}

.result-status.win {
    color: #48bb78;
}

.result-status.loss {
    color: #f56565;
}

/* Progress Bar */
.chance-progress-bar {
    position: relative;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    color: white;
    font-weight: bold;
}

.progress-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: #f56565;
    box-shadow: 0 0 10px rgba(245, 101, 101, 0.8);
    transition: left 0.5s ease;
    opacity: 0;
}

.progress-marker.visible {
    opacity: 1;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

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

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-value.win {
    color: #48bb78;
}

.stat-value.loss {
    color: #f56565;
}

/* History Container */
.history-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.9;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    padding: 30px;
    opacity: 0.5;
    font-size: 14px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.history-item.win {
    border-left: 3px solid #48bb78;
}

.history-item.loss {
    border-left: 3px solid #f56565;
}

.history-roll {
    font-weight: bold;
}

.history-profit {
    font-weight: 600;
}

.history-profit.positive {
    color: #48bb78;
}

.history-profit.negative {
    color: #f56565;
}

/* Scrollbar Styling */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Educational Notice */
.educational-notice {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.3);
    border-radius: 8px;
    color: #fc8181;
    font-size: 14px;
    font-weight: 600;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.rolling {
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.history-item {
    animation: slideIn 0.3s ease-out;
}
