.reg-popup{
  position:fixed;
  top:0;left:0;right:0;bottom:0;
  background:#000a;
  display:none;
  justify-content:center;
  align-items:center;
  z-index:9999;
}
.reg-popup.show{
  display:flex;
}

.reg-popup-inner{
  width:420px;
  height:600px;
  background:#0f172a;
  border-radius:16px;
  box-shadow:0 0 25px #0009;
  overflow:hidden;
}

.reg-popup-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  background:#1e293b;
  color:white;
  font-size:16px;
}

.reg-popup-close{
  background:none;
  border:none;
  color:white;
  font-size:20px;
  cursor:pointer;
}

.reg-iframe{
  width:100%;
  height:100%;
  border:none;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  /* =========================================
     DÄ°NAMÄ°K RENK MOTORU
     ========================================= */
  --bg-dark: #020617;
  --hue: 250; 
  --primary: hsl(var(--hue), 90%, 65%);       
  --secondary: hsl(calc(var(--hue) + 60), 90%, 60%); 
  --accent: hsl(calc(var(--hue) + 180), 80%, 70%);    
  
  --glass-bg: rgba(255, 255, 255, 0.03); 
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.2); 
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius-xl: 24px;
  
  animation: colorCycle 20s infinite linear;
}

@keyframes colorCycle {
  0% { --hue: 0; }
  100% { --hue: 360; }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

/* =======================================================
   ARKA PLAN: YILDIZLAR VE UZAY
======================================================= */
body {
  min-height: 100vh;
  background: radial-gradient(ellipse at bottom, #0f172a 0%, var(--bg-dark) 100%);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  padding: 20px;
}

body::before {
  content: " ";
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 2px;
  background: transparent;
  box-shadow: 
    10vw 10vh #fff, 20vw 80vh #fff, 30vw 30vh #fff, 40vw 50vh #fff, 
    50vw 10vh #fff, 60vw 90vh #fff, 70vw 40vh #fff, 80vw 20vh #fff, 
    90vw 60vh #fff, 15vw 65vh #fff, 25vw 15vh #fff, 85vw 85vh #fff,
    55vw 55vh #fff, 35vw 75vh #fff, 05vw 95vh #fff, 95vw 05vh #fff;
  border-radius: 50%;
  opacity: 0.6;
  animation: twinkle 5s infinite ease-in-out;
  z-index: -2;
}

body::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, var(--primary), transparent 40%),
    radial-gradient(circle at 80% 70%, var(--secondary), transparent 40%);
  filter: blur(80px);
  opacity: 0.25; 
  z-index: -1;
  animation: nebulaMove 15s infinite alternate;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); box-shadow: 10vw 10vh var(--primary), 50vw 10vh var(--secondary); }
}

@keyframes nebulaMove {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* =======================================================
   ANA KAPSAYICI & LOGO
======================================================= */
.auth-shell {
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 10;
}

.auth-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px;
  text-align: center;
}

.auth-logo-circle {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  box-shadow: 0 0 30px rgba(0,0,0,0.3);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.auth-logo-circle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spinBorder 4s linear infinite;
}

.auth-logo-main {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.auth-logo-sub {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

/* =======================================================
   KART TASARIMI (GLASSMORPHISM)
======================================================= */
.auth-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  background: rgba(15, 23, 42, 0.4); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5), 
    inset 0 0 30px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: all 0.5s ease;
}

.auth-card:hover {
  border-top-color: rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 35px 60px -15px rgba(0, 0, 0, 0.6), 
    inset 0 0 50px rgba(255, 255, 255, 0.05);
}

/* --- SOL PANEL (Profil) --- */
.auth-preview {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.2));
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.auth-preview-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 25px;
}

.auth-avatar-big {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(var(--hue), var(--primary), var(--secondary)); 
  position: relative;
  margin-bottom: 20px;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.auth-avatar-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #0f172a;
  background: #000;
}

.auth-preview-username {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 5px;
  text-align: center;
}

.auth-preview-role {
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.avatar-select-btn {
  margin-top: 25px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: #ccc;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
}

.avatar-select-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary);
}

/* --- SAÄ PANEL (Form) --- */
.auth-form-wrap {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.auth-tab-row {
  display: flex;
  background: rgba(0,0,0,0.2);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid rgba(255,255,255,0.05);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.auth-tab.active {
  background: rgba(255,255,255,0.1);
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.auth-field { margin-bottom: 18px; }

.auth-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-left: 4px;
  font-weight: 500;
}

.auth-field input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2); 
  border: 1px solid var(--glass-border);
  padding: 14px;
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
}

