/* KELİMOR Game Styles */
.game-page .app-main { padding-bottom: 16px; }

.game-container {
    display: flex; flex-direction: column; min-height: calc(100vh - var(--header-height));
    padding: 8px 16px 16px; user-select: none; -webkit-user-select: none;
}

.game-top-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0 16px;
}
.game-score, .game-combo, .game-level { text-align: center; }
.score-label, .combo-label, .level-label { display: block; font-size: 11px; color: var(--text-muted); font-weight: 600; }
.level-value { font-size: 20px; font-weight: 800; color: var(--text); }
.score-value { font-size: 22px; font-weight: 800; color: var(--primary); }
.combo-value { font-size: 18px; font-weight: 800; color: var(--warning); transition: transform .2s; }
.combo-value.pulse { animation: comboPulse .3s ease; }
@keyframes comboPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* Word Slots */
.word-slots {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 12px; padding: 16px 0; min-height: 120px;
}
.word-row {
    display: flex; gap: 6px; padding: 8px 16px;
    background: var(--surface); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); transition: all .3s;
}
.word-row.found { background: #DCFCE7; }
.letter-slot {
    width: 28px; height: 36px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 800; color: var(--text-muted);
    border-bottom: 3px solid var(--border);
}
.letter-revealed {
    width: 28px; height: 36px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 800; color: var(--success);
    animation: revealLetter .4s ease;
}
@keyframes revealLetter {
    0% { transform: scale(0) rotateY(90deg); opacity: 0; }
    100% { transform: scale(1) rotateY(0); opacity: 1; }
}
.word-found { display: flex; gap: 4px; }
.success-pop { animation: successPop .5s ease; }
@keyframes successPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Current Word Display */
.current-word-display {
    text-align: center; font-size: 28px; font-weight: 800; letter-spacing: 4px;
    min-height: 40px; color: var(--primary); padding: 8px;
    transition: transform .2s;
}
.current-word-display.shake { animation: shake .5s ease; }
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

/* Letter Wheel */
.letter-wheel-container {
    position: relative; width: 300px; height: 300px; margin: 0 auto;
}
.letter-lines {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
}
.letter-wheel {
    position: relative; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(79,70,229,.06) 0%, transparent 70%);
    border-radius: 50%;
}
.letter-btn {
    position: absolute; width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: 22px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(79,70,229,.3);
    transition: transform .15s, box-shadow .15s, background .15s;
    z-index: 2; touch-action: none;
}
.letter-btn:active, .letter-btn.selected {
    transform: scale(1.15);
    box-shadow: 0 6px 25px rgba(79,70,229,.5);
    background: linear-gradient(135deg, var(--success), #16A34A);
}

.btn-shuffle {
    position: absolute; bottom: -8px; right: -8px; width: 44px; height: 44px;
    border-radius: 50%; background: var(--surface); box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); z-index: 3; border: none; cursor: pointer;
}

.btn-hint-fab {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--warning), #D97706);
    color: #fff;
    box-shadow: 0 6px 24px rgba(245, 158, 11, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-hint-fab:active { transform: translateY(-50%) scale(.95); }

/* Hint Modal */
.hint-modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.hint-modal.hidden { display: none; }
.hint-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,.55);
}
.hint-modal-content {
    position: relative;
    background: var(--surface); border-radius: var(--radius);
    padding: 24px; width: 100%; max-width: 360px;
    animation: popIn .25s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}
.hint-modal-content h3 { text-align: center; margin-bottom: 16px; font-size: 18px; }
.hint-option {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 14px 16px; background: var(--background); border-radius: var(--radius-sm);
    margin-bottom: 8px; transition: background .2s; min-height: 44px;
    border: none; cursor: pointer; color: var(--text);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.hint-option:active { background: rgba(79,70,229,.15); }
.hint-icon { font-size: 24px; }
.hint-name { flex: 1; font-weight: 700; text-align: left; }
.hint-cost { font-size: 13px; color: var(--warning); font-weight: 700; }
.hint-close {
    width: 100%; padding: 12px; margin-top: 8px; color: var(--text-muted);
    font-weight: 600; border: none; background: transparent; cursor: pointer;
}

/* Level Complete Modal */
.level-complete-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center; z-index: 300;
    padding: 20px;
}
.level-complete-content {
    background: var(--surface); border-radius: var(--radius); padding: 32px 24px;
    text-align: center; width: 100%; max-width: 400px;
    animation: popIn .4s ease; position: relative; overflow: hidden;
}
@keyframes popIn {
    0% { transform: scale(.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.complete-icon { font-size: 48px; margin-bottom: 8px; }
.level-complete-content h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.stars-display { margin-bottom: 20px; }
.star { font-size: 32px; opacity: .3; display: inline-block; transition: all .3s; }
.star.filled { opacity: 1; animation: starPop .5s ease; }
@keyframes starPop {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0); }
}
.complete-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px;
}
.complete-stat span { display: block; font-size: 18px; font-weight: 800; color: var(--primary); }
.complete-stat small { font-size: 11px; color: var(--text-muted); }
.complete-rewards {
    display: flex; justify-content: center; gap: 16px; margin-bottom: 20px;
    font-weight: 700; font-size: 16px;
}
.complete-rewards span:first-child { color: var(--primary); }
.complete-rewards span:last-child { color: var(--warning); }
.complete-actions { display: flex; flex-direction: column; gap: 8px; }
.complete-actions .btn { width: 100%; }

/* Confetti */
.confetti-container { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-piece {
    position: absolute; top: -10px; width: 8px; height: 8px;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

@media (min-width: 768px) {
    .letter-wheel-container { width: 340px; height: 340px; }
    .letter-btn { width: 60px; height: 60px; font-size: 24px; }
}
