/* ==========================================================================
   MESURR - WEB ARAYÜZ TASARIMI
   Canlı Arayüz Stilleri (Orijinal Adobe Tasarımına %100 Birebir Uyum)
   ========================================================================== */

:root {
    --color-sky: #5ab5c2;
    --color-grass: #688a44;
    --color-dark-wood: #3a1e12;
    --color-med-wood: #6d4027;
    --color-light-wood: #ad7348;
    --color-parchment: #f6eedb;
    --color-parchment-border: #e0d0b0;
    --color-thread-red: #d93829;
    --color-thread-glow: rgba(217, 56, 41, 0.45);
    --color-tape-yellow: #fecb2f;
    --color-fire-orange: #ff7720;
    --font-heading: 'Fredoka', 'Sniglet', cursive, sans-serif;
    --font-hand: 'Patrick Hand', 'Fredoka', cursive, sans-serif;
    --font-body: 'Sniglet', 'Fredoka', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1a2c2c;
    background-image: 
        radial-gradient(circle at 50% 30%, #305456 0%, #172728 100%);
    font-family: var(--font-body);
    color: var(--color-dark-wood);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ekran Okuyucu Yardımcısı */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Ana Konteyner */
#app-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 10px;
}

/* Sahne Konteynırı (Orijinal Adobe 2:3 En-Boy Oranı Sabitlenmiştir) */
.scene-container {
    position: relative;
    height: 100vh;
    width: calc(100vh * (2 / 3));
    max-width: 100vw;
    max-height: 100vh;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.65), 
        0 0 80px rgba(90, 181, 194, 0.25);
    background: #5ab5c2;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dikey mobil ekranlar için otomatik uyum */
@media (max-aspect-ratio: 2/3) {
    .scene-container {
        width: 100vw;
        height: calc(100vw * (3 / 2));
        border-radius: 0;
    }
}

/* Orijinal Arka Plan Tasarımı (Kayıpsız ve Net) */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    z-index: 1;
    pointer-events: none;
    image-rendering: -webkit-optimize-contrast;
}

/* ==========================================================================
   CANLI & İNTERAKTİF BUTON KATMANI (Milimetrik Hizalı, Sıfır Kayma)
   ========================================================================== */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Temel Buton Stili (Şeffaf, Kusursuz İnteraktif Alanlar) */
.interactive-btn {
    position: absolute;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    pointer-events: auto;
    padding: 0;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
    border-radius: 20px;
}

.interactive-hotspot {
    position: absolute;
    background: transparent;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

/* Parlama Efekti Taşıyıcısı */
.btn-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* 1. MESURR Başlık / Logo */
.logo-hotspot {
    top: 4.58%;
    left: 30.0%;
    width: 43.75%;
    height: 17.5%;
    border-radius: 30px;
}

.logo-hotspot:hover {
    transform: scale(1.02) rotate(-0.5deg);
    filter: drop-shadow(0 4px 14px rgba(217, 56, 41, 0.3));
}

.logo-hotspot:active {
    transform: scale(0.98);
}

/* 2. Sağ Üst Menü Butonu */
.btn-menu {
    top: 2.8%;
    right: 3.3%;
    width: 12.3%;
    height: 8.2%;
    border-radius: 50%;
}

.btn-menu:hover {
    transform: scale(1.08) rotate(12deg);
    box-shadow: 
        0 0 20px rgba(254, 203, 47, 0.6),
        inset 0 0 12px rgba(255, 255, 255, 0.35);
}

.btn-menu:active {
    transform: scale(0.93) rotate(-8deg);
}

/* 3. Sol Alt Kamp Ateşi "BAŞLA" Butonu (Oyun açmaz, canlı buton olarak basılır) */
.btn-basla {
    bottom: 1.6%;
    left: 7.5%;
    width: 33.75%;
    height: 33.33%;
    border-radius: 40% 40% 20% 20%;
}

.btn-basla:hover {
    transform: scale(1.04) translateY(-3px);
    box-shadow: 
        0 0 35px rgba(255, 119, 32, 0.45), 
        inset 0 0 25px rgba(255, 215, 64, 0.3);
    filter: drop-shadow(0 0 16px rgba(255, 90, 0, 0.6));
}

.btn-basla:active {
    transform: scale(0.96) translateY(3px);
    box-shadow: 
        0 0 15px rgba(255, 119, 32, 0.6), 
        inset 0 0 35px rgba(255, 215, 64, 0.5);
}

/* 4. Sağ Alt Çıkış Butonu */
.btn-cikis {
    top: 85.67%;
    left: 65.0%;
    width: 29.38%;
    height: 5.42%;
    border-radius: 28px;
}

.btn-cikis:hover {
    transform: scale(1.04) translateX(-4px);
    box-shadow: 
        0 0 18px rgba(254, 203, 47, 0.55),
        inset 0 0 14px rgba(255, 255, 255, 0.4);
}

.btn-cikis:active {
    transform: scale(0.96) translateY(1px);
}

/* 5. Sağ Alt Ayarlar Butonu */
.btn-ayarlar {
    top: 91.25%;
    left: 65.0%;
    width: 29.38%;
    height: 5.42%;
    border-radius: 28px;
}

.btn-ayarlar:hover {
    transform: scale(1.04) translateX(-4px);
    box-shadow: 
        0 0 18px rgba(254, 203, 47, 0.55),
        inset 0 0 14px rgba(255, 255, 255, 0.4);
}

.btn-ayarlar:active {
    transform: scale(0.96) translateY(1px);
}

/* ==========================================================================
   TOAST BİLDİRİM (Şık Geri Bildirim Baloncuğu)
   ========================================================================== */
.toast-notify {
    position: absolute;
    top: 24%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(246, 238, 219, 0.96);
    border: 3px dashed var(--color-med-wood);
    border-radius: 24px;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: clamp(13px, 2vh, 16px);
    font-weight: 700;
    color: var(--color-dark-wood);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    z-index: 40;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-notify.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(-15px) scale(0.9);
}

#toast-icon {
    font-size: 1.3em;
}

