:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --secondary: #00CEC9;
    --accent: #FDCB6E;
    --bg-overlay: rgba(255, 255, 255, 0.2);
    --text-color: #2D3436;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 900px;
    background: url('bg.png') center center;
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

/* UI Elements */
#game-ui {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    z-index: 10;
}

.level-indicator {
    background: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.gold-box {
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Overlays */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 10px;
}

.letter {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 900;
    border-radius: 8px;
    box-shadow: 0 4px 0 var(--primary-dark);
}

/* Game Areas */
#puzzle-area {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

#word-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
}

.grid-word {
    display: flex;
    gap: 6px;
}

.grid-letter {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 900;
    color: transparent;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid-letter.revealed {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Word Preview */
#word-preview-container {
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#word-preview {
    background: var(--primary);
    color: white;
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    min-width: 100px;
    text-align: center;
    display: none;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
}

/* letter input circle */
#input-area {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#letter-circle {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.circle-letter {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
    position: absolute;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: transform 0.1s, background 0.3s;
}

.circle-letter.selected {
    background: var(--primary);
    color: white;
    transform: translate(-50%, -50%) scale(1.15);
}

/* Action buttons */
#action-bar {
    padding: 20px;
    display: flex;
    justify-content: space-between;
}

.action-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.action-btn:active {
    transform: scale(0.9);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
    transition: all 0.2s;
}

.btn-primary:active {
    transform: translateY(4px);
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

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

.pop {
    animation: pop 0.3s ease;
}