:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --text-color: #FFFFFF;
    --accent-color: #FFEB3B;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --glow-color: rgba(76, 175, 80, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#game-container {
    margin: 0 auto;
    width: 600px;
    background: var(--surface-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
    display: none;
}

#level-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000000;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 8px var(--shadow-color);
    z-index: 10;
}

h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

#target-words-container {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

#target-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.word-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    min-width: 120px;
}

.word-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.word-box {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    font-size: 0;
    transition: transform 0.3s ease;
    gap: 4px;
}

.word-box:hover {
    transform: scale(1.05);
}

.letter-box {
    width: 35px;
    height: 35px;
    background-color: #333333;
    border: 2px solid #555555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    box-sizing: border-box;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.letter-box.filled {
    border-color: var(--primary-color);
    color: var(--accent-color);
    background-color: rgba(76, 175, 80, 0.2);
    box-shadow: 0 0 10px var(--glow-color);
    animation: reveal 0.5s ease;
}

.current-letter-box {
    border-color: var(--secondary-color);
    color: #000000;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 10px var(--glow-color);
}

@keyframes reveal {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.meaning {
    font-size: 16px;
    color: #888888;
    white-space: nowrap;
    font-style: italic;
    text-shadow: 0 0 5px rgba(255, 235, 59, 0.3);
    transition: all 0.3s ease;
}

.meaning.revealed {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--glow-color), 0 0 20px var(--glow-color);
    font-weight: bold;
}

#circle-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 30px auto;
    border-radius: 50%;
    background: radial-gradient(circle, #2c3e50, #1c1c1c);
    box-shadow: 0 0 20px var(--shadow-color);
}

.cell {
    position: absolute;
    background: linear-gradient(135deg, #434343, #242424);
    border: 2px solid #555555;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    color: var(--text-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.cell:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--glow-color);
}

.cell.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--accent-color);
    color: #000000;
    box-shadow: 0 0 20px var(--glow-color);
}

#word-display {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 15px;
    min-height: 40px;
}

#line-layer {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.line {
    stroke: var(--accent-color);
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0;
    transition: opacity 0.4s ease, stroke 0.3s ease;
    filter: drop-shadow(0 0 5px var(--glow-color));
}

.line.visible {
    opacity: 1;
    stroke: var(--primary-color);
}

#modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    max-width: 400px;
    width: 80%;
}

.modal-content p {
    font-size: 24px;
    margin-bottom: 20px;
}

#continue-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#continue-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--glow-color);
}

#hint-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: #333333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform 0.3s ease;
}

#hint-container:hover {
    transform: scale(1.1);
}

#hint-icon {
    font-size: 30px;
}

#hint-count {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #000000;
}

#hint-reward {
    display: none;
    font-size: 40px;
    margin-bottom: 10px;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px var(--accent-color), 0 0 10px var(--accent-color), 0 0 15px var(--accent-color);
    }

    to {
        text-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color), 0 0 30px var(--accent-color);
    }
}

#start-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}

#start-btn {
    padding: 20px 40px;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform 0.3s ease;
}

#start-btn:hover {
    transform: scale(1.05);
}