/* ============================================================
   M2 Yayın Merkezi — karanlık oryantal tema
   Metin2 estetiğinden ilham alır ancak tüm görseller özgündür.
   ============================================================ */

:root {
  --bg: #0c0906;
  --bg-2: #14100a;
  --panel: #1a140c;
  --panel-2: #211a10;
  --border: #3a2e1a;
  --border-gold: #6b5426;
  --gold: #c9a35c;
  --gold-bright: #e8c987;
  --red: #a32020;
  --red-bright: #d93a3a;
  --text: #e8ddc8;
  --text-dim: #9c8f74;
  --live: #3ddc5a;
  --radius: 10px;
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

/* Arka plan dokusu: koyu kızıl/altın ışıma */
.bg-fx {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(163, 32, 32, .22), transparent 65%),
    radial-gradient(ellipse 45% 35% at 85% 20%, rgba(201, 163, 92, .07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(201, 163, 92, .05), transparent 60%),
    linear-gradient(180deg, #120d07 0%, var(--bg) 40%);
}
.bg-fx::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.14) 2px 4px);
  opacity: .35;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
a { color: var(--gold-bright); text-decoration: none; }

/* ---------- Üst bar ---------- */

.site-header {
  background: linear-gradient(180deg, rgba(20,14,7,.97), rgba(16,11,6,.92));
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 2px 24px rgba(0,0,0,.6), inset 0 -1px 0 rgba(201,163,92,.15);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-size: 26px; width: 46px; height: 46px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #2c2113, #171008);
  border: 1px solid var(--border-gold); border-radius: 50%;
  color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(201,163,92,.25), inset 0 0 8px rgba(0,0,0,.7);
}
.brand-text {
  font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .5px;
  background: linear-gradient(180deg, #f0d9a0, #b98f45);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: flex; flex-direction: column; line-height: 1.15;
}
.brand-text small {
  font-family: var(--font-body); font-weight: 500; font-size: 11px;
  color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); letter-spacing: .3px;
}

.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 16px; border-radius: 8px; color: var(--text-dim);
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  transition: all .18s;
}
.nav a:hover { color: var(--gold-bright); }
.nav a.active {
  color: var(--gold-bright); border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(201,163,92,.12), rgba(201,163,92,.04));
}

/* ---------- Hero ---------- */

.hero { text-align: center; padding: 46px 0 22px; }
.hero.small { padding: 34px 0 12px; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 42px); font-weight: 800;
  background: linear-gradient(180deg, #f4e2b0 20%, #c9a35c 60%, #8f6b2f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(201,163,92,.15);
  letter-spacing: 1px;
}
.hero p { color: var(--text-dim); margin-top: 8px; font-size: 15px; }
.hero::after {
  content: ""; display: block; width: 220px; height: 2px; margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 12px rgba(201,163,92,.5);
}

/* ---------- Bölümler ---------- */

