body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

.logo-text-container {
    display: flex;
    align-items: center;
    padding: 10px;
    justify-content: center;
}

.logo-text-container img {
    width: 160px;
    margin-right: 15px;
}

.headline-text {
    font-size: 22px;
    font-weight: bold;
}

main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px 20px;
}

.game-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

#boxcard {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 625px;
    max-width: 100%;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    background: #fdfdfd;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

#boxcard div {
    aspect-ratio: 1 / 1;
    background: #ccff66;
    position: relative;
    overflow: hidden;
    border: 1px solid #999;
    border-radius: .5em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#boxcard div img {
    display: none;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.opacity {
    opacity: 0.6;
    pointer-events: none;
}

#boxbutton {
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 102, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.link, .link2 {
    font-size: 14px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: .5em;
    cursor: pointer;
    display: inline-block;
}

.link {
    background: #006600;
    color: #ccff66;
}

.link:hover {
    background: #ccff66;
    color: #006600;
}

.link2 {
    background: #ccff66;
    color: #006600;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

#msg {
    font-size: 16px;
    font-weight: bold;
    color: #006600;
    text-align: center;
    word-break: break-word;
}

select.link {
    padding: 6px;
    font-size: 14px;
}

/* Responsive Layout für Tablets & Handys */
@media (max-width: 768px) {
    .game-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    #boxcard {
        grid-template-columns: repeat(4, 1fr);
        width: 90vw;
        max-width: 400px;
        padding: 10px;
        gap: 8px;
    }

    #boxbutton {
        width: 100%;
        max-width: 420px;
        margin-top: 10px;
        padding: 15px;
        gap: 15px;
    }

    .logo-text-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo-text-container img {
        width: 180px;
        margin-bottom: 10px;
    }

    .headline-text {
        font-size: 20px;
    }

    .link2 {
        font-size: 16px;
        word-wrap: break-word;
    }

    .link, select.link {
        font-size: 14px;
        padding: 6px 10px;
    }

    #msg {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #boxcard {
        gap: 6px;
    }

    .logo-text-container img {
        width: 140px;
    }

    .headline-text {
        font-size: 18px;
    }

    .link, select.link {
        font-size: 13px;
        padding: 5px 8px;
    }

    #boxbutton {
        padding: 12px;
    }
}