.auth-field input:focus {
  border-color: var(--primary);
  background: rgba(0,0,0,0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05), 0 0 15px var(--primary);
}

.auth-gender-row { display: flex; gap: 10px; }

.gender-pill {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  transition: 0.3s;
  font-size: 0.9rem;
}

.gender-pill:hover { background: rgba(255,255,255,0.05); }

.gender-pill.active {
  border-color: var(--primary);
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(0,0,0,0));
  color: var(--primary);
}

.auth-submit-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-size: 200% 200%;
  animation: gradientMove 5s ease infinite;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: transform 0.2s;
  letter-spacing: 0.5px;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px var(--primary);
}

.auth-register-btn {
  width: 100%;
  margin-top: 15px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.3s;
}
.auth-register-btn:hover { color: #fff; text-decoration: underline; }

/* =======================================================
   MODAL & POPUP (YENÄ°LENMÄ°Å)
======================================================= */
.avatar-modal, .reg-popup {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center; justify-content: center;
}

.avatar-modal.open, .reg-popup.show { display: flex; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.avatar-modal-inner, .reg-popup-inner {
  background: #0f172a; /* Fallback */
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(20, 30, 50, 0.9));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 25px;
  width: 90%; max-width: 450px;
  box-shadow: 0 0 50px rgba(0,0,0,0.8), inset 0 0 20px rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: 0.3s;
  line-height: 1;
}
.modal-close:hover { color: var(--accent); transform: rotate(90deg); }

/* Avatar Grid AlanÄ± */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 15px;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
}

/* KaydÄ±rma Ã‡ubuÄŸu Ã–zelleÅŸtirme */
.avatar-grid::-webkit-scrollbar { width: 6px; }
.avatar-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
.avatar-grid::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
.avatar-grid::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Tekil Avatar Ã–ÄŸesi */
.avatar-item {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  background: rgba(255,255,255,0.05);
}

.avatar-item img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-item:hover {
  transform: scale(1.15);
  box-shadow: 0 0 15px var(--primary);
  border-color: var(--accent);
  z-index: 2;
}

.avatar-item.selected {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary), inset 0 0 10px var(--primary);
  transform: scale(1.1);
}

/* =======================================================
   RESPONSIVE - MOBÄ°L
======================================================= */
@media (max-width: 850px) {
  .auth-card {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0;
  }
  .auth-form-wrap {
    order: 1;
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .auth-preview {
    order: 2;
    border-right: none;
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
  }
  .auth-logo-circle { width: 60px; height: 60px; font-size: 1.5rem; }
  .auth-logo-main { font-size: 1.5rem; }
}

/* =======================================================
   INTERNET EXPLORER 10 & 11 UYUMLULUK YAMASI
   (Modern Ã¶zelliklerin desteklenmediÄŸi tarayÄ±cÄ±lar iÃ§in)
======================================================= */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  
  /* DeÄŸiÅŸkenler IE'de Ã§alÄ±ÅŸmaz, manuel renk atamalarÄ±: */
  
  body {
    background: #0f172a; /* DÃ¼z renk */
    display: flex; 
    /* IE Flexbox Ã¶nekleri gerekebilir ama modern IE11 std flexi destekler */
  }
  
  /* Glassmorphism iptal, dÃ¼z koyu zemin */
  .auth-card {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px #000;
    display: -ms-grid; /* IE Grid Prefix */
    -ms-grid-columns: 300px 1fr;
  }
  
  .auth-preview {
    background: #0f172a;
    -ms-grid-column: 1;
  }
  
  .auth-form-wrap {
    background: #1e293b;
    -ms-grid-column: 2;
  }
  
  /* Gradient text veya border sorunlarÄ± iÃ§in fallback */
  .auth-submit-btn {
    background: #4f46e5; /* Sabit mor renk */
    color: #fff;
  }
  
  .auth-logo-circle {
    background: #0f172a;
    border: 2px solid #6366f1;
  }
  
  .auth-avatar-big {
    background: #6366f1;
  }
  
  .avatar-modal, .reg-popup {
    background: rgba(0,0,0,0.9); /* Daha koyu arka plan */
  }
  
  .avatar-modal-inner {
    background: #1e293b;
    border: 1px solid #475569;
  }
  
  /* Inputlar */
  .auth-field input {
    background: #334155;
    color: #fff;
    border: 1px solid #475569;
  }
  
  /* Grid (Avatar iÃ§i) IE'de zordur, Floata veya Inline-blocka Ã§evirebiliriz */
  .avatar-grid {
    display: block;
  }
  .avatar-item {
    display: inline-block;
    margin: 5px;
  }
}