:root {
    --vurgu: #a3151d;
    --vurgu-rgb: 163, 21, 29;
    --vurgu-acik: #d92b34;
    --vurgu-acik-rgb: 217, 43, 52;
    --bugday: #ededed;
    --bugday-rgb: 237, 237, 237;
    --panel-rgb: 25, 25, 27;
    --panel2-rgb: 15, 15, 16;
    --perde-rgb: 7, 7, 8;
    --d-zemin: #141415;
    --d-k1: #232325;
    --d-k2: #19191b;
    --d-k3: #19191b;
    --d-p1: #2a2a2d;
    --d-p2: #19191b;
    --d-g1: #0f0f10;
    --d-g2: #1b1b1d;
}

/* ---------- Genel ayarlar ---------- */
* {
    box-sizing: border-box;
    margin: 0;
}

html,
body {
    height: 100%;
}

/* Metinler seçilemesin, telefonda basılı tutunca menü/önizleme çıkmasın, resimler sürüklenemesin */
html {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
img,
a {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

body {
    font-family: "Archivo", Arial, sans-serif;
    background: var(--d-zemin);
    color: #f6f4ee;
    overflow: hidden;
}

/* ---------- Arka plan: 3D sahnenin çizildiği alan ---------- */
#showroom {
    position: fixed;
    inset: 0;
    background: var(--d-g1);
    transition:
        filter 0.9s,
        transform 1.2s;
}



/* Açılış penceresi dururken arkadaki showroom bulanık görünsün */
#showroom.bulanik {
    filter: blur(14px) brightness(0.55);
    transform: scale(1.06);
}

/* ---------- Üst şerit (header) ---------- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    height: 80px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between; /* logolardan biri sola biri sağa yaslansın */
    background: rgba(var(--panel-rgb), 0.78); /* blur kullanmadık, arkada 3D sahne çalışırken bilgisayarı yoruyor */
    border-bottom: 1px solid rgba(237, 237, 237, 0.08);
    
}



/* İki logonun yüksekliği aynı olsun */
#header img {
    height: 48px;
    width: auto;
}

/* ---------- Sağ alt köşedeki yazı ---------- */
#imza {
    position: fixed;
    right: 1rem;
    bottom: 0.75rem;
    z-index: 5;
    font-size: 0.7rem;
    color: rgba(246, 244, 238, 0.45);
    pointer-events: none; /* tıklamaya engel olmasın */
}

/* ---------- Açılış penceresi ---------- */
#popup {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(var(--perde-rgb), 0.55);
    transition:
        opacity 0.6s,
        visibility 0s 0.6s;
}

/* Kısa ekranda (ör. 1366x768 dizüstüde tarayıcı içi ~650 px) kart sığmazsa kaydırılabilsin */
#popup { overflow-y: auto; place-items: safe center; } /* "safe": taşarsa üst kısmı kesilmesin */
@media (max-height: 700px) {
    #popup { padding: 12px; }
    #popup .kart { padding: 28px 32px 24px; }
    #popup .logo { max-width: 300px; }
    #popup .yazi { margin-top: 1rem; max-width: 210px; }
    #popup .ayrac { margin: 16px 0 14px; }
    #popup .kontrol-baslik { margin-top: 16px; }
    #popup .kontrol-sec + .gir { margin-top: 12px; }
}

#popup.kapandi {
    opacity: 0;
    visibility: hidden;
}

.kart {
    position: relative;
    width: min(520px, 100%);
    padding: 40px 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--d-k2);
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(237, 237, 237, 0.08) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.7);
    animation: acil 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}



@keyframes acil {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Butona basınca kart yukarı kayıp kayboluyor */
#popup.kapaniyor .kart {
    transition:
        transform 0.6s,
        opacity 0.5s;
    transform: translateY(-30px) scale(1.05);
    opacity: 0;
}

/* Üstteki Özdöken logosu */
.logo {
    width: 100%;
    max-width: 380px;
}

/* Altındaki "3D Sanal Showroom" yazısı (resim olarak) */
.yazi {
    width: 62%;
    max-width: 270px;
    margin-top: 1.5rem;
}

.ayrac {
    width: 48px;
    height: 2px;
    margin: 24px 0 20px;
    background: var(--vurgu-acik);
}

.alt-yazi {
    max-width: 30ch;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(246, 244, 238, 0.78);
}

/* ---------- Buton ---------- */
.gir {
    position: relative;
    overflow: hidden;
    margin-top: 28px;
    padding: 14px 32px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--vurgu);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    
    transition: filter 0.15s, transform 0.15s;
}



.gir:hover:enabled { filter: brightness(1.12); }


.gir:active:enabled { transform: scale(0.98); }


.gir:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 4px;
}

.ipucu {
    margin-top: 1.1rem;
    font-size: 0.82rem;
    color: rgba(246, 244, 238, 0.55);
}

.ipucu kbd {
    font: inherit;
    padding: 0.1rem 0.45rem;
    border: 1px solid rgba(246, 244, 238, 0.25);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}

/* ---------- 3D canvas ---------- */
#showroom canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    touch-action: none; /* telefonda parmakla kaydırınca sayfa oynamasın */
}

/* Yüklenirken buton pasif görünüyor */
.gir:disabled {
    cursor: progress;
    filter: saturate(0.5) brightness(0.85);
    transform: none;
}

/* Butonun altındaki yükleme çubuğu */
.yukleme {
    width: 100%;
    height: 4px;
    margin-top: 1.1rem;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    transition: opacity 0.4s;
}
.yukleme > i {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--vurgu-acik);
    transition: width 0.2s;
}
.yukleme.bitti {
    opacity: 0;
}

/* ---------- Giriş yaptıktan sonra çıkan tuş ipuçları ---------- */
#hud {
    position: fixed;
    left: 1rem;
    bottom: 3.6rem;
    z-index: 4;
    padding: 0.45rem 0.8rem;
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    white-space: nowrap;
    color: rgba(246, 244, 238, 0.9);
    background: rgba(var(--panel-rgb), 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s;
}
#hud.goster {
    opacity: 1;
}
#hud kbd {
    font: inherit;
    padding: 0.05rem 0.4rem;
    border: 1px solid rgba(246, 244, 238, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
}
#hud .hud-fare {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
#hud .hud-fare-simge {
    width: 1.25rem;
    height: 1rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}
#hud .hud-fare-tus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.05rem 0.2rem;
    line-height: 1;
}

/* Telefon için ekrandaki joystick */
#joy {
    position: fixed;
    z-index: 4;
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.07);
    pointer-events: none;
    display: none;
}
#joy i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background: rgba(var(--vurgu-acik-rgb), 0.8);
}

