body { 
    margin: 0; 
    padding: 0;
    overflow: hidden; 
    background: #191716; 
    position: fixed;
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: none;
    overscroll-behavior: none;
  }
  ::selection {
  background: transparent;
  color: #fff;
  text-shadow:
0 0 2px #cc0000,
0 0 5px #cc1414,
0 0 10px #cc3d3d,
0 0 20px #cc0000,
0 0 10px #cc0000;

  font-weight: 800;
  letter-spacing: 0.04em;
}
  canvas { 
    display: block;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
  }
  canvas:focus {
    cursor: none !important;
}
  #fadeOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 1000;
  }
  #fadeOverlay.info-active {
    opacity: 0.7 !important;
    pointer-events: auto;
    backdrop-filter: brightness(0.85);
    transition: opacity 0.4s cubic-bezier(.4,1.2,.3,1);
    z-index: 3999;
}

  #fadeOverlay.transition-message::after {
    content: attr(data-message);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.92);
    font-family: 'Mont', sans-serif;
    font-size: clamp(22px, 3vw, 38px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(255,255,255,0.18);
    white-space: nowrap;
    pointer-events: none;
  }

#imagePopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 101vw;
    height: 101vh;
    background: transparent;
    backdrop-filter: blur(32px) saturate(180%);
    display: flex;
    flex-direction: column; /* eklendi */
    justify-content: center;
    align-items: center;
    z-index: 1001;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    padding: 36px 32px 28px 32px;
    border-radius: 32px;
    border: 1.5px solid rgba(255,255,255,0.10);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(.4,2,.3,1);
    display:none;
}

#imagePopup img.tablogorseli {
    margin-bottom: 18px; /* p ile resim arasına boşluk */
}
#imagePopup .contentWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
    gap: 18px;
}

#imagePopup .contentWrapper::-webkit-scrollbar {
    width: 7px;
}

#imagePopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 101vw;
    height: 101vh;
    background: transparent;
    backdrop-filter: blur(32px) saturate(180%);
    display: flex;
    flex-direction: column; /* eklendi */
    justify-content: center;
    align-items: center;
    z-index: 1001;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    padding: 36px 32px 28px 32px;
    border-radius: 32px;
    border: 1.5px solid rgba(255,255,255,0.10);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(.4,2,.3,1);
    display:none;
}

#imagePopup img.tablogorseli {
    margin-bottom: 18px; /* p ile resim arasına boşluk */
}
#imagePopup .contentWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
    gap: 18px;
}

#imagePopup .contentWrapper::-webkit-scrollbar {
    width: 7px;
}

#imagePopup .contentWrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(255,255,255,0.18) 0%, rgba(200,200,255,0.10) 100%);
    border-radius: 4px;
}

.tablogorseli {
    max-width: 60vw;
    max-height: 60vh;
    width: auto;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 1.5px 0 rgba(255,255,255,0.08) inset;
    object-fit: contain;
    display: block;
    border: 0.5px solid rgba(255,255,255,0.10);
    background: linear-gradient(120deg, rgba(40,40,55,0.12) 0%, rgba(22,22,28,0.18) 100%);
    margin: 0 auto;
}

#imagePopup p {
    margin: 0;
    color: #eaeaea;
    font-size: 17px;
    line-height: 1.7;
    text-align: center;
    padding: 0 18px;
    word-break: break-word;
    max-width: 60%;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 
        0 2px 6px rgba(0,0,0,0.9),
        0 4px 12px rgba(0,0,0,0.85),
        0 6px 18px rgba(0,0,0,0.8);
}

#closeButton {
    position: absolute;
    right: 24px;
    top: 24px;
    cursor: pointer;
    background: transparent;
    color: white;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 30px;
    line-height: 52px;
    text-align: center;
    transition: all 0.18s cubic-bezier(.4,2,.3,1);
    font-weight: 600;
    outline: none;
    border: 1.5px solid rgba(255,255,255,0.10);
}

/* Tek medya sorgusu: mobil düzeltmeleri (<=768px) */
body.touch-device {
  height: auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

body.touch-device #imagePopup {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}

body.touch-device #imagePopup .contentWrapper {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 92%;
  max-height: 85%;
  padding: 0;
}

