/* =============================================================
   style.css – Global Stiller, Mobil Layout
   ============================================================= */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050520;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    touch-action: none;
}

/* ─── Oyun kapsayıcısı ─── */
#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ─── Canvas ─── */
#gameCanvas {
    display: block;
    image-rendering: optimizeSpeed;
    image-rendering: crisp-edges;
    cursor: pointer;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    background: #050520;
}

/* ─── UI Overlay (HTML menüsü için) ─── */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#ui-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ─── Ekranlar ─── */
.screen {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.screen.active {
    display: flex;
}

/* ─── Menü ekranı ─── */
#menu-screen {
    background: transparent;
    padding: 20px;
}

/* ─── Başlat Butonu (HTML) ─── */
#start-btn {
    margin-top: auto;
    margin-bottom: 50px;
    padding: 16px 56px;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(180deg, #e06090 0%, #c03060 50%, #a02050 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow:
        0 4px 16px rgba(200, 60, 100, 0.5),
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    letter-spacing: 1px;
    pointer-events: auto;
    touch-action: manipulation;
}

#start-btn:active,
#start-btn.pressed {
    transform: scale(0.95) translateY(2px);
    box-shadow:
        0 2px 8px rgba(200, 60, 100, 0.4),
        0 1px 2px rgba(0,0,0,0.3);
}

#start-btn:hover {
    background: linear-gradient(180deg, #f070A0 0%, #d04070 50%, #b03060 100%);
}

/* ─── Mobil uyum ─── */
@media (max-width: 375px) {
    #start-btn {
        padding: 14px 44px;
        font-size: 18px;
    }
}

@media (min-width: 601px) {
    #game-container {
        background: radial-gradient(ellipse at center, #0D0520 0%, #000010 100%);
    }
    #gameCanvas {
        border-radius: 12px;
        box-shadow:
            0 0 60px rgba(120, 80, 200, 0.35),
            0 0 0 1px rgba(255,255,255,0.06);
    }
}

/* ─── Dikey yönlendirme uyarısı (küçük landscape) ─── */
@media (max-height: 400px) and (orientation: landscape) {
    #game-container::before {
        content: 'Lütfen telefonu dik tutun';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 18px;
        text-align: center;
        z-index: 1000;
        background: rgba(0,0,0,0.8);
        padding: 16px 24px;
        border-radius: 12px;
        width: 80%;
    }
}
