/* Lottery Number Generator Styles */

/* Common Styles */
.generator-container {
    min-height: 80vh;
    padding: 2rem 0;
}

.number-count-selector .btn-check:checked + .btn {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.style-selector .btn-check:checked + .btn {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(var(--bs-primary-rgb), 0.5);
}

.generated-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.number-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.number-ball.revealed {
    opacity: 1;
    transform: scale(1);
}

.number-ball.revealing {
    animation: revealBall 0.5s ease forwards;
}

@keyframes revealBall {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
    100% { transform: scale(1) rotate(360deg); opacity: 1; }
}

/* Slot Machine Styles */
.slot-machine {
    background: linear-gradient(180deg, #2a2a3e, #1a1a2e);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.slot-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.slot-header h2 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-weight: bold;
}

.slot-display {
    background: #000;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 100px;
    border: 3px solid #444;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.slot-reel {
    width: 70px;
    height: 80px;
    background: linear-gradient(180deg, #1a1a2e, #0a0a1e);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    border: 2px solid #333;
    overflow: hidden;
    position: relative;
}

.slot-reel.spinning {
    animation: slotSpin 0.1s linear infinite;
}

.slot-reel.stopping {
    animation: slotStop 0.3s ease-out forwards;
}

@keyframes slotSpin {
    0% { content: attr(data-num); }
    100% { transform: translateY(-10px); }
}

.slot-reel .reel-number {
    position: absolute;
    transition: transform 0.1s;
}

.slot-reel.spinning .reel-number {
    animation: numberScroll 0.08s linear infinite;
}

@keyframes numberScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

.slot-lever {
    position: relative;
    width: 60px;
    height: 120px;
    margin-left: 2rem;
}

.lever-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 20px;
    background: #666;
    border-radius: 5px;
}

.lever-arm {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 80px;
    background: linear-gradient(90deg, #888, #aaa, #888);
    border-radius: 6px;
    transform-origin: bottom center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lever-arm:hover {
    transform: translateX(-50%) rotate(-5deg);
}

.lever-arm.pulled {
    animation: pullLever 0.5s ease;
}

@keyframes pullLever {
    0% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(45deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

.lever-ball {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ff4444, #aa0000);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.spin-button {
    background: linear-gradient(180deg, #ff4444, #cc0000);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 0 #990000, 0 10px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.1s ease;
}

.spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #990000, 0 12px 25px rgba(0, 0, 0, 0.4);
}

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

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dice Styles */
.dice-container {
    background: linear-gradient(180deg, #1e3a1e, #0d1f0d);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
}

.dice-header h2 {
    color: #7fff7f;
    text-shadow: 0 0 10px rgba(127, 255, 127, 0.5);
}

.dice-table {
    background: linear-gradient(180deg, #2d5a2d, #1a3a1a);
    border-radius: 15px;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border: 8px solid #3d2b1f;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.dice {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #fff, #e0e0e0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.dice.rolling {
    animation: diceRoll 0.3s ease-in-out infinite;
}

.dice.stopped {
    animation: diceStop 0.5s ease-out forwards;
}

@keyframes diceRoll {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes diceStop {
    0% { transform: rotate(0deg); }
    30% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

.roll-button {
    background: linear-gradient(180deg, #4caf50, #388e3c);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 0 #2e7d32, 0 10px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.1s ease;
}

.roll-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #2e7d32, 0 12px 25px rgba(0, 0, 0, 0.4);
}

.roll-button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #2e7d32, 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Results Display */
.results-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.results-section h4 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.final-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.final-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    color: #000;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
}

/* Copy and regenerate buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.action-buttons .btn {
    min-width: 150px;
}

/* Celebration Animation */
@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.celebrating {
    animation: celebrate 0.5s ease 3;
}

/* Responsive */
@media (max-width: 576px) {
    .slot-reel {
        width: 50px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .dice {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .number-ball {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}