body.touch-device .tablogorseli {
  max-width: 39vw;  
  max-height: 68vh; 
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.06) inset;
}

body.touch-device #imagePopup p {
  max-width: 45vw;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: left;
  max-height: 72vh;
  overflow-y: auto;
  padding-right: 12px;
  margin-top: -2vh;
}

body.touch-device #closeButton {
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 34px;
}

body.touch-device #closeButton:focus {
  outline: 2px solid rgba(255,75,58,0.22);
  outline-offset: 2px;
}

/* Default state: hide menu button on desktop */
#menuButton {
  display: none !important;
}

/* Only display menu button on touch devices */
body.touch-device #menuButton {
  display: block !important;
  position: fixed;
  top: 12px;
  right: 12px;
  left: auto;
  width: 36px;
  height: 36px;
  z-index: 2001; /* High z-index to overlay nicely on canvas */
  cursor: pointer;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  transition: all 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

body.touch-device #menuButton:hover {
  opacity: 0.8;
}




#pauseBackdrop {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(10px) grayscale(100%);
  -webkit-backdrop-filter: blur(10px) grayscale(100%);
  z-index: 8999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#pauseBackdrop.active {
  opacity: 1;
  pointer-events: auto;
}

#sidebar {
  position: fixed;
  top: 15%; left: 10%;
  width: auto;
  z-index: 9000;
  display: flex; flex-direction: column; align-items: flex-start;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#sidebar.active {
  visibility: visible; opacity: 1; pointer-events: auto;
}

.pause-menu-content {
  display: flex; flex-direction: column; align-items: flex-start; gap: 30px;
}
.pause-title {
  color: #fff; font-size: 32px; font-weight: bold; margin: 0;
}
.pause-options {
  display: flex; flex-direction: column; gap: 15px; align-items: flex-start;
  padding-left: 15px; /* Indent */
}
.pause-btn {
  background: transparent; border: none; color: #fff; font-size: 22px; font-weight: normal;
  cursor: pointer; transition: color 0.2s ease; padding: 0; margin: 0; text-align: left;
}
.pause-btn:hover {
  color: #ccc;
}

@media (max-width: 768px) {
  #sidebar {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 95vh;
    overflow-y: auto;
    align-items: center;
  }
  .pause-menu-content {
    align-items: center;
    gap: 15px;
    width: 100%;
  }
  .pause-title {
    font-size: 24px;
    text-align: center;
  }
  .pause-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 15px;
    padding-left: 0;
    align-items: center;
    justify-items: center;
    width: 100%;
  }
  .pause-btn {
    font-size: 15px;
    text-align: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  .pause-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
  }
}

/* Yatay mobil ekran (landscape) sığmama sorunu için ek küçültme */
@media (max-height: 450px) and (max-width: 950px) {
  #sidebar {
    max-height: 96vh;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
  }
  .pause-menu-content {
    gap: 8px;
  }
  .pause-title {
    font-size: 18px;
    margin-top: 5px;
  }
  .pause-options {
    gap: 6px 10px;
  }
  .pause-btn {
    font-size: 13px;
    padding: 5px 8px;
  }
}



#infoModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1a1a1a; /* Koyu gri/siyah arka plan */
  color: #e0e0e0; /* Açık gri metin */
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid #333; /* Daha az belirgin kenarlık */
  z-index: 4000;
  min-width: 300px;
  max-width: 90vw;
  padding: 30px 25px 25px 25px;
  font-family: 'Mont', sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.3px;
  text-align: center;
  display: none;
}

#infoModal .info-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #e0e0e0; /* Kapatma ikonu rengi */
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  transition: background-color 0.2s ease-in-out;
}

#infoModal .info-close:hover {
  background-color: #333; /* Hover'da daha koyu */
  color: #fff;
}

#infoModal .info-content {
  line-height: 1.6;
}

#confirmModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e0e0e0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 5000;
  width: 320px;
  max-width: 85vw;
  padding: 24px;
  font-family: 'Mont', sans-serif !important;
  text-align: center;
  display: none;
}

.confirm-content p {
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 1.5;
}

.confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.confirm-buttons button {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

#confirmYes {
  background: #e63946;
  color: #fff;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
}

