:root {
    --correct-color: #4CAF50;
    --incorrect-color: #D32F2F;
    --primary-bg: #f9f9f9;
    --highlight: #007bff;
    --border-radius: 6px;
    --gap: 10px;
    --font-size: 24px;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
    font-size: var(--font-size);
    background-color: var(--primary-bg);
    color: #333;
}

h1 {
    margin: 20px;
    font-size: 2em;
    color: #222;
    text-align: center;
}

.game-content {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    gap: var(--gap);
    margin: 0 auto;
}

.sentence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #fff;
    padding: 12px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 6px;
    width: 100%;
    max-width: 1000px;
}

.sentences {
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    align-items: center;
    /* ⬅️ center the sentence blocks inside */
    margin: 0 auto;
    /* ⬅️ center the entire .sentences block */
}

#emptyMessage {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: gray;
    font-weight: 600;
    font-size: 1.2em;
}

.words {
    position: fixed;
    right: 30px;
    top: 100px;
    width: 15%;
    min-height: 15%;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.words:has(#emptyMessage:only-child) {
    justify-content: center;
    align-items: center;
}

.word {
    padding: 6px 12px;
    background-color: #e0e0e0;
    border: 1px solid #999;
    border-radius: var(--border-radius);
    cursor: grab;
    user-select: none;
    height: 1.2em;
    white-space: nowrap;
}

.word:hover {
    background-color: #d0d0d0;
}

.blank {
    border: 2px dashed #aaa;
    min-width: 140px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: var(--border-radius);
    padding: 5px;
    box-sizing: border-box;
    transition: background-color 0.3s;
    font-weight: bold;
}

.check-button {
    margin-top: 30px;
    font-size: 20px;
    background-color: var(--highlight);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.check-button:hover {
    background-color: #0056b3;
}

.back-link {
    align-self: flex-start;
    font-size: 16px;
    text-decoration: none;
    color: var(--highlight);
    transition: color 0.3s;
}

.back-link:hover {
    color: #0056b3;
}

.check-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    width: 100%;
}