/* ---------- Makineye yaklaşınca çıkan butonlar ---------- */
/* E: makineyi incele, O: opsiyonları gör */
#istemler {
    position: fixed;
    left: 50%;
    bottom: 4.6rem;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    width: max-content;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}
#etkilesim,
#etkilesimOps,
#etkilesimKatalog {
    transform: translateY(8px);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    max-width: calc(100vw - 2rem);
    padding: 0.6rem 1.3rem 0.6rem 0.6rem;
    font: inherit;
    font-size: 0.95rem;
    color: #f6f4ee;
    background: rgba(var(--panel-rgb), 0.92);
    border: 1px solid rgba(237, 237, 237, 0.14);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.25s,
        transform 0.25s;
}
#etkilesimOps[hidden] {
    display: none;
}
#etkilesimKatalog[hidden] { display: none; }
#etkilesim.goster,
#etkilesimOps.goster,
#etkilesimKatalog.goster {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#etkilesimKatalog {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 8px);
}
#etkilesimKatalog.goster {
    transform: translate(-50%, 0);
}
#etkilesim kbd,
#etkilesimOps kbd,
#etkilesimKatalog kbd {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.1rem;
    height: 2.1rem;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--vurgu);
    border-radius: 6px;
}
#etkilesim span,
#etkilesimOps span,
#etkilesimKatalog span {
    color: rgba(246, 244, 238, 0.7);
    white-space: nowrap;
}
#etkilesim strong {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#etkilesim:focus-visible,
#etkilesimOps:focus-visible,
#etkilesimKatalog:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 3px;
}
#etkilesimOps {
    padding-right: 1.1rem;
}
#etkilesimOps kbd {
    background: #ededed;
    color: #1b1d21;
}

#katalogPencere {
    position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
    padding: 1.25rem; background: rgba(var(--perde-rgb), 0.78); backdrop-filter: blur(7px);
}
#katalogPencere[hidden] { display: none !important; }
.katalog-kutu {
    position: relative; width: min(96vw, 1900px); height: min(96vh, 1280px);
    display: flex; flex-direction: column; overflow: hidden; padding: 1.1rem 1.4rem 1rem;
    color: #f6f4ee; background: var(--d-k2);
    border-radius: 16px; box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 40px 90px -20px rgba(0,0,0,.85);
    animation: acil .45s both;
}
.katalog-ust { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding: 0 .35rem .75rem; }
.katalog-baslik { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.katalog-baslik strong { font-size: 1.05rem;}
.katalog-baslik small { color: rgba(246,244,238,.56); font-size: .75rem; }
.katalog-ust-islemler { display: flex; align-items: center; gap: .7rem; padding-right: 2.6rem; }
.katalog-link { color: var(--bugday); font-size: .85rem; text-decoration: none; }
.katalog-sahne { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 8px; background: #17191b; }
#katalogPdf { display: block; width: 100%; height: 100%; border: 0; background: #17191b; }
.katalog-alt { display: flex; align-items: center; justify-content: center; min-height: 38px; padding-top: .55rem; color: rgba(246,244,238,.62); font-size: .78rem; text-align: center; }
.katalog-kapat { top: 1rem; right: 1rem; }
.katalog-sayfalar {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.katalog-sayfalar[hidden],
#katalogPdf[hidden] { display: none; }
.katalog-sayfa {
    flex: none;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}
.katalog-sayfa canvas { display: block; width: 100%; height: 100%; }
.katalog-durum { margin: auto; padding: 24px; text-align: center; font-size: 14px; color: rgba(246, 244, 238, 0.7); }
@media (max-width: 650px) {
    #katalogPencere { padding: .45rem; }
    .katalog-kutu { width: 100%; height: 96vh; padding: .7rem; border-radius: 18px; }
    .katalog-ust { align-items: flex-start; padding-right: .1rem; }
    .katalog-ust-islemler { padding-right: 2.6rem; }
}

/* Showroom içinde açılan opsiyon paneli (O tuşu) */
#sahneOps {
    position: fixed;
    left: 50%;
    bottom: 4.6rem;
    z-index: 6;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 2rem));
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
    padding: 1.1rem 1.2rem 1rem;
    background: rgba(var(--panel-rgb), 0.95);
    border: 1px solid rgba(237, 237, 237, 0.14);
    border-radius: 12px;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.9);
}
#sahneOps[hidden] {
    display: none;
}
#sahneOps .sahne-ops-ust {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}
#sahneOps .sahne-ops-ust strong {
    font-size: 1rem;
}
#sahneOps .sahne-ops-ust span {
    font-size: 0.8rem;
    color: rgba(246, 244, 238, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#sahneOps .sahne-ops-alt {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}
#sahneOps .sahne-ops-alt button {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: #f6f4ee;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
}
#sahneOps .sahne-ops-alt button.ana {
    background: var(--vurgu);
    border-color: transparent;
    font-weight: 600;
}
#sahneOps kbd {
    font: inherit;
    font-size: 0.75rem;
    opacity: 0.75;
}

/* Makineler yüklenirken üstte çıkan durum yazısı */
#makineDurum {
    position: fixed;
    top: 96px;
    left: 50%;
    z-index: 4;
    transform: translateX(-50%);
    max-width: calc(100vw - 2rem);
    padding: 0.45rem 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    color: rgba(246, 244, 238, 0.9);
    background: rgba(var(--panel-rgb), 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
#makineDurum.goster {
    opacity: 1;
}
#makineDurum.hata {
    color: #ffb4b4;
    border-color: rgba(214, 40, 40, 0.4);
}

/* ---------- Makine detay penceresi ---------- */
#detay {
    position: fixed;
    inset: 0;
    z-index: 12;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(var(--perde-rgb), 0.74);
}
#detay [hidden],
#detay[hidden] {
    display: none !important;
}

.detay-kutu {
    position: relative;
    width: min(96vw, 1560px); /* ekran büyüdükçe pencere de büyüsün */
    height: min(92vh, 980px);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
    grid-template-rows: minmax(0, 1fr); /* içerik uzunsa sadece sağ taraf kayıyor */
    overflow: hidden;
    background: var(--d-k2);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 40px 90px -20px rgba(0, 0, 0, 0.85);
    animation: acil 0.45s both;
}

.detay-kapat {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #f6f4ee;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}
.detay-kapat:hover {
    background: rgba(255, 255, 255, 0.16);
}
.detay-kapat:focus-visible,
.detay-sifirla:focus-visible,
.detay-kucukler button:focus-visible,
.detay-link:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 2px;
}