#confirmYes:hover {
  background: #f24c58;
  transform: translateY(-1px);
}

#confirmNo {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#confirmNo:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

body.touch-device #infoModal {
  min-width: 0;
  width: 75vw;
  max-width: 650px;
  max-height: 80vh;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 24px;
  border-radius: 16px;
  overflow-y: auto;
  padding-top: 40px;
}
body.touch-device #infoModal .info-close {
  top: 12px;
  right: 12px;
  font-size: 22px;
  width: 32px;
  height: 32px;
}
body.touch-device #confirmModal {
  width: 280px;
  padding: 18px;
  border-radius: 12px;
}
body.touch-device .confirm-content p {
  font-size: 13px;
  margin-bottom: 16px;
}
body.touch-device .confirm-buttons button {
  padding: 8px 18px;
  font-size: 12px;
}

/* Eski yükleme mobil düzeni kaldırıldı — yeni responsive tasarım aşağıda. */

@font-face {
  font-family: 'Mont';
  src: url('gorsel/mont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


/* =====================================================================
   YÜKLEME EKRANI — İKİ SÜTUNLU RESPONSIVE TASARIM
   Sol: marka + sistem tanılaması · Sağ: durum + "Devam Et"
   Sağ sütun dikey ortalı olduğundan buton her zaman görünür (kaydırma yok)
   ===================================================================== */
#loadingScreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 3vh, 28px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background-color: #030305;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    box-sizing: border-box;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-bg {
    position: fixed;
    inset: -2%;
    background-image: url('gorsel/arayuz/yukleme.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    filter: grayscale(100%) brightness(0.25) contrast(1.1);
    animation: bgPulse 30s ease-in-out infinite alternate;
}

.loading-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.04), transparent 55%),
      radial-gradient(circle at 50% 100%, rgba(0, 0, 0, 0.85), transparent 60%);
}

@keyframes bgPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* --- Kart: minimalist tek sütun --- */
.loading-card {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(14px, 2.4vh, 22px);
    width: min(420px, 100%);
    max-height: calc(100vh - clamp(20px, 6vh, 56px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(28px, 5vh, 44px) clamp(24px, 4vw, 36px);
    background: rgba(18, 18, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    box-sizing: border-box;
    animation: contentFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes contentFadeUp {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.loading-title {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(24px, 4vw, 34px) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.02em !important;
    text-align: center;
    text-shadow: none;
}

.loading-desc {
    margin: 0 auto !important;
    max-width: 340px;
    font-size: clamp(13px, 1.5vw, 15px) !important;
    color: rgba(255, 255, 255, 0.55) !important;
    line-height: 1.5 !important;
    font-weight: 400;
    text-align: center;
}

.loading-status-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 44px !important;
    width: 100% !important;
    padding: 11px 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    box-sizing: border-box;
    transition: all 0.4s ease;
}

.loading-status-container.loaded {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none;
}

.loading-spinner {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 auto;
    margin: 0 !important;
    border: 3px solid rgba(255, 255, 255, 0.1) !important;
    border-top-color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 50% !important;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}

.loading-spinner.loaded {
    animation: none !important;
    border: none !important;
    width: 20px !important;
    height: 20px !important;
    background: transparent !important;
    position: relative;
}

.loading-spinner.loaded::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid rgba(255, 255, 255, 0.7);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

#loadingStatusText {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
    animation: pulseText 2s infinite !important;
}

.loading-status-container.loaded #loadingStatusText {
    color: rgba(255, 255, 255, 0.8) !important;
    animation: none !important;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* --- Input ve Buton Grubu --- */
.loading-input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

#nickInput {
    display: block;
    width: 100%;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

#nickInput::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

#nickInput:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

#nickInput:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

#loadingStartButton {
    width: 100% !important;
    padding: 18px 24px !important;
    font-size: 16px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    gap: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

#loadingStartButton::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: skewX(-20deg);
    transition: none;
}

#loadingStartButton:hover::before {
    left: 200%;
    transition: left 0.7s ease-in-out;
}

#loadingStartButton:hover {
    transform: translateY(-2px) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

#loadingStartButton:active {
    transform: translateY(1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

#loadingStartButton svg {
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#loadingStartButton:hover svg {
    transform: translateX(6px) !important;
}

.loading-hint {
    margin: 0;
    text-align: center;
    font-size: clamp(11px, 1.3vw, 12px);
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.2px;
}

/* =====================================================================
   SİSTEM KONTROLÜ — aç/kapa düğmesi (normalde kapalı, tıklayınca açılır)
   ===================================================================== */
.sys-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.sys-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
}
.sys-toggle__chevron {
    font-size: 11px;
    transition: transform 0.25s ease;
}
.sys-toggle[aria-expanded="true"] .sys-toggle__chevron {
    transform: rotate(180deg);
}
/* Sorun varsa dikkat çeksin (ek/onkontrol.js .has-warn / .has-bad ekler) */
.sys-toggle.has-warn {
    color: #f5b74e;
    border-color: rgba(245, 166, 35, 0.35);
    background: rgba(245, 166, 35, 0.06);
}
.sys-toggle.has-bad {
    color: #ff7b7b;
    border-color: rgba(230, 57, 70, 0.4);
    background: rgba(230, 57, 70, 0.08);
}

