/* ================================================
   Lotto 6 aus 49 - Spezifische Styles
   ================================================

   Styles für die interaktive Lotto-Simulation
   ================================================ */

/* ================================================
   Lottery Slip (Tippschein)
   ================================================ */
.lottery-slip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    max-width: 400px;
    min-height: 300px;
    margin: 0 auto 1rem auto;
    align-content: start;
}

.slip-number {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
}

.slip-number:hover {
    background-color: #e9ecef;
    transform: scale(1.05);
    border-color: #3498db;
}

.slip-number.marked {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-color: #2980b9;
    transform: scale(1.1);
}

.slip-number.matched {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border-color: #229954;
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.5);
}

.slip-number.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slip-number.disabled:hover {
    transform: none;
    background-color: white;
}

/* ================================================
   Lottery Machine (Lottotrommel)
   ================================================ */
.lottery-machine {
    position: relative;
    width: 100%;
    max-width: 400px;
    min-height: 300px;
    margin: 0 auto 1rem auto;
}

.lottery-drum {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    min-height: 300px;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e6f1 100%);
    border: 4px solid #3498db;
    border-radius: 50%;
    overflow: hidden;
    box-shadow:
        inset 0 0 30px rgba(52, 152, 219, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ================================================
   Floating Balls (Schwebende Kugeln)
   ================================================ */
.floating-balls {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floating-ball {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #3498db 60%, #2471a3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

/* Verschiedene Animationsverzögerungen für natürliche Bewegung */
.floating-ball:nth-child(2n) {
    animation-delay: 0.5s;
    animation-duration: 3.5s;
}

.floating-ball:nth-child(3n) {
    animation-delay: 1s;
    animation-duration: 4s;
}

.floating-ball:nth-child(5n) {
    animation-delay: 1.5s;
    animation-duration: 3.2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-15px) translateX(10px);
    }
    50% {
        transform: translateY(-5px) translateX(-10px);
    }
    75% {
        transform: translateY(-20px) translateX(5px);
    }
}

/* Animation beim Ziehen einer Kugel */
.floating-ball.drawing {
    animation: drawBall 1s ease-out forwards;
}

@keyframes drawBall {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(0.2) translateY(-100px);
        opacity: 0;
    }
}

/* ================================================
   Ball Container (Gezogene Zahlen)
   ================================================ */
.ball-container {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    min-height: 120px;
}

.ball-container h3,
.ball-container h4 {
    color: #2471a3;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
}

#drawn-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 60px;
}

.lottery-ball,
.drawn-ball {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #3498db 60%, #2471a3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Superzahl Container */
#superzahl-container {
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
}

#superzahl {
    display: flex;
    justify-content: center;
}

.superzahl-ball {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e74c3c 60%, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ================================================
   Ergebnis-Anzeige
   ================================================ */
.result-highlight {
    background: linear-gradient(135deg, #d4e6f1 0%, #ebf5fb 100%);
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.result-highlight.jackpot {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left-color: #e74c3c;
}

.result-highlight h4 {
    color: #2471a3;
    margin-top: 0;
    font-size: 1.2rem;
}

.result-highlight.jackpot h4 {
    color: #c0392b;
}

/* ================================================
   Lösungs-Buttons
   ================================================ */
.show-solution-btn {
    margin-top: 10px;
}

.solution-steps {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.solution-steps h5 {
    color: #2471a3;
    margin-top: 0;
}

/* ================================================
   Responsive Anpassungen
   ================================================ */
@media (max-width: 768px) {
    .lottery-slip {
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
        padding: 10px;
    }

    .slip-number {
        font-size: 0.85rem;
    }

    .floating-ball {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .lottery-ball,
    .drawn-ball {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .superzahl-ball {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .lottery-drum {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .lottery-slip {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        padding: 8px;
    }

    .slip-number {
        font-size: 0.75rem;
        border-width: 1px;
    }

    .floating-ball {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }

    .lottery-ball,
    .drawn-ball {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .superzahl-ball {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lottery-drum {
        max-width: 250px;
    }
}

/* ================================================
   Touch-Optimierung
   ================================================ */
@media (pointer: coarse) {
    .slip-number {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ================================================
   Print-Styles
   ================================================ */
@media print {
    .lottery-machine,
    .floating-balls,
    button {
        display: none;
    }

    .ball-container {
        page-break-inside: avoid;
    }
}