.detay-sahne {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    min-height: 0;
    padding: 1rem;
}
.detay-ekran {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: radial-gradient(ellipse 80% 70% at 50% 40%, var(--d-p1) 0%, var(--d-p2) 80%);
}
#detayGoruntuleyici {
    position: absolute;
    inset: 0;
}
#detayGoruntuleyici canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    cursor: grab;
    touch-action: none;
}
#detayGoruntuleyici canvas:active {
    cursor: grabbing;
}
#detayFoto {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.25);
}
.detay-ipucu {
    position: absolute;
    left: 50%;
    bottom: 0.9rem;
    margin: 0;
    padding: 0.35rem 0.9rem;
    transform: translateX(-50%);
    font-size: 0.78rem;
    white-space: nowrap;
    color: rgba(246, 244, 238, 0.85);
    background: rgba(var(--panel2-rgb), 0.7);
    border-radius: 8px;
    pointer-events: none;
    transition: opacity 0.5s;
}
.detay-ipucu.gizli {
    opacity: 0;
}
.detay-sifirla {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    padding: 0.4rem 0.9rem;
    font: inherit;
    font-size: 0.8rem;
    color: #f6f4ee;
    background: rgba(var(--panel2-rgb), 0.7);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    cursor: pointer;
}
.detay-sifirla:hover {
    background: rgba(var(--panel2-rgb), 0.9);
}
.detay-bos {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 2rem;
    text-align: center;
    color: rgba(246, 244, 238, 0.6);
}
.detay-kucukler {
    flex: none; /* küçük resimler sıkışmasın */
    display: flex;
    gap: 0.5rem;
    padding-bottom: 2px;
    overflow-x: auto;
}
.detay-kucukler button {
    flex: none;
    display: grid;
    place-items: center;
    width: 84px;
    height: 60px;
    padding: 0;
    overflow: hidden;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f6f4ee;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
}
.detay-kucukler button[aria-selected="true"] {
    border-color: var(--vurgu-acik);
}

/* ---------- Detay penceresindeki opsiyonlar ---------- */
.detay-ops-ac {
    flex: none;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: var(--vurgu);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
.detay-ops-ac[aria-expanded="true"] {
    outline: 2px solid var(--bugday);
    outline-offset: 2px;
}
.detay-ops-ac .say {
    font-weight: 500;
    opacity: 0.85;
}
.detay-ops {
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
    z-index: 4;
    max-height: calc(100% - 4rem);
    overflow-y: auto;
    padding: 1rem 1.1rem;
    background: rgba(var(--panel-rgb), 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.85);
}
.detay-ops-ust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.detay-ops-ust strong {
    font-size: 0.95rem;
}
.detay-ops-kapat {
    font: inherit;
    font-size: 0.8rem;
    color: rgba(246, 244, 238, 0.8);
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 8px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
}
.detay-ops-grup + .detay-ops-grup {
    margin-top: 0.8rem;
}
.detay-ops-grup h4 {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bugday);
}
.detay-ops-grup h4 small {
    font-weight: 500;
    color: rgba(246, 244, 238, 0.5);
}
.detay-ops-secenekler {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.detay-ops-secenekler button {
    font: inherit;
    font-size: 0.84rem;
    color: #f6f4ee;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.detay-ops-secenekler button:hover {
    background: rgba(255, 255, 255, 0.13);
}
.detay-ops-secenekler button[aria-pressed="true"] {
    background: rgba(var(--vurgu-acik-rgb), 0.35);
    border-color: var(--vurgu-acik);
}
.detay-ops-durum {
    margin: 0.7rem 0 0;
    font-size: 0.78rem;
    color: rgba(246, 244, 238, 0.65);
}
.detay-ops-durum.hata {
    color: #ffb4b4;
}
/* Opsiyonla değişen değer: çerçeve yerine hafif vurgu zemini */
.detay-serit > div.degisti {
    background: linear-gradient(rgba(var(--vurgu-acik-rgb), 0.16) 0 0), #232325;
}
.detay-serit .eski {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(246, 244, 238, 0.5);
}

/* Detay penceresindeki bölümler (Özdöken sitesindeki gibi alt alta) */
.detay-bolum {
    margin: 0 0 1.8rem;
}
.detay-bolum > h3 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 0 0 0.8rem;
    padding-bottom: 0.5rem;
    font-size: 16px;
    font-weight: 600;
    color: var(--bugday);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.detay-bolum > h3 small {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(246, 244, 238, 0.55);
}
.detay-donanim {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.6rem;
}
.donanim-kart {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    padding: 0.75rem 0.9rem;
    font: inherit;
    color: inherit;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.donanim-sekmeler {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 0.8rem;
}
.donanim-sekme {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.95rem;
    font: inherit;
    font-size: 0.85rem;
    color: inherit;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.donanim-sekme .say {
    opacity: 0.6;
}
.donanim-sekme:hover {
    background: rgba(255, 255, 255, 0.08);
}
.donanim-sekme[aria-selected="true"] {
    color: #fff;
    background: var(--vurgu);
    border-color: transparent;
}
.donanim-sekme[data-sekme="opsiyonel"][aria-selected="true"] {
    color: #fff;
    background: rgba(var(--vurgu-acik-rgb), 0.045);
    border-color: rgba(var(--vurgu-acik-rgb), 0.72);
    box-shadow: inset 0 0 0 1px rgba(var(--vurgu-acik-rgb), 0.2);
}
.donanim-sekme[data-sekme="opsiyonel"][aria-selected="true"] .say {
    color: inherit;
    opacity: 0.6;
}
.donanim-sekme[aria-selected="true"] .say {
    opacity: 0.85;
}
.donanim-sekme:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 2px;
}
.donanim-kap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.donanim-kap:hover {
    background: rgba(255, 255, 255, 0.09);
}
.donanim-kap.secili {
    border-color: var(--vurgu-acik);
    background: rgba(var(--vurgu-acik-rgb), 0.2);
}
.donanim-gorsel {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    padding: 0.35rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    cursor: zoom-in;
}
.donanim-gorsel img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s;
}
.donanim-gorsel:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: -3px;
}
.donanim-kap .donanim-kart {
    flex: 1;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.donanim-kap .donanim-kart:hover {
    background: transparent;
}

/* Donanım resmine tıklayınca açılan büyük görsel */
.detay-buyuk {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.88);
}
.detay-buyuk[hidden] {
    display: none;
}
.detay-buyuk-sahne {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    max-width: 100%;
    max-height: 100%;
}
.detay-buyuk-sahne img {
    display: block;
    max-width: min(92vw, 1400px);
    max-height: 78vh;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
}
.detay-buyuk-ad {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    color: #f6f4ee;
}
.detay-buyuk-kapat {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 1.6rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
}
.detay-buyuk-kapat:hover {
    background: rgba(255, 255, 255, 0.22);
}
.detay-buyuk-kapat:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 2px;
}
.donanim-kart:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 2px;
}
.donanim-kart strong {
    font-size: 0.92rem;
}
.donanim-kart .grup {
    font-size: 0.72rem;
    color: rgba(246, 244, 238, 0.5);
}
.donanim-kart .ack {
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(246, 244, 238, 0.72);
    white-space: pre-line;
}

