/* Hangul Builder Specific Styling */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    background: radial-gradient(circle at bottom left, #312e81, var(--background));
}

.game-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface-border);
}

.btn-back {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: transparent;
}

.score-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.target-zone {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.target-zone h2 {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.target-character {
    font-size: 4rem;
    line-height: 1.2;
    color: var(--text);
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.3s;
}

.target-roman {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 2px;
}

/* Drop slots using Grid */
.build-area {
    display: grid;
    gap: 0.75rem;
    justify-content: center;
    align-content: center;
    padding: 2rem;
    min-height: 220px;
    background: var(--surface-glass);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--surface-border);
    transition: all 0.3s ease;
}

.build-area.layout-horizontal {
    grid-template-columns: 80px 80px;
    grid-template-rows: 80px;
}

.build-area.layout-vertical {
    grid-template-columns: 80px;
    grid-template-rows: 80px 80px;
}

.build-area.layout-horizontal-batchim {
    grid-template-columns: 80px 80px;
    grid-template-rows: 80px 80px;
}
.layout-horizontal-batchim #slot-final {
    grid-column: 1 / span 2;
    justify-self: center;
}

.build-area.layout-vertical-batchim {
    grid-template-columns: 80px;
    grid-template-rows: 80px 80px 80px;
}

.slot {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--surface-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-family: var(--font-kr);
    font-weight: 700;
    color: var(--text);
    box-shadow: inset 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slot.filled-consonant {
    background: var(--consonant-bg);
    border-color: var(--consonant-bg);
    box-shadow: 0 4px 15px var(--consonant-shadow);
    transform: scale(1.05);
}

.slot.filled-vowel {
    background: var(--vowel-bg);
    border-color: var(--vowel-bg);
    box-shadow: 0 4px 15px var(--vowel-shadow);
    transform: scale(1.05);
}

/* Palette section */
.palette-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.palette-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 1rem;
    background: var(--surface-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.letter-block {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-family: var(--font-kr);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.letter-block.consonant {
    background: var(--surface);
    border: 2px solid var(--consonant-bg);
    color: var(--consonant-bg);
}

.letter-block.vowel {
    background: var(--surface);
    border: 2px solid var(--vowel-bg);
    color: var(--vowel-bg);
}

.letter-block:hover {
    transform: translateY(-4px) scale(1.05);
    background: var(--surface-glass);
}

.letter-block:active {
    transform: scale(0.95);
}

.letter-block.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}

.message-area {
    text-align: center;
    min-height: 2.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: -0.5rem;
}

.msg-correct {
    color: var(--success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.msg-incorrect {
    color: var(--error);
}

/* Combined Block Animation Target */
.combined-block {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    font-size: 5rem;
    font-family: var(--font-kr);
    font-weight: 900;
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