/* =====================================================================
   ONAY EKRANI — loading-card ve three.js'ten önce; minimalist
   ===================================================================== */
#consentScreen {
    position: fixed;
    inset: 0;
    z-index: 10000;              /* loadingScreen'in (9999) üstünde */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vh, 32px);
    background: #060608;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.5s ease;
}
#consentScreen.gizle { opacity: 0; pointer-events: none; }

.consent-card {
    width: min(480px, 100%);
    max-height: calc(100vh - clamp(20px, 8vh, 64px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(28px, 5vh, 44px) clamp(24px, 4vw, 38px);
    background: rgba(20, 20, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
    animation: contentFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.consent-title {
    margin: 0 0 18px 0;
    color: #fff;
    font-size: clamp(22px, 3.4vw, 30px);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
}

.consent-body p {
    margin: 0 0 14px 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(13.5px, 1.6vw, 15px);
    line-height: 1.62;
    font-weight: 400;
}
.consent-body p:last-child { margin-bottom: 0; }

.consent-btn {
    display: block;
    width: 100%;
    margin-top: 26px;
    padding: 16px 24px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #0b0b0d;
    background: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.2s ease;
}
.consent-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.consent-btn:active { transform: translateY(0); }

/* Kısa ekran (özellikle telefon YATAY/landscape): onay kartı yüksekliğe sığsın,
   dikey boşluklar ve yazılar küçülsün, buton alta sıkışmasın. */
@media (max-height: 520px) {
    #consentScreen { padding: clamp(8px, 3vh, 16px); align-items: flex-start; }
    .consent-card {
        max-height: calc(100vh - clamp(12px, 6vh, 32px));
        padding: clamp(14px, 3vh, 22px) clamp(20px, 4vw, 34px);
    }
    .consent-title { margin-bottom: 10px; font-size: clamp(18px, 2.6vw, 24px); }
    .consent-body p { margin-bottom: 9px; line-height: 1.45; font-size: clamp(12.5px, 1.5vw, 14px); }
    .consent-btn { margin-top: 14px; padding: 12px 20px; }
}

/* Dokunmatik cihazlarda arka planı sadeleştir (performans) */
body.touch-device .loading-bg {
    animation: none;
    filter: grayscale(100%) brightness(0.22) contrast(1.1);
}
body.touch-device .loading-card {
    backdrop-filter: blur(12px) grayscale(100%);
    -webkit-backdrop-filter: blur(12px) grayscale(100%);
}


#fullscreenWarning {
    position: fixed;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.85); /* Kırmızı yerine siyah */
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px; /* Biraz büyütüldü */
    font-weight: 600;
    z-index: 9998; /* Under loader, above everything else */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    pointer-events: auto; /* Tıklanabilmesi için açıldı */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease, background 0.2s;
}
#fullscreenWarning:hover {
    background: rgba(20, 20, 20, 0.95);
}

@media (max-width: 768px) {
    #fullscreenWarning {
        top: 8px;
        left: 8px;
        font-size: 11px; /* Mobilde biraz büyütüldü */
        padding: 5px 10px;
        border-radius: 6px;
    }
}

