/* ============================================
   XENCOM — style.css
   Sade siyah-beyaz koyu tema (cilalı sürüm)
   ============================================ */

:root {
  --bg: #050505;
  --surface: #101010;
  --surface-2: #161616;
  --border: #222222;
  --border-strong: #3a3a3a;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --danger: #ff6b6b;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.hidden { display: none !important; }

/* ---------- ARKA PLAN DOKUSU ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 45% at 50% -5%, rgba(255, 255, 255, 0.09), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 100%, rgba(255, 255, 255, 0.04), transparent 70%);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, black 30%, transparent 75%);
  pointer-events: none;
}

/* ---------- ÜST BAR ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 2rem;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.logo span { color: var(--muted); }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text);
  background: linear-gradient(180deg, #1c1c1c, #0d0d0d);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-right: auto;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active { color: var(--text); }

.user-box { display: flex; align-items: center; gap: 0.75rem; }

.user-email {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- BUTONLAR ---------- */
.btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  background: #e2e2e2;
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.06); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); }

.btn-block { width: 100%; }

.btn-social {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--border);
  padding: 0.8rem 1.25rem;
}
.btn-social:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.btn-social svg { width: 18px; height: 18px; fill: var(--text); flex-shrink: 0; }

.link-btn {
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- HERO ---------- */
main { flex: 1; position: relative; }

.hero {
  text-align: center;
  padding: 6.5rem 1.5rem 5rem;
  max-width: 760px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  margin-bottom: 1.75rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 5px rgba(255,255,255,0); }
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 30%, #9a9a9a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: 1.5rem auto 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- ÖZELLİK KARTLARI ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0) 40%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 1.1rem;
  color: var(--text);
}

.card-icon svg { width: 20px; height: 20px; }

.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* ---------- FOOTER ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.15s ease;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, #141414, #0e0e0e);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 2rem;
  animation: slideUp 0.2s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.logo-mark-lg {
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  border-radius: 12px;
  margin-bottom: 1.1rem;
}

.modal h2 { font-size: 1.3rem; margin-bottom: 0.35rem; letter-spacing: -0.01em; }