.detay-yukari-kutu {
    position: sticky;
    bottom: 0.4rem;
    height: 0;
    text-align: right;
}
.detay-yukari {
    position: relative;
    transform: translateY(-100%);
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.1rem;
    color: #fff;
    cursor: pointer;
    background: var(--vurgu);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.detay-yukari.gorunur {
    opacity: 1;
    pointer-events: auto;
}
.detay-yukari:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 2px;
}
.detay-kucukler img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detay-bilgi {
    min-width: 0;
    padding: 2rem 2rem 1.5rem;
    overflow-y: auto;
    /* Açık renkli kaydırma çubuğu pencerenin köşelerini bozmasın */
    scrollbar-width: thin;
    scrollbar-color: #3d3d42 transparent;
}
.detay-kategori {
    margin: 0 2.8rem 0.3rem 0;
    font-size: 0.88rem;
    color: rgba(246, 244, 238, 0.6);
}
.detay-baslik {
    margin: 0 2.8rem 1.1rem 0;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
}
.detay-serit {
    /* Satırda 3 kutu. Son satır eksik kalırsa kutular genişleyip boşluğu dolduruyor. */
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}
.detay-serit > div {
    flex: 1 1 calc((100% - 16px) / 3);
    min-width: 0;
    padding: 12px;
    border-radius: 8px;
    border-top: 3px solid var(--vurgu-acik);
    background: #232325;
}
.detay-serit > div.genis {
    flex-basis: 100%;
}
@media (max-width: 480px) {
    .detay-serit > div {
        flex-basis: calc((100% - 8px) / 2);
    }
}
.detay-serit dt {
    font-size: 12px;
    color: rgba(246, 244, 238, 0.55);
}
.detay-serit dd {
    font-variant-numeric: tabular-nums;
    margin: 0.15rem 0 0;
    font-size: 1.2rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.detay-aciklama {
    max-width: 62ch;
    margin: 0 0 1.4rem;
    font-size: 0.88rem;
    line-height: 1.65;
    white-space: pre-line;
    color: rgba(246, 244, 238, 0.82);
}

.detay-aksiyonlar {
    /* iki sütun: ürün sayfası | broşür, video | sesli anlatım, en altta teklif al iki sütun boyunca */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 56px; /* altta "başa dön" butonuna yer kalsın, üstlerine binmesin */
}
.detay-link {
    /* yazı iki satıra düşse de buton içinde hem yatay hem dikey ortalı kalsın */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 28px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--vurgu);
    border: 1px solid var(--vurgu);
    border-radius: 8px;
    transition: filter 0.15s, background-color 0.15s;
}
.detay-link:hover { filter: brightness(1.12); }
/* İkinci buton: aynı boyutta, içi boş ve tema renginde kenarlıklı */
.detay-link.ikincil {
    background: transparent;
    border-color: var(--vurgu-acik);
}
.detay-link.ikincil:hover {
    background: rgba(var(--vurgu-acik-rgb), 0.16);
}
/* Buton sayısı tekse son buton (Teklif al) iki sütunu kaplasın; çiftse hepsi ikişer yan yana dursun */
.detay-aksiyonlar > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
/* Butonlardaki küçük ikonlar ve <button> olarak yapılanların yazı tipi */
.detay-link {
    gap: 8px;
}
.detay-link svg {
    flex: none;
}
button.detay-link {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
}
.detay-link[aria-pressed="true"] {
    filter: brightness(1.18);
}

/* Broşür (PDF) ve videonun açıldığı katman */
.detay-medya-katman {
    position: absolute;
    inset: 0;
    z-index: 11;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 1.2rem 1.2rem;
    background: rgba(0, 0, 0, 0.9);
}
#detay .detay-medya-katman[hidden] {
    display: none !important;
}
.detay-medya-ust {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
}
.detay-medya-baslik {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 1.05rem;
    color: #f6f4ee;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.detay-medya-sekme {
    flex: none;
    font-size: 0.88rem;
    color: rgba(246, 244, 238, 0.8);
}
.detay-medya-sekme:hover {
    color: #fff;
}
.detay-medya-sekme:focus-visible {
    outline: 3px solid var(--bugday);
    outline-offset: 2px;
}
.detay-medya-katman .detay-medya-kapat {
    position: static;
    flex: none;
}
.detay-medya-govde {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    place-items: center;
}
.detay-medya-pdf {
    width: 100%;
    height: 100%;
    background: #fff;
    border: 0;
    border-radius: 10px;
}
.detay-medya-video {
    width: min(100%, calc((92vh - 7rem) * 16 / 9));
    aspect-ratio: 16 / 9;
    max-height: 100%;
    background: #000;
    border: 0;
    border-radius: 10px;
}
.detay-mesaj {
    margin: 0;
    color: rgba(246, 244, 238, 0.7);
}
.detay-mesaj.hata {
    color: #ffb4b4;
}

/* Büyük ekranlarda sağdaki yazılar da büyüsün */
@media (min-width: 1500px) and (min-height: 820px) {
    .detay-bilgi {
        zoom: 1.12;
    }
}
@media (min-width: 1900px) and (min-height: 980px) {
    .detay-bilgi {
        zoom: 1.25;
    }
}
@media (min-width: 2500px) and (min-height: 1300px) {
    .detay-bilgi {
        zoom: 1.5;
    }
}

/* Sol alttaki FPS yazısı ve grafik uyarısı */
#fps,
#grafikNot {
    position: fixed;
    left: 1rem;
    z-index: 5;
    pointer-events: none;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: rgba(246, 244, 238, 0.8);
    background: rgba(var(--panel-rgb), 0.55);
}
#fps {
    bottom: 0.75rem;
}
#grafikNot {
    bottom: 2.6rem;
    font-size: 0.66rem;
    color: rgba(var(--bugday-rgb), 0.9);
    opacity: 0;
    transition: opacity 0.4s;
}
#grafikNot.goster {
    opacity: 1;
}

