/* style.css */

/* Grundlegende Einstellungen */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-image: url('images/background.jpg');
    background-size: cover;
    background-attachment: fixed;
    color: #333;
    overflow-x: hidden; /* Verhindert horizontales Scrollen durch Schneeflocken */
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

header {
    background-color: #a52a2a;
    color: white;
    padding: 1em 0;
    text-align: center;
    box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 2.5em;
    font-family: 'Henny Penny', cursive;
    text-shadow: 0.1em 0.1em #8b0000;
}

main {
    flex: 1 0 auto;
    padding: 1em;
    padding-bottom: 60px; /* Höhe des Footers berücksichtigen */
    text-align: center;
}

.controls {
    margin-bottom: 1em;
}

button {
    background-color: #228B22;
    border: none;
    color: white;
    padding: 0.8em 1.5em;
    text-align: center;
    text-decoration: none;
    font-size: 1em;
    margin: 0.5em;
    border-radius: 0.3em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    background-color: #006400;
    transform: scale(1.05);
}

/* Grundstile für die Schneeflocken */
.snowflake {
    position: absolute;
    top: -10%;
    color: white;
    user-select: none;
    opacity: 0.8;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

/* Keyframe-Animationen */
@keyframes fall-right {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(80px) translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes fall-left {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-80px) translateY(110vh) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes sway {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translateX(40px) translateY(25vh) rotate(90deg);
    }
    50% {
        transform: translateX(-40px) translateY(50vh) rotate(180deg);
    }
    75% {
        transform: translateX(40px) translateY(75vh) rotate(270deg);
    }
    100% {
        transform: translateX(0) translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Positionierung der Schneeflocken */
.snowflake:nth-child(1) {
    left: 2%;
    animation: fall-right 10s linear infinite;
    animation-delay: 0s;
    font-size: 1em;
        z-index: 2;
}

.snowflake:nth-child(2) {
    left: 7%;
    animation: fall-left 12s linear infinite;
    animation-delay: 1s;
    font-size: 1.2em;
}

.snowflake:nth-child(3) {
    left: 12%;
    animation: sway 14s linear infinite;
    animation-delay: 2s;
    font-size: 1.5em;
}

.snowflake:nth-child(4) {
    left: 17%;
    animation: fall-right 11s linear infinite;
    animation-delay: 3s;
    font-size: 1.1em;
            z-index: 2;

}

.snowflake:nth-child(5) {
    left: 22%;
    animation: fall-left 13s linear infinite;
    animation-delay: 4s;
    font-size: 1.3em;
}

.snowflake:nth-child(6) {
    left: 27%;
    animation: sway 15s linear infinite;
    animation-delay: 5s;
    font-size: 1.4em;
}

.snowflake:nth-child(7) {
    left: 32%;
    animation: fall-right 10s linear infinite;
    animation-delay: 6s;
    font-size: 1em;
            z-index: 2;

}

.snowflake:nth-child(8) {
    left: 37%;
    animation: fall-left 12s linear infinite;
    animation-delay: 7s;
    font-size: 1.2em;
            z-index: 2;

}

.snowflake:nth-child(9) {
    left: 42%;
    animation: sway 14s linear infinite;
    animation-delay: 8s;
    font-size: 1.5em;
}

.snowflake:nth-child(10) {
    left: 47%;
    animation: fall-right 11s linear infinite;
    animation-delay: 9s;
    font-size: 1.1em;
            z-index: 2;

}

.snowflake:nth-child(11) {
    left: 52%;
    animation: fall-left 13s linear infinite;
    animation-delay: 0.5s;
    font-size: 1.3em;
}

.snowflake:nth-child(12) {
    left: 57%;
    animation: sway 15s linear infinite;
    animation-delay: 1.5s;
    font-size: 1.4em;
}

.snowflake:nth-child(13) {
    left: 62%;
    animation: fall-right 10s linear infinite;
    animation-delay: 2.5s;
    font-size: 1em;
            z-index: 2;

}

.snowflake:nth-child(14) {
    left: 67%;
    animation: fall-left 12s linear infinite;
    animation-delay: 3.5s;
    font-size: 1.2em;
}

.snowflake:nth-child(15) {
    left: 72%;
    animation: sway 14s linear infinite;
    animation-delay: 4.5s;
    font-size: 1.5em;
}

.snowflake:nth-child(16) {
    left: 77%;
    animation: fall-right 11s linear infinite;
    animation-delay: 5.5s;
    font-size: 1.1em;
            z-index: 2;

}

.snowflake:nth-child(17) {
    left: 82%;
    animation: fall-left 13s linear infinite;
    animation-delay: 6.5s;
    font-size: 1.3em;
}

.snowflake:nth-child(18) {
    left: 87%;
    animation: sway 15s linear infinite;
    animation-delay: 7.5s;
    font-size: 1.4em;
            z-index: 2;

}

.snowflake:nth-child(19) {
    left: 92%;
    animation: fall-right 10s linear infinite;
    animation-delay: 8.5s;
    font-size: 1em;
}

.snowflake:nth-child(20) {
    left: 97%;
    animation: fall-left 12s linear infinite;
    animation-delay: 9.5s;
    font-size: 1.2em;
}
/* Weitere Schneeflocken-Stile ... */

/* Aktuelles gezogenes Symbol */
.current-draw {
    margin: 1em auto;
    width: 80%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    border: 0.25em solid #a52a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.2);
}

.current-draw img {
    width: 100%;
    height: auto;
}

.current-draw p {
    font-size: 1.2em;
    color: #8b0000;
}

/* History Grid */
.history {
    margin-top: 0.5em;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1em;
    border-radius: 0.6em;
    display: inline-block;
    max-width: 90%;
    min-width: 25%;
    width: auto;
    text-align: center;
}

.history h2 {
    color: #a52a2a;
    font-family: 'Georgia', serif;
    margin-bottom: 0.5em;
}

.history-grid {
    /*display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 0.5em;*/
}

.history-grid img {
    width: 100%;
    height: auto;
    max-width: 50px;
    max-height: 50px;
    object-fit: cover;
    border: 0.125em solid #a52a2a;
    border-radius: 0.3em;
    transition: transform 0.2s;
    margin: 5px;
}

.history-grid img:hover {
    transform: scale(1.1);
}

/* Footer */
footer {
    background-color: #a52a2a;
    color: white;
    padding: 0.5em 0;
    text-align: center;
    box-shadow: 0 -0.25em 0.5em rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px; /* Feste Höhe für den Footer */
    z-index: 1;
}

/* Responsives Design */
@media (max-width: 600px) {
    h1 {
        font-size: 1.8em;
    }

    .current-draw {
        max-width: 250px;
    }

    .history-grid {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    }

    .history-grid img {
        max-width: 40px;
        max-height: 40px;
    }

    button {
        padding: 0.6em 1em;
        font-size: 0.9em;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 1.5em;
    }

    .current-draw {
        max-width: 200px;
    }

    .history-grid {
        grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
    }

    .history-grid img {
        max-width: 30px;
        max-height: 30px;
    }

    button {
        padding: 0.5em 0.8em;
        font-size: 0.8em;
    }
}