.modal-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.modal .btn-social { margin-bottom: 0.65rem; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- FORM ---------- */
.field { display: block; margin-bottom: 1rem; }

.field span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.field input::placeholder { color: #4a4a4a; }

#authForm .btn { margin-top: 0.5rem; }

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-message {
  margin-top: 1rem;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}
.auth-message.error { color: var(--danger); }
.auth-message.success { color: var(--text); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 150%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  z-index: 200;
  transition: transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- ANİMASYON ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- MOBİL ---------- */
@media (max-width: 720px) {
  .site-header { padding: 1rem 1.25rem; gap: 1rem; }
  .site-nav { display: none; }
  .features { grid-template-columns: 1fr; }
  .hero { padding: 4.5rem 1.25rem 3.5rem; }
}

/* ============================================
   İÇ SAYFALAR (forum / market / profil)
   ============================================ */

.page {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.page-head h1 { font-size: 1.8rem; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 0.92rem; margin-top: 0.35rem; }

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0) 40%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel-title { font-size: 1rem; margin-bottom: 0.9rem; }

.composer { margin-bottom: 1.5rem; }

textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06); }
textarea::placeholder { color: #4a4a4a; }

.form-row { display: flex; gap: 1rem; }
.form-row .field { flex: 1; }

.topic-item { cursor: pointer; }
.topic-item h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.topic-meta { color: var(--muted); font-size: 0.8rem; }
.topic-body { margin-top: 0.6rem; color: #c9c9c9; font-size: 0.92rem; white-space: pre-wrap; }

.replies {
  display: none;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.replies.open { display: block; }

.reply { padding: 0.6rem 0; border-bottom: 1px dashed var(--border); font-size: 0.88rem; }
.reply:last-of-type { border-bottom: none; }
.reply .topic-meta { margin-bottom: 0.25rem; }

.reply-form { display: flex; gap: 0.6rem; margin-top: 0.75rem; align-items: flex-start; }
.reply-form textarea { min-height: 44px; flex: 1; }

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}

.listing { margin-bottom: 0; display: flex; flex-direction: column; }
.listing-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.listing-head h3 { font-size: 0.98rem; }
.listing-foot {
  margin-top: auto;
  padding-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.listing-price { font-weight: 800; font-size: 1.02rem; }

.status-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  white-space: nowrap;
}
.status-badge.sold { color: var(--bg); background: var(--text); border-color: var(--text); font-weight: 700; }

.setup-notice {
  grid-column: 1 / -1;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.setup-notice code {
  color: var(--text);
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.gate { text-align: center; padding: 4rem 1rem; }
.gate h2 { margin-bottom: 0.5rem; }
.gate p { color: var(--muted); margin-bottom: 1.5rem; }

.empty { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 2.5rem 0; }

.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}
.mini-row:last-child { border-bottom: none; }
.mini-row a { color: var(--text); text-decoration: none; }
.mini-row a:hover { text-decoration: underline; }

.auth-message.success { color: var(--text); }

/* ============================================
   AVATAR / BAKİYE / EKLER / ÇARK
   ============================================ */

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.balance-chip {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}
.balance-lg { font-size: 0.95rem; padding: 0.4rem 1rem; }

/* ---------- forum görsel ekleri ---------- */
.attach-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.25rem 0 1rem; }
.attach-btn { padding: 0.5rem 0.9rem; font-size: 0.82rem; cursor: pointer; }
.attach-preview {
  width: 64px; height: 44px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
}
.topic-image {
  margin-top: 0.75rem;
  max-width: 100%;
  max-height: 380px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.btn-dl { padding: 0.4rem 0.8rem; font-size: 0.82rem; text-decoration: none; }

/* ---------- profil banner + avatar ---------- */
.profile-card { padding: 0; overflow: hidden; }

.profile-banner {
  height: 170px;
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(255,255,255,0.08), transparent 70%),
    repeating-linear-gradient(45deg, #0d0d0d 0 14px, #101010 14px 28px);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}
.profile-banner.has-image .banner-edit-hint { opacity: 0; }
.profile-banner:hover .banner-edit-hint { opacity: 1; }

.banner-edit-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.2s;
}
.profile-banner:hover .banner-edit-hint { opacity: 1; }

.profile-top {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  padding: 0 1.5rem 1.5rem;
  margin-top: -34px;
}

.avatar-wrap { position: relative; }

.avatar-big {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  background: var(--surface-2);
  position: relative;
  z-index: 1;
}

.avatar-edit-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
}
.avatar-edit-hint:hover { border-color: var(--text); }
.avatar-initial { font-size: 1.6rem; font-weight: 800; color: var(--muted); }
.avatar-edit-hint:hover .avatar-initial { color: var(--text); }

.profile-id { display: flex; flex-direction: column; gap: 0.4rem; padding-bottom: 4px; }

/* ---------- ÇARK ---------- */
.wheel-page { max-width: 640px; text-align: center; }

.wheel-box { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }

.wheel-wrap { position: relative; width: 300px; height: 300px; }

.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid var(--text);
  z-index: 2;
}

.wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--border-strong);
  background: conic-gradient(
    #f5f5f5 0deg 51.4deg,
    #141414 51.4deg 102.9deg,
    #f5f5f5 102.9deg 154.3deg,
    #141414 154.3deg 205.7deg,
    #f5f5f5 205.7deg 257.1deg,
    #141414 257.1deg 308.6deg,
    #f5f5f5 308.6deg 360deg
  );
  transition: transform 4s cubic-bezier(0.15, 0.9, 0.25, 1);
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.08), inset 0 0 30px rgba(0,0,0,0.6);
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  z-index: 1;
}

.btn-lg { padding: 0.9rem 2.2rem; font-size: 1rem; letter-spacing: 0.05em; }

.wheel-msg { min-height: 1.4em; font-size: 0.95rem; color: var(--muted); }
.wheel-msg.error { color: var(--danger); }
.wheel-msg.success { color: var(--text); font-weight: 700; }

/* footer discord linki */
.footer-discord {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-strong);
}
.footer-discord:hover { border-bottom-color: var(--text); }

/* ---------- YÖNETİM PANELİ ---------- */
.admin-tabs { display: flex; gap: 0.6rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tab-btn.active { border-color: var(--text); color: var(--text); background: rgba(255,255,255,0.06); }

.search-box {
  width: 100%;
  font: inherit; font-size: 0.9rem;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 0.6rem 0.9rem; outline: none; margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.search-box:focus { border-color: var(--border-strong); }
.search-box::placeholder { color: #4a4a4a; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th {
  text-align: left; color: var(--muted); font-weight: 600;
  padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 0.6rem 0.6rem; border-bottom: 1px dashed var(--border); vertical-align: middle; }
.admin-table .mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
.admin-table .actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

.btn-xs { padding: 0.3rem 0.6rem; font-size: 0.75rem; border-radius: 8px; }
.ban-hours {
  font: inherit; font-size: 0.75rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.3rem 0.4rem;
}