@media (max-width: 820px) {
    #detay {
        padding: 0;
    }
    .detay-kutu {
        width: 100%;
        display: block; /* telefonda grid kullanmıyoruz: üstte 3D, altta bilgiler, hepsi birlikte kayıyor */
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        border-radius: 0;
    }
    .detay-kapat {
        position: fixed;
    }
    .detay-sahne {
        padding: 0.75rem;
        min-height: auto;
    }
    .detay-ekran {
        flex: none;
        height: 46vh;
    }
    .detay-bilgi {
        padding: 1.25rem 1.1rem 2rem;
        overflow: visible;
    }
    #istemler,
    #sahneOps {
        bottom: 3.6rem;
    }
}

/* ---------- Telefon ekranı ---------- */
@media (max-width: 480px) {
    #header {
        height: 72px;
        padding: 0 1rem;
    }
    #header img {
        height: 40px;
    }
    .kart {
        padding: 32px 24px 28px;
        border-radius: 14px;
    }
    .gir {
        width: 100%;
    }
    #hud {
        left: 0.65rem;
        bottom: 3.3rem;
        max-width: calc(100vw - 1.3rem);
    }
}

/* =====================================================
   KONTROL SEÇİMİ (bilgisayar): klavye ve fare / tıkla ve gez
   ===================================================== */
.kontrol-baslik {
    align-self: stretch;
    margin: 24px 0 8px;
    font-size: 13px;
    text-align: left;
    color: rgba(246, 244, 238, 0.6);
}
.kontrol-sec {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}
.kontrol-sec button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    font: inherit;
    text-align: left;
    color: #f6f4ee;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.kontrol-sec button:hover { background: rgba(255, 255, 255, 0.07); }
.kontrol-sec button[aria-checked="true"] {
    background: rgba(var(--vurgu-acik-rgb), 0.12);
    border-color: var(--vurgu-acik);
}
.kontrol-sec button:focus-visible { outline: 3px solid var(--bugday); outline-offset: 2px; }
.kontrol-sec strong { font-size: 14px; font-weight: 600; }
.kontrol-sec small { font-size: 12px; line-height: 1.4; color: rgba(246, 244, 238, 0.6); }
.kontrol-sec + .gir { margin-top: 16px; }
/* Telefonda da iki mod seçilebiliyor: joystick ile gez / tıkla ve gez */
html.dokunmatik .kontrol-sec button { min-height: 72px; }

/* HUD: seçilen moda göre ipuçları */
#hud .hud-rehber { display: none; flex-direction: column; gap: 0.55rem; }
html[data-kontrol="rehberli"] #hud > :not(.hud-rehber) { display: none; }
html[data-kontrol="rehberli"] #hud > .hud-rehber { display: flex; }

/* Showroom içinde kontrol değiştirme butonu */
#kontrolDegistir {
    position: fixed;
    right: 1rem;
    bottom: 2.4rem;
    z-index: 5;
    display: none;
    padding: 6px 12px;
    font: inherit;
    font-size: 12px;
    color: rgba(246, 244, 238, 0.85);
    background: rgba(var(--panel-rgb), 0.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    cursor: pointer;
}
#kontrolDegistir:hover { background: rgba(var(--panel-rgb), 0.85); color: #fff; }
html.girildi:not(.dokunmatik) #kontrolDegistir { display: block; }

/* Tıkla ve gez: alttaki makine çubuğu */
#rehberCubuk {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 5;
    transform: translateX(-50%);
    display: none;
    align-items: stretch;
    gap: 4px;
    padding: 4px;
    background: rgba(var(--panel-rgb), 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8);
}
html.girildi[data-kontrol="rehberli"] #rehberCubuk { display: flex; }
#rehberCubuk button {
    font: inherit;
    color: #f6f4ee;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
#rehberCubuk button:hover { background: rgba(255, 255, 255, 0.08); }
#rehberCubuk button:focus-visible { outline: 3px solid var(--bugday); outline-offset: 1px; }
#rehberOnceki,
#rehberSonraki { display: grid; place-items: center; width: 44px; }
#rehberListeAc {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 220px;
    max-width: 320px;
    padding: 6px 16px;
    text-align: left;
}
#rehberListeAc small { font-size: 11px; color: rgba(246, 244, 238, 0.55); }
#rehberListeAc strong {
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#rehberListeAc[aria-expanded="true"] { background: rgba(255, 255, 255, 0.08); }

#rehberListe {
    position: fixed;
    left: 50%;
    bottom: calc(1rem + 64px);
    z-index: 6;
    transform: translateX(-50%);
    width: min(400px, calc(100vw - 2rem));
    max-height: min(60vh, 520px);
    overflow-y: auto;
    padding: 6px;
    background: rgba(var(--panel-rgb), 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.9);
    scrollbar-width: thin;
    scrollbar-color: #3d3d42 transparent;
    animation: listeAcil 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* ortalamak için kullanılan translateX(-50%) animasyonda kaybolmasın */
@keyframes listeAcil {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
#rehberListe[hidden] { display: none; }
#rehberListe button {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    text-align: left;
    color: #f6f4ee;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}
#rehberListe button:hover,
#rehberListe button:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
#rehberListe button[aria-selected="true"] { background: rgba(var(--vurgu-acik-rgb), 0.16); }
#rehberListe button small { flex: none; font-size: 12px; color: rgba(246, 244, 238, 0.5); }
#rehberListe .rehber-bos { margin: 0; padding: 12px; font-size: 13px; color: rgba(246, 244, 238, 0.6); }

/* Çubuk açıkken makine butonları ve opsiyon paneli çubuğun üstünde dursun */
html.girildi[data-kontrol="rehberli"]:not(.dokunmatik) #istemler,
html.girildi[data-kontrol="rehberli"]:not(.dokunmatik) #sahneOps { bottom: calc(1rem + 64px); }
html.girildi[data-kontrol="rehberli"]:not(.dokunmatik) #showroom canvas { cursor: grab; }
html.girildi[data-kontrol="rehberli"]:not(.dokunmatik) #showroom canvas.surukleniyor { cursor: grabbing; }
html.girildi[data-kontrol="rehberli"]:not(.dokunmatik) #showroom canvas.makine-uzerinde { cursor: pointer; }

/* Otomatik tur butonu (çubuğun sağında) */
.rehber-ayrac { width: 1px; margin: 8px 4px; background: rgba(255, 255, 255, 0.14); }
#turBaslat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
}
#turBaslat .tur-kisa { display: none; }

/* Otomatik tur: sinema şeritleri. Üstteki şeridin üstünde logolar kalıyor. */
#sinemaUst,
#sinemaAlt {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 4;
    height: 0;
    overflow: hidden;
    /* normal moddaki üst şeritle aynı: yarı saydam koyu gri */
    background: rgba(var(--panel-rgb), 0.78);
    transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