.section { margin: 34px 0; }
.section-title {
  font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: .8px;
  color: var(--text); display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.section-title.gold { color: var(--gold-bright); }
.section-title.muted { color: var(--text-dim); }
.section-title .count {
  background: var(--red); color: #fff; font-family: var(--font-body);
  font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 20px;
}
.section-title .more { margin-left: auto; font-family: var(--font-body); font-size: 13px; font-weight: 600; }

.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live);
  display: inline-block; box-shadow: 0 0 8px var(--live);
  animation: pulse 1.6s infinite;
}
.dot.big { width: 11px; height: 11px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.empty { color: var(--text-dim); font-style: italic; padding: 14px 4px; grid-column: 1/-1; }

/* Etkinlik takvimi tabloları — Metin2 wiki renk tonları (koyu kırmızı başlık, parşömen zemin) */
.etable-wrap { overflow-x: auto; margin-top: 10px; border-radius: 6px; }
.etable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.etable th, .etable td { border: 1px solid #97100d; padding: 9px 10px; text-align: center; }
.etable th { background: #5d0505; color: #f0d9a2; font-weight: 800; }
.etable td { background: #f7ecd4; color: #4a2c12; }
.etable tr:nth-child(even) td { background: #f0e2c4; }
.etable tr td:first-child { font-weight: 700; white-space: nowrap; background: #ecdbb6; }

/* Aktif etkinlik kutusu — sağ altta yüzen mini panel */
.aev-box {
  position: fixed; right: 18px; bottom: 18px; width: 250px; z-index: 90;
  border: 1px solid var(--gold); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(42, 32, 16, .97), rgba(28, 21, 11, .97));
  padding: 14px 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, .5), 0 0 18px rgba(201, 163, 92, .15);
}
.aev-close {
  position: absolute; top: 8px; right: 10px; background: none; border: none;
  color: var(--text-dim); font-size: 13px; cursor: pointer; padding: 2px;
}
.aev-close:hover { color: var(--gold-bright); }
.aev-head { font-family: var(--font-display); color: var(--gold-bright); font-size: 14.5px; margin-bottom: 8px; }
.aev-list { display: flex; flex-direction: column; gap: 8px; }
.aev {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 11px;
  background: rgba(201, 163, 92, .08); border: 1px solid var(--border-gold); border-radius: 8px;
}
.aev:hover { background: rgba(201, 163, 92, .16); }
.aev-name { font-weight: 700; color: var(--text); font-size: 13.5px; }
.aev-meta { font-size: 11px; color: var(--text-dim); line-height: 1.5; }
.aev-all { display: block; margin-top: 8px; font-size: 12px; color: var(--gold-bright); }
@media (max-width: 900px) {
  .aev-box { position: static; width: auto; margin: 0 0 16px; }
  .aev-list { flex-direction: row; flex-wrap: wrap; }
  .aev-close { display: none; }
}

/* Takvimde aktif hücre */
.etable td.on { background: #ffe9b0; font-weight: 800; box-shadow: inset 0 0 0 2px #c9a35c; }
.on-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #2f9e44; box-shadow: 0 0 6px #2f9e44; animation: pulse 1.6s infinite;
}

/* İletişim formu + mesajlar */
textarea {
  width: 100%; background: #120d06; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-family: var(--font-body); font-size: 14px; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--gold); }
.cform-full { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.legal p { color: var(--text-dim); font-size: 14px; line-height: 1.65; margin: 8px 0 18px; }
.legal a { color: var(--gold-bright); text-decoration: underline; }
.msg-item { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.msg-item.unread { border-color: var(--gold); background: rgba(201, 163, 92, .05); }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.msg-body { font-size: 14px; color: var(--text); margin-bottom: 10px; white-space: pre-line; }

/* Yayıncı profil sayfası */
.profile-head { display: flex; gap: 24px; align-items: center; padding-top: 30px; flex-wrap: wrap; }
.profile-avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border-gold); flex-shrink: 0;
}
.profile-avatar.avatar-ph { display: grid; place-items: center; font-size: 48px; }
.profile-info h1 { font-family: var(--font-display); font-size: 30px; color: var(--gold-bright); }
.profile-sub { color: var(--text-dim); margin: 6px 0 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gold-text { color: var(--gold-bright); font-weight: 700; }
.pstats { display: flex; gap: 14px; flex-wrap: wrap; }
.pstat {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 26px; display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.pstat-num { font-size: 24px; font-weight: 800; color: var(--gold-bright); }
.pstat-label { font-size: 12px; color: var(--text-dim); }
.plinks { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.plinks a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px;
  background: rgba(201, 163, 92, .07); border: 1px solid var(--border); border-radius: 20px; color: var(--text);
}
.plinks a:hover { border-color: var(--gold); color: var(--gold-bright); }

/* Nesne Market haberleri */
.mnews {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.mnews summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; cursor: pointer; list-style: none;
}
.mnews summary::-webkit-details-marker { display: none; }
.mnews summary::after { content: '▾'; color: var(--gold-bright); flex-shrink: 0; }
.mnews[open] summary::after { content: '▴'; }
.mnews-title { font-weight: 700; font-size: 15.5px; }
.mnews-date { color: var(--text-dim); font-size: 12.5px; white-space: nowrap; margin-left: auto; }
.mnews-body { padding: 4px 18px 16px; font-size: 14px; line-height: 1.55; color: var(--text); }
.mnews-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; }
.mnews-body table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.mnews-body td, .mnews-body th { border: 1px solid var(--border); padding: 7px 9px; }
.mnews-body a { color: var(--gold-bright); text-decoration: underline; }
.mnews-src { margin-top: 10px; font-size: 12.5px; }

/* ---------- Yayıncı kartları ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

.card {
  position: relative; display: block; padding: 16px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-gold); box-shadow: 0 8px 26px rgba(0,0,0,.5); }

.card.live { border-color: rgba(61,220,90,.35); }
.card.live:hover { box-shadow: 0 8px 26px rgba(0,0,0,.5), 0 0 18px rgba(61,220,90,.12); }
.card.offline { opacity: .62; }
.card.offline:hover { opacity: .9; }

.card.premium {
  border: 1px solid var(--gold);
  background: linear-gradient(160deg, #2a2010, #1c150b);
  box-shadow: 0 0 20px rgba(201,163,92,.15), inset 0 0 30px rgba(201,163,92,.05);
  opacity: 1;
}
/* Premium kartlar: sayfanın ortasında, normal kartların iki katı büyüklükte */
#featured-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
#featured-grid .card { width: 560px; max-width: 100%; }
.card.premium { padding: 28px 26px; }
.card.premium .avatar { width: 100px; height: 100px; border-width: 3px; }
.card.premium .avatar-ph { font-size: 42px; }
.card.premium .card-top { gap: 18px; }
.card.premium .card-info h3 { font-size: 25px; }
.card.premium .badge { font-size: 14px; gap: 8px; }
.card.premium .badge-live .vcount { font-size: 19px; }
.card.premium .plogo { width: 40px; height: 40px; }
.card.premium .stream-title { font-size: 14.5px; }

.ribbon {
  position: absolute; top: 10px; right: -34px; transform: rotate(38deg);
  background: linear-gradient(180deg, var(--gold-bright), #a87f38);
  color: #241a0a; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 38px; box-shadow: 0 2px 8px rgba(0,0,0,.45);
}

.card-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-gold); flex-shrink: 0;
}
.avatar-ph {
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 22px; font-weight: 800; color: var(--gold-bright);
  background: radial-gradient(circle at 35% 30%, #2c2113, #140e07);
}
.card.live .avatar { border-color: var(--live); box-shadow: 0 0 10px rgba(61,220,90,.35); }

.card-info { min-width: 0; flex: 1; }
.card-info h3 { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.plogo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; opacity: .9; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; margin-top: 3px; }
.badge-live { color: var(--live); }
.badge-live .vcount { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.badge-off { color: var(--text-dim); font-weight: 600; }

.stream-title {
  margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Video kartları ---------- */

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.vcard {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; color: var(--text);
  transition: transform .18s, border-color .18s;
}
.vcard:hover { transform: translateY(-3px); border-color: var(--border-gold); }

.vthumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vplay {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 30px; color: #fff; background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .18s;
}
.vcard:hover .vplay { opacity: 1; }

.vcard h3 {
  font-size: 13.5px; font-weight: 600; padding: 10px 12px 2px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vcard p { font-size: 12px; color: var(--text-dim); padding: 4px 12px 12px; }

/* ---------- Reklam alanları ---------- */

.ad-slot {
  margin: 26px 0; min-height: 90px; display: grid; place-items: center;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: rgba(255,255,255,.015);
}
.ad-ph { color: #4d4433; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }

/* ---------- Alt bilgi ---------- */

.site-footer {
  margin-top: 60px; padding: 26px 0 34px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.35));
}
.site-footer p { color: #6d6350; font-size: 12px; max-width: 760px; }
.foot-links { margin-top: 10px; }
.foot-links a { color: #6d6350; }
.foot-links a:hover { color: var(--gold); }

/* ---------- Admin ---------- */

.login-box {
  max-width: 380px; margin: 12vh auto 0; padding: 34px 30px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-gold); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.login-title {
  font-family: var(--font-display); font-size: 22px; text-align: center; margin-bottom: 22px;
  color: var(--gold-bright);
}
.login-note { margin-top: 16px; font-size: 12px; color: var(--text-dim); text-align: center; }

.panel {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin: 22px 0;
}
.panel h2 { font-family: var(--font-display); font-size: 17px; color: var(--gold-bright); margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.hint { font-size: 12.5px; color: var(--text-dim); margin-top: 12px; }
.hint code, .login-note code { background: rgba(201,163,92,.12); padding: 1px 6px; border-radius: 4px; color: var(--gold-bright); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: end; }
.form-check { display: flex; align-items: center; }
.form-check label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; }
input[type=text], input[type=password] {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  background: #0e0a06; border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-body); font-size: 14px;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,163,92,.15); }

.btn {
  cursor: pointer; border: 1px solid var(--border-gold); border-radius: 8px;
  padding: 10px 20px; font-weight: 700; font-size: 14px; font-family: var(--font-body);
  background: linear-gradient(180deg, #2a2114, #1a140c); color: var(--text);
  transition: all .15s;
}
.btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.gold-btn {
  background: linear-gradient(180deg, #d9b671, #a87f38); color: #241a0a; border-color: #e8c987;
}
.gold-btn:hover { background: linear-gradient(180deg, #e8c987, #b98f45); color: #1a1206; }
.small-btn { padding: 7px 14px; font-size: 13px; }
.tiny-btn { padding: 4px 10px; font-size: 12px; }
.danger-btn { border-color: #6b2626; color: #d98080; background: #1c0f0f; }
.danger-btn:hover { border-color: var(--red-bright); color: #fff; background: var(--red); }

.inline { display: inline; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 9px 10px; color: var(--text-dim); font-size: 12px;
  text-transform: uppercase; letter-spacing: .6px; border-bottom: 1px solid var(--border-gold);
}
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.muted-td { color: var(--text-dim); font-size: 13px; }
.plogo-sm { width: 16px; height: 16px; vertical-align: -3px; }

.alert { padding: 12px 16px; border-radius: 8px; margin: 18px 0; font-size: 14px; font-weight: 600; }
.alert.ok { background: rgba(61,220,90,.1); border: 1px solid rgba(61,220,90,.35); color: #7ee694; }
.alert.err { background: rgba(217,58,58,.1); border: 1px solid rgba(217,58,58,.4); color: #e98a8a; }

/* ---------- Mobil ---------- */

@media (max-width: 640px) {
  .header-in { flex-direction: column; gap: 10px; }
  .hero { padding: 30px 0 14px; }
  .grid, .vgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .grid, .vgrid { grid-template-columns: 1fr; }
}
