/* ==========================================================================
   KULE-İ MİMAR - FİZİK TABANLI OSMANLI KULE İNŞA OYUNU STİLLERİ
   ========================================================================== */

.km-shell {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: center;
}

.km-hud-bar {
    width: 100%;
    max-width: 520px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.km-hud-box {
    background: var(--bg-surface);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.5rem;
    text-align: center;
}

.km-hud-lbl {
    display: block;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
}

.km-hud-val {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.km-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    border: 2px solid var(--gold-primary);
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(180deg, #07101f 0%, #0d1f36 55%, #162e45 100%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 18px var(--gold-glow);
}

.km-canvas {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
}

.km-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 12, 22, 0.78);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    gap: 0.75rem;
}

.km-overlay.is-hidden {
    display: none;
}

.km-talismans-bar {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.km-energy-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--gold-border);
    overflow: hidden;
}

.km-energy-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #b45309, #f59e0b, #fde68a);
    transition: width 0.25s ease;
}

.km-talisman-btns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.km-talisman-btn {
    padding: 0.48rem 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-border);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.km-talisman-btn:hover:not(:disabled) {
    border-color: var(--gold-bright);
    background: rgba(197, 160, 89, 0.16);
}

.km-talisman-btn.is-ready {
    border-color: var(--gold-bright);
    box-shadow: 0 0 10px var(--gold-glow);
    color: var(--gold-bright);
}

.km-talisman-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.km-touch-controls {
    width: 100%;
    max-width: 520px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
}

.km-touch-btn {
    min-height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-border);
    background: var(--bg-surface);
    color: var(--gold-bright);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
}

.km-touch-btn:active {
    background: rgba(197, 160, 89, 0.28);
    transform: scale(0.96);
}

.km-help-line {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 480px) {
    .km-hud-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .km-talisman-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.25rem;
    }
}