#sinemaUst { top: 0; border-bottom: 1px solid rgba(237, 237, 237, 0.08); }
#sinemaAlt { border-top: 1px solid rgba(237, 237, 237, 0.08); }
html:not(.sinema) #sinemaUst,
html:not(.sinema) #sinemaAlt { border-width: 0; }
#sinemaAlt {
    bottom: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 2rem;
}
html.sinema #sinemaUst,
html.sinema #sinemaAlt { height: 80px; }
/* üst şerit zaten header'ın yerini tutuyor, ikisi üst üste koyulaşmasın */
html.sinema #header { background: transparent; border-bottom-color: transparent; }

/* Makinenin etrafında dönüş bitince çıkan butonlar */
.sinema-butonlar {
    display: flex;
    gap: 8px;
    margin-left: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.4s, transform 0.4s, visibility 0s 0.4s;
}
#sinemaAlt.bekliyor .sinema-butonlar {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.4s, transform 0.4s;
}
.sinema-butonlar button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s, background-color 0.15s;
}
#turIncele { background: var(--vurgu); border: 1px solid var(--vurgu); }
#turIncele:hover { filter: brightness(1.12); }
#turDevam { background: transparent; border: 1px solid var(--vurgu-acik); }
#turDevam:hover { background: rgba(var(--vurgu-acik-rgb), 0.16); }
.sinema-butonlar button:focus-visible { outline: 3px solid var(--bugday); outline-offset: 2px; }
/* turda başka arayüz görünmesin */
html.sinema #hud,
html.sinema #fps,
html.sinema #grafikNot,
html.sinema #imza,
html.sinema #istemler,
html.sinema #kontrolDegistir,
html.sinema #rehberCubuk,
html.sinema #makineDurum { opacity: 0 !important; pointer-events: none !important; }
html.sinema #showroom canvas { cursor: default !important; }

#sinemaYazi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.6s, transform 0.6s;
}
#sinemaYazi.goster { opacity: 1; transform: none; }
#sinemaKategori { font-size: 12px; color: rgba(246, 244, 238, 0.6); }
#sinemaAd {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#sinemaAd::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 0.8em;
    margin-right: 12px;
    background: var(--vurgu-acik);
    vertical-align: -0.05em;
}
#turBitir {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font: inherit;
    font-size: 13px;
    color: rgba(246, 244, 238, 0.85);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    cursor: pointer;
}
#turBitir:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
#turBitir:focus-visible { outline: 3px solid var(--bugday); outline-offset: 2px; }

/* Duvarın arkasındaki makineye giderken kısa kararma */
#gecisPerde {
    position: fixed;
    inset: 0;
    z-index: 3;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
#gecisPerde.kapali { opacity: 1; }

/* =====================================================
   DOKUNMATİK ARAYÜZ (telefon ve tablet)
   Solda joystick, sağda bakma; makine butonları sağ altta, başparmağın yetiştiği yerde.
   ===================================================== */
.dokun-yazi { display: none; }
html.dokunmatik .dokun-yazi { display: inline; }
html.dokunmatik .masa-yazi { display: none; }

#dokunIpucu { display: none; }

/* Telefonda sayfanın kendisi hiç kaymasın. Kayınca Safari alt çubuğu küçültüp büyütüyor
   ve alttaki butonlar çubuğun altında kalabiliyor. */
html.dokunmatik,
html.dokunmatik body { overscroll-behavior: none; }
html.dokunmatik body { position: fixed; inset: 0; }

html.dokunmatik #header {
    height: calc(56px + env(safe-area-inset-top));
    /* İki logo kenarlardan hep eşit uzaklıkta dursun. Yatay telefonda çentik tek tarafta olsa da
       iki tarafa aynı (yarım) boşluk veriyoruz; logolar ekranın üst köşesinde, çentiğe denk gelmiyor. */
    --logo-kenar: max(16px, calc(env(safe-area-inset-left) * 0.5), calc(env(safe-area-inset-right) * 0.5));
    padding: env(safe-area-inset-top) var(--logo-kenar) 0 var(--logo-kenar);
    /* masaüstündeki şeridin ince ve daha şeffaf hali */
    background: rgba(var(--panel-rgb), 0.45);
    border-bottom: 1px solid rgba(237, 237, 237, 0.1);
}
html.dokunmatik #header img { height: 32px; }

/* Klavye ipuçları, FPS ve imza telefonda gereksiz */
html.dokunmatik #hud,
html.dokunmatik #fps,
html.dokunmatik.girildi #imza { display: none !important; }

html.dokunmatik #makineDurum,
html.dokunmatik #grafikNot {
    top: calc(64px + env(safe-area-inset-top));
    left: 50%;
    bottom: auto;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    white-space: nowrap;
}
html.dokunmatik #grafikNot { top: calc(104px + env(safe-area-inset-top)); }

/* Joystick: dinlenirken sol altta soluk duruyor, dokununca parmağın altına geliyor */
html.dokunmatik.girildi #joy {
    display: block;
    left: calc(max(16px, env(safe-area-inset-left)) + 55px);
    /* dinlenirken alttan konumlanıyor, böylece tarayıcı çubuğu değişince de görünür kalıyor */
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom) + var(--alt-ek, 0px));
    margin-top: 0;
    opacity: 0.45;
    transition: opacity 0.2s;
}
html.dokunmatik.girildi #joy.aktif { opacity: 1; bottom: auto; margin-top: -55px; }
html.dokunmatik.girildi.panel-acik #joy { display: none; }

/* İlk girişte kısa kullanım notu */
html.dokunmatik #dokunIpucu {
    display: flex;
    position: fixed;
    left: 50%;
    top: calc(108px + env(safe-area-inset-top)); /* üstteki "makine yerleştirildi" yazısının altında */
    z-index: 4;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 32px);
    gap: 16px;
    padding: 8px 16px;
    font-size: 13px;
    color: rgba(246, 244, 238, 0.9);
    background: rgba(var(--panel-rgb), 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}
html.dokunmatik #dokunIpucu.goster { opacity: 1; }
#dokunIpucu b { font-weight: 600; color: #fff; }
/* not seçilen moda göre */
html.dokunmatik #dokunIpucu { flex-wrap: wrap; justify-content: center; column-gap: 14px; row-gap: 4px; }
html[data-kontrol="rehberli"] #dokunIpucu .ipucu-serbest,
html:not([data-kontrol="rehberli"]) #dokunIpucu .ipucu-rehber { display: none; }

