body {
    background-color: #d0e7f9; /* Light blue-grey background */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.header, .container {
    width: 80%;
    max-width: 1000px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.header-text, .column {
    width: 50%;
}

.header-text h1, .column h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-align: center;
}

.header-text p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.header-image {
    width: 45%;
}

.header-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
}

.games-container {
    width: 80%;
    max-width: 1000px;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.column {
    width: 45%;
    max-width: 1000px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card, .word {
    width: 100%;
    background-color: #f0f8ff;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
    text-align: center;
}

.game-card h2, .word {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.game-card p {
    font-size: 1em;
    margin-bottom: 15px;
}

.game-card a, #restart-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}

.game-card a:hover, #restart-button:hover {
    background-color: #45a049;
}

#round-info {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.sentence-container {
    background-color: #f0f8ff;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.sentence {
    font-size: 1.1em;
}

.dropdown {
    padding: 5px;
    margin: 0 3px;
    font-size: 1em;
}

.dropdown.correct {
    background-color: #c8e6c9; /* Light green */
}

.dropdown.incorrect {
    background-color: #ffcdd2; /* Light red */
}

.info-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 1.2em;
    color: #888;
}

.info-icon:hover {
    color: #555;
}

.tooltip {
    display: none;
    position: absolute;
    top: -5px;
    right: 30px;
    background-color: rgba(255,255,255,0.9);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
    max-width: 300px;
    z-index: 1000;
}

.info-icon:hover + .tooltip {
    display: block;
}

#game-over {
    display: none;
    text-align: center;
    margin-top: 50px;
}

#restart-button {
    padding: 10px 20px;
    font-size: 1.2em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
    margin-top: 20px;
}

#restart-button:hover {
    background-color: #45a049;
}

/* Animation for disappearing words */
.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Animation for correct match flash */
.flash-green {
    animation: flashGreen 0.5s;
}

@keyframes flashGreen {
    0% { background-color: #a8dadc; }
    50% { background-color: #4CAF50; }
    100% { background-color: #a8dadc; }
}

/* Animation for incorrect match flash */
.flash-red {
    animation: flashRed 0.5s;
}

@keyframes flashRed {
    0% { background-color: #a8dadc; }
    50% { background-color: #f44336; }
    100% { background-color: #a8dadc; }
}

/* Additional styling for word details */
.word-details {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
}

#comments {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    display: none;
    font-size: 1.2em;
    z-index: 1000;
}

#game-over {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(208, 231, 249, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

#game-over h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.word {
    padding: 10px;
    margin: 5px 0;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.word.selected {
    background-color: #a8dadc; /* Highlight color */
    transform: scale(0.98);
}

.word.matched {
    display: none;
}

/* Der Die Das Game Specific Styles */
#words-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 600px;
    margin: 20px 0;
}

.word-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.word {
    flex: 1;
    text-align: left;
    padding: 10px 15px;
    font-size: 1.2em;
}

.dropdown {
    flex: 0 0 100px;
    padding: 5px;
    font-size: 1em;
}

.info-icon {
    flex: 0 0 30px;
    text-align: center;
    font-size: 1.2em;
    cursor: pointer;
}

.tooltip {
    display: none;
    position: absolute;
    top: -5px;
    right: 30px;
    background-color: rgba(255,255,255,0.9);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
    max-width: 300px;
    z-index: 1000;
}

.info-icon:hover + .tooltip {
    display: block;
}

#game-over {
    display: none;
    text-align: center;
    margin-top: 50px;
}

#restart-button {
    padding: 10px 20px;
    font-size: 1.2em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
    margin-top: 20px;
}

#restart-button:hover {
    background-color: #45a049;
}

/* Responsive Design Adjustments */
@media (max-width: 600px) {
    .word-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown {
        width: 100%;
        margin-top: 10px;
    }

    .info-icon {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .tooltip {
        right: 10px;
    }
}