/* =====================================================================
   SİSTEM KONTROLÜ PANELİ (karşılama ekranı tanılaması — ek/onkontrol.js)
   ===================================================================== */
.sys-check {
    z-index: 3;
    width: min(100%, 460px);
    margin: 4px 0 2px 0;
    padding: 14px 16px;
    background: rgba(10, 12, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    box-sizing: border-box;
}
.sys-check:empty { display: none; }

.sys-check__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 10px;
}

.sys-check__list {
    list-style: none;
    margin: 0 0 4px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sys-check__row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.2;
}

.sys-check__icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
    background: rgba(255, 255, 255, 0.12);
}
.sys-check__row[data-state="ok"]   .sys-check__icon { background: #10b981; }
.sys-check__row[data-state="warn"] .sys-check__icon { background: #f5a623; }
.sys-check__row[data-state="bad"]  .sys-check__icon { background: #e63946; }

.sys-check__row[data-state="ok"] .sys-check__icon::after {
    content: '';
    position: absolute;
    left: 5px; top: 2.5px;
    width: 4px; height: 8px;
    border: solid #06281f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.sys-check__row[data-state="warn"] .sys-check__icon::after,
.sys-check__row[data-state="bad"]  .sys-check__icon::after {
    content: '!';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #2a0c0f;
}

.sys-check__label {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.72);
    min-width: 140px;
}
.sys-check__value {
    flex: 1 1 auto;
    text-align: right;
    color: #fff;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sys-check__warn {
    margin-top: 10px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}
.sys-check__warn--bad {
    background: rgba(230, 57, 70, 0.14);
    border: 1px solid rgba(230, 57, 70, 0.45);
}
.sys-check__warn--warn {
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.40);
}
.sys-check__warn-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
}
.sys-check__warn p { margin: 4px 0; }
.sys-check__warn ol {
    margin: 6px 0 2px 0;
    padding-left: 18px;
}
.sys-check__warn li { margin: 3px 0; }
.sys-check__warn b { color: #fff; font-weight: 700; }
.sys-check__hint { color: rgba(255,255,255,0.72); font-style: italic; }

.sys-check__gfx {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.sys-check__gfx-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 600;
}
.sys-check__chips { display: inline-flex; gap: 6px; }
.sys-check__chip {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}
.sys-check__chip:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sys-check__chip.is-active {
    background: #e63946;
    border-color: rgba(255, 255, 255, 0.30);
    color: #fff;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
}
.sys-check__rec {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-left: auto;
}

/* Mobil / dokunmatik uyarlama */
body.touch-device .sys-check {
    width: 100%;
    padding: 12px 13px;
}
body.touch-device .sys-check__label { min-width: 110px; font-size: 13px; }
body.touch-device .sys-check__row { font-size: 13px; }

/* Karşılama ekranı: panel eklendiğinde küçük ekranlarda taşmayı önle */
body.touch-device .loading-content {
    max-height: none !important;
    overflow-y: visible !important;
}
 
/* ==========================================================================
   BİYOGRAFİ BÖLÜMÜ (SCROLL EFEKTİ İLE)
   ========================================================================== */
#biyografi-container {
    position: fixed;
    top: 100vh; /* Başlangıçta ekranın altında gizli */
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #050505;
    z-index: 5000;
    overflow-y: auto;
    color: #fff;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

#biyografi-container.active {
    transform: translateY(-100vh); /* Ekranı kaplayacak şekilde yukarı kayar */
}

.biyo-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 15vh 40px 20vh 40px;
}

.biyo-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 8vh;
    color: #e6bd72; /* Madalyonun altın rengi tonu */
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

.biyo-title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.biyo-text {
    font-size: clamp(1.2rem, 2.5vw, 2.2rem);
    line-height: 1.6;
    margin-bottom: 40px;
    color: #cccccc;
    font-weight: 300;
}

/* Kelime kelime ayrılacak olan span'lerin temel durumu */
.biyo-text span {
    display: inline-block;
    opacity: 0.15;
    transform: translateY(15px);
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
    margin-right: 0.25em; /* Kelimeler arası boşluk */
}

/* Scroll ile tetiklenen görünürlük durumu */
.biyo-text span.revealed {
    opacity: 1;
    transform: translateY(0);
    color: #ffffff;
}