/* Makine butonları: sağ altta alt alta */
html.dokunmatik #istemler {
    left: auto;
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom) + var(--alt-ek, 0px));
    transform: none;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    width: min(240px, calc(100vw - 32px - 126px));
}
html.dokunmatik #istemler kbd { display: none; }
html.dokunmatik #etkilesim,
html.dokunmatik #etkilesimOps,
html.dokunmatik #etkilesimKatalog {
    position: static;
    justify-content: flex-start;
    width: 100%;
    max-width: none;
    min-height: 48px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    transform: translateY(8px);
}
html.dokunmatik #etkilesim.goster,
html.dokunmatik #etkilesimOps.goster,
html.dokunmatik #etkilesimKatalog.goster { transform: none; }
html.dokunmatik #etkilesimOps span,
html.dokunmatik #etkilesimKatalog span { color: #f6f4ee; }
/* İncele butonu: üstte küçük makine adı, altta eylem */
html.dokunmatik #etkilesim {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 16px 12px;
    background: var(--vurgu);
    border-color: var(--vurgu);
}
html.dokunmatik #etkilesim span { color: #fff; }
html.dokunmatik #etkilesim strong {
    max-width: 100%;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}
html.dokunmatik #istemler button:active { filter: brightness(1.15); }

/* Opsiyon paneli: alttan açılan sayfa */
html.dokunmatik #sahneOps {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    max-height: 72vh;
    max-height: 72dvh;
    padding: 20px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)) max(16px, env(safe-area-inset-left));
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
    animation: altanGel 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.dokunmatik #sahneOps kbd { display: none; }
html.dokunmatik #sahneOps .detay-ops-secenekler button { min-height: 44px; padding: 10px 16px; }
html.dokunmatik #sahneOps .sahne-ops-alt button { flex: 1 1 0; min-height: 48px; font-size: 15px; }
@keyframes altanGel {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* Detay penceresi */
html.dokunmatik .detay-kapat { width: 44px; height: 44px; }
html.dokunmatik .detay-sifirla { min-height: 36px; }
@media (max-width: 820px) {
    html.dokunmatik .detay-kapat {
        top: calc(12px + env(safe-area-inset-top));
        right: calc(12px + env(safe-area-inset-right));
        background: rgba(var(--panel2-rgb), 0.8);
    }
    html.dokunmatik .detay-ekran { height: 44vh; height: 44dvh; }
    html.dokunmatik .detay-bilgi { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
    html.dokunmatik .detay-baslik { font-size: 1.35rem; }
    html.dokunmatik .detay-link { flex: 1 1 0; min-height: 48px; padding: 12px 16px; text-align: center; }
    html.dokunmatik .detay-ops-ac { min-height: 44px; }
    html.dokunmatik .detay-ops-secenekler button { min-height: 44px; }
    html.dokunmatik .donanim-sekme { min-height: 40px; }
}

/* Yatay tutulan telefon: üst şerit daha ince */
@media (max-height: 500px) {
    html.dokunmatik #header { height: calc(44px + env(safe-area-inset-top)); }
    html.dokunmatik #header img { height: 26px; }
    html.dokunmatik #dokunIpucu { top: calc(96px + env(safe-area-inset-top)); }
    html.dokunmatik #makineDurum { top: calc(52px + env(safe-area-inset-top)); }
    html.dokunmatik #sahneOps { max-height: 88vh; max-height: 88dvh; }
}

/* Yatay telefon: katalogda sayfaya en çok yer kalsın */
@media (orientation: landscape) and (max-height: 560px) {
    #katalogPencere { padding: 0; }
    .katalog-kutu {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
        border-radius: 0;
    }
    .katalog-ust { min-height: 40px; padding-bottom: 8px; }
    .katalog-baslik small,
    .katalog-alt { display: none; }
    .katalog-kapat { top: 8px; right: max(12px, env(safe-area-inset-right)); }
}

/* Yatay telefon: detay penceresi iki sütun. Solda ekran boyu 3D, sağda kayan bilgiler. */
@media (orientation: landscape) and (max-height: 560px) {
    #detay { padding: 0; }
    #detay .detay-kutu {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        overflow: hidden;
        border-radius: 0;
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    /* Solda 3D ekran üstte tüm alanı alıyor; Opsiyonlar butonu ve küçük resimler altta tek satırda */
    html #detay .detay-sahne {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
        align-items: center;
        min-height: 0;
        padding: 8px;
        gap: 8px;
    }
    html #detay .detay-ekran {
        grid-column: 1 / -1;
        align-self: stretch;
        height: auto;
        min-height: 0;
    }
    html #detay .detay-ops-ac {
        grid-column: 1;
        min-height: 36px;
        padding: 6px 12px;
        font-size: 13px;
    }
    #detay .detay-kucukler { grid-column: 2; scrollbar-width: none; }
    #detay .detay-kucukler button { width: 56px; height: 36px; border-radius: 8px; }
    #detay .detay-sifirla { padding: 4px 10px; font-size: 12px; }
    #detay .detay-bilgi {
        overflow-y: auto;
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    }
    #detay .detay-aciklama { max-width: none; }
    #detay .detay-link { flex: 1 1 0; min-height: 48px; padding: 10px 16px; }
    #detay .detay-kapat {
        position: absolute;
        top: 10px;
        right: calc(10px + env(safe-area-inset-right));
    }
}

/* Cihazında animasyonları kapatan kullanıcılar için */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition-duration: 0.01s !important;
    }
}

/* =====================================================
   TIKLA VE GEZ: TELEFON, TABLET VE KÜÇÜK EKRAN
   Telefonda joystick yok: dokunulan yere gidiliyor, tek parmakla sürükleyince etrafa bakılıyor,
   iki parmakla yakınlaştırılıyor. Makine çubuğu ekranın altında, başparmağın yetiştiği yerde.
   ===================================================== */
html.dokunmatik.girildi[data-kontrol="rehberli"] #joy { display: none; }

/* Makine çubuğu: dokunmatikte butonlar parmak boyunda, iPhone'un alt çubuğunun üstünde */
html.dokunmatik #rehberCubuk { bottom: calc(12px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)); }
html.dokunmatik #rehberCubuk button { min-height: 48px; }
html.dokunmatik #rehberCubuk button:hover { background: transparent; }
html.dokunmatik #rehberCubuk button:active,
html.dokunmatik #rehberListeAc[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); }

/* Makine butonları çubuğun üstünde, sağda alt alta (çubuk 58 px) */
html.dokunmatik.girildi[data-kontrol="rehberli"] #istemler {
    bottom: calc(12px + 58px + 10px + env(safe-area-inset-bottom) + var(--alt-ek, 0px));
    width: min(260px, calc(100vw - 24px));
}