/* ==========================================================================
   MODALLAR (Dikişli / Ahşap / Kumaş Temalı Kartlar)
   ========================================================================== */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 32, 34, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 16px;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.stitched-card {
    position: relative;
    background: var(--color-parchment);
    background-image: 
        radial-gradient(#e6dabf 15%, transparent 16%),
        radial-gradient(#e6dabf 15%, transparent 16%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border: 4px dashed var(--color-med-wood);
    border-radius: 28px;
    padding: 30px 24px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(180, 150, 100, 0.25);
    transform: scale(1);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.hidden .stitched-card {
    transform: scale(0.92);
}

.card-needle-pin {
    position: absolute;
    top: -12px;
    left: 24px;
    width: 32px;
    height: 32px;
    background: #c8c8c8;
    border: 3px solid #555;
    border-radius: 50%;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.3);
}

.card-needle-pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--color-thread-red);
    border-radius: 50%;
}

.card-title {
    font-family: var(--font-heading);
    font-size: clamp(20px, 3vh, 25px);
    color: var(--color-dark-wood);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.close-x-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: #e2cca8;
    border: 2px dashed var(--color-med-wood);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-weight: 800;
    cursor: pointer;
    color: var(--color-dark-wood);
    transition: transform 0.15s ease, background-color 0.15s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-x-btn:hover {
    transform: scale(1.15) rotate(90deg);
    background: #d8be96;
}

/* Menü İçerik Kartları */
.menu-info-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff8eb;
    padding: 12px 14px;
    border-radius: 18px;
    border: 2px dashed rgba(109, 64, 39, 0.25);
}

.badge-icon {
    font-size: 26px;
    line-height: 1;
}

.badge-text h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--color-dark-wood);
    margin-bottom: 4px;
}

.badge-text p {
    font-size: 13.5px;
    line-height: 1.45;
    color: #4f3322;
}

/* Ayarlar Satırları */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 2px dashed rgba(109, 64, 39, 0.2);
    font-size: clamp(13px, 1.9vh, 15px);
    font-weight: 600;
}

.slider-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 45%;
}

.slider-box input[type="range"] {
    flex: 1;
    accent-color: var(--color-thread-red);
    cursor: pointer;
}

.slider-box span {
    font-weight: 800;
    width: 36px;
    font-size: 0.9em;
}

.status-pill {
    background: #688a44;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
}

/* Çıkış Onayı */
.confirm-msg {
    text-align: center;
    font-size: 16px;
    margin: 15px 0 20px;
    color: #4f3322;
    line-height: 1.5;
}

/* Dikişli Butonlar */
.stitched-btn {
    background: var(--color-parchment);
    border: 3px dashed var(--color-med-wood);
    color: var(--color-dark-wood);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(14px, 2vh, 16px);
    padding: 10px 22px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.15s ease, background-color 0.15s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.stitched-btn:hover {
    transform: scale(1.04);
}

.stitched-btn:active {
    transform: scale(0.96);
}

.stitched-btn.primary-btn {
    background: linear-gradient(135deg, #d93829, #b3271a);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 6px 15px rgba(217, 56, 41, 0.4);
}

.stitched-btn.secondary-btn {
    background: #e2cca8;
}

.stitched-btn.small-btn {
    padding: 6px 14px;
    font-size: 13px;
}

.modal-actions {
    margin-top: 22px;
    display: flex;
    justify-content: center;
}

.modal-actions-row {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 14px;
}