/* Makine listesi: parmakla seçilebilecek satırlar */
html.dokunmatik #rehberListe {
    bottom: calc(12px + 58px + 8px + env(safe-area-inset-bottom) + var(--alt-ek, 0px));
    max-height: min(55vh, 480px);
    max-height: min(55dvh, 480px);
    overscroll-behavior: contain;
}
html.dokunmatik #rehberListe button { min-height: 48px; align-items: center; }
html.dokunmatik #rehberListe button:hover { background: transparent; }
html.dokunmatik #rehberListe button[aria-selected="true"] { background: rgba(var(--vurgu-acik-rgb), 0.16); }
html.dokunmatik #rehberListe button:active { background: rgba(255, 255, 255, 0.1); }

/* Mod değiştirme butonu: telefonda sağ üstte, logoların altında */
html.dokunmatik.girildi #kontrolDegistir {
    display: block;
    top: calc(56px + env(safe-area-inset-top) + 10px);
    bottom: auto;
    right: max(12px, env(safe-area-inset-right));
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(var(--panel-rgb), 0.75);
}
html.dokunmatik.panel-acik #kontrolDegistir { display: none; }

/* Otomatik tur: yan kenarlarda çentik payı */
html.dokunmatik #sinemaAlt {
    padding-left: max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
}
html.dokunmatik.sinema #sinemaUst { height: calc(56px + env(safe-area-inset-top)); }
html.dokunmatik.sinema #sinemaAlt { height: calc(80px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)); padding-bottom: calc(env(safe-area-inset-bottom) + var(--alt-ek, 0px)); }
html:not(.sinema) #sinemaAlt { visibility: hidden; transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.8s; }

/* Dar ekran (dik telefon, küçük pencere): çubuk ekranı boydan boya kaplıyor */
@media (max-width: 560px) {
    #rehberCubuk {
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        transform: none;
    }
    #rehberListeAc {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        padding: 6px 10px;
    }
    #rehberOnceki,
    #rehberSonraki { width: 42px; flex: none; }
    #turBaslat { flex: none; padding: 0 12px; }
    #turBaslat .tur-uzun { display: none; }
    #turBaslat .tur-kisa { display: inline; }
    .rehber-ayrac { margin: 8px 2px; }

    #rehberListe {
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        width: auto;
        transform: none;
        animation-name: listeAcilDar;
    }

    /* çubukla üst üste binmesinler */
    html.girildi[data-kontrol="rehberli"] #imza,
    html.girildi[data-kontrol="rehberli"] #hud { display: none; }
    html.girildi:not(.dokunmatik) #kontrolDegistir { top: 84px; bottom: auto; right: 12px; }

    /* sabit konumlu yazılar mod butonunun altına insin */
    html.dokunmatik #makineDurum { top: calc(110px + env(safe-area-inset-top)); }
    html.dokunmatik #grafikNot { top: calc(150px + env(safe-area-inset-top)); }
    html.dokunmatik #dokunIpucu { top: calc(152px + env(safe-area-inset-top)); }

    /* Otomatik tur: ad ve "Turu bitir" üstte, butonlar altta iki eşit parça */
    #sinemaAlt {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "yazi bitir" "butonlar butonlar";
        align-content: start;
        column-gap: 12px;
        row-gap: 12px;
        /* üst-alt boşluk sadece turda: kapalıyken şerit tamamen kaybolsun */
        padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
    }
    html.dokunmatik #sinemaAlt {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: 0;
    }
    html.sinema #sinemaAlt,
    html.dokunmatik.sinema #sinemaAlt {
        padding-top: 14px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom) + var(--alt-ek, 0px));
    }
    #sinemaYazi { grid-area: yazi; }
    #turBitir { grid-area: bitir; align-self: center; padding: 8px 12px; }
    .sinema-butonlar { grid-area: butonlar; margin-left: 0; }
    .sinema-butonlar button { flex: 1 1 0; justify-content: center; min-height: 48px; padding: 0 12px; }
    html.sinema #sinemaAlt,
    html.dokunmatik.sinema #sinemaAlt { height: calc(72px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)); }
    html.sinema #sinemaAlt.bekliyor,
    html.dokunmatik.sinema #sinemaAlt.bekliyor { height: calc(138px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)); }
    html.sinema #sinemaUst { height: 56px; }
    html.dokunmatik.sinema #sinemaUst { height: calc(56px + env(safe-area-inset-top)); }
    #sinemaAd { font-size: 18px; }
    #sinemaAd::before { margin-right: 8px; }
}
@keyframes listeAcilDar {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* Yatay tutulan telefon: ekran kısa, şeritler ve butonlar daha ince */
@media (max-height: 500px) {
    html.dokunmatik.girildi #kontrolDegistir { top: calc(44px + env(safe-area-inset-top) + 8px); }
    html.dokunmatik.sinema #sinemaUst { height: calc(44px + env(safe-area-inset-top)); }
    html.dokunmatik.sinema #sinemaAlt { height: calc(64px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)); }
    html.dokunmatik #sinemaAd { font-size: 18px; }
    html.dokunmatik #rehberCubuk { bottom: calc(8px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)); }
    html.dokunmatik #rehberCubuk button { min-height: 44px; }
    html.dokunmatik.girildi[data-kontrol="rehberli"] #istemler { bottom: calc(8px + 54px + 8px + env(safe-area-inset-bottom) + var(--alt-ek, 0px)); }
    html.dokunmatik #rehberListe {
        bottom: calc(8px + 54px + 6px + env(safe-area-inset-bottom) + var(--alt-ek, 0px));
        max-height: calc(100vh - 44px - 54px - 40px);
        max-height: calc(100dvh - 44px - 54px - 40px);
    }
}

/* Turda gizlenen makine butonları görünmezken tıklanamasın
   (kapsayıcıda pointer-events kapalı olsa da butonların kendisinde açık) */
html.sinema #istemler button,
html.sinema #sahneOps { pointer-events: none !important; visibility: hidden; }
#turBaslat { white-space: nowrap; }

/* Yatay telefon: açılış kartı kısa ekrana sığsın */
@media (max-height: 500px) {
    html.dokunmatik #popup .kart { padding-top: 20px; padding-bottom: 18px; }
    html.dokunmatik #popup .logo { max-width: 220px; }
    html.dokunmatik #popup .yazi { max-width: 150px; margin-top: 0.6rem; }
    html.dokunmatik #popup .ayrac { margin: 10px 0 8px; }
    html.dokunmatik #popup .alt-yazi { display: none; }
    html.dokunmatik #popup .kontrol-baslik { margin-top: 8px; }
    html.dokunmatik .kontrol-sec button { min-height: 0; }
}
