/* assets/css/style.css — Mystery Ads Dark Theme */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Poppins:wght@400;500;600;700&display=swap');

/* ── Variables ── */
:root {
  --black:   #050303;
  --dark:    #100606;
  --wine:    #240909;
  --red:     #8e1f12;
  --orange:  #e55b22;
  --amber:   #ffb35c;
  --cream:   #ffe7ca;
  --muted:   #c7a999;
  --line:    rgba(255,132,45,.22);
  --shadow:  0 0 35px rgba(229,91,34,.18), 0 24px 60px rgba(0,0,0,.55);
  --radius:  16px;
  --radius-lg: 26px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--cream); }
img { max-width: 100%; }

/* ── Body ── */
body {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 15px;
  color: var(--cream);
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(229,91,34,.20), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(142,31,18,.35), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255,179,92,.12), transparent 34%),
    linear-gradient(135deg, #030202 0%, #120606 42%, #220b07 100%);
}

/* ── Page wrapper dots pattern ── */
.magic-bg {
  min-height: 100vh;
  padding: 18px;
  background-image:
    radial-gradient(circle, rgba(255,180,92,.22) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255,106,35,.06), transparent 45%);
  background-size: 46px 46px, 100% 100%;
}

/* ── Site wrap ── */
.site-wrap {
  max-width: 1320px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(9,5,5,.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Marcellus', serif; font-weight: 400; letter-spacing: .4px; color: var(--cream); }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { line-height: 1.7; color: var(--muted); }

/* ── Ad Strips ── */
.ad-strip {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #070303, #190707, #2a0d08);
  border-bottom: 1px solid var(--line);
}
.ad-strip.footer-strip { border-bottom: 0; border-top: 1px solid var(--line); }

.banner-slot-468 {
  width: 468px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255,132,45,.28);
  background: linear-gradient(90deg, #621509, #160707, #a42c13);
  color: #fff4e8;
  font-size: 12px;
  position: relative;
}
.banner-slot-468 img { width: 468px; max-width: 100%; height: 60px; object-fit: cover; display: block; }

/* ── Header ── */
.site-header {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,179,92,.14), transparent 26%),
    radial-gradient(circle at 85% 25%, rgba(229,91,34,.16), transparent 24%),
    linear-gradient(135deg, #0b0404, #1d0808 55%, #351006);
  padding: 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  padding: 0 24px;
  gap: 20px;
}

.header-logo {
  flex: 1;
  display: flex;
  align-items: center;
}
.header-logo img { max-height: 80px; max-width: 340px; object-fit: contain; }
.header-logo .logo-text {
  font-family: 'Marcellus', serif;
  font-size: 2.4rem;
  color: var(--cream);
  text-shadow: 0 0 18px rgba(255,179,92,.36);
  line-height: 1;
}
.header-tagline { font-size: 13px; color: #ffd9b5; margin-top: 4px; }

/* Header layout: logo fills space left, member/referrer info right fixed width */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 160px;
  padding: 12px 24px;
  gap: 24px;
}
.header-logo {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}
.header-logo img {
  max-height: 160px;
  max-width: 600px;
  object-fit: contain;
}
.header-logo .logo-text {
  font-family: 'Marcellus', serif;
  font-size: 2.4rem;
  color: var(--cream);
  text-shadow: 0 0 18px rgba(255,179,92,.36);
  line-height: 1;
}
.header-referrer {
  flex: 0 0 auto;
}

/* Right panel: gravatar + info side by side, centered */
.header-referrer {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}
.header-referrer .ref-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(229,91,34,.5);
}
.header-referrer .ref-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.header-referrer .ref-info .ref-name    { font-weight: 700; font-size: 19px; color: var(--cream); line-height: 1.2; }
.header-referrer .ref-info .ref-level   { font-size: 15px; color: var(--amber); }
.header-referrer .ref-info .ref-credits { font-size: 14px; color: var(--muted); }

/* ── Navigation ── */
.site-nav {
  background: rgba(0,0,0,.25);
  border-top: 1px solid var(--line);
  padding: 10px 24px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav a {
  color: #fff2e4;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,179,92,.06);
  border: 1px solid rgba(255,179,92,.15);
  transition: .2s;
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(229,91,34,.22);
  box-shadow: 0 0 14px rgba(229,91,34,.22);
  color: white;
}

/* ── Main layout ── */
.main-grid {
  display: grid;
  grid-template-columns: 155px 1fr 155px;
  gap: 20px;
  padding: 22px;
  background:
    radial-gradient(circle at center, rgba(229,91,34,.07), transparent 45%),
    linear-gradient(180deg, #090404, #160909 56%, #0b0505);
  min-height: 500px;
}
/* no-sidebar keeps 3-col layout with sidebars, center content is wrapped */
.main-grid.no-sidebar { grid-template-columns: 155px 1fr 155px; }
.main-grid.one-sidebar { grid-template-columns: 155px 1fr 155px; }

.sidebar { display: flex; flex-direction: column; gap: 12px; align-items: center; }

.banner-slot-125 {
  width: 125px; height: 125px;
  border-radius: 18px;
  border: 1px solid rgba(255,132,45,.30);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,179,92,.15), transparent 30%),
    linear-gradient(145deg, #2a1111, #120707 55%, #3a1208);
  color: #ffd8b2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  position: relative;
}
.banner-slot-125 img { width: 125px; height: 125px; object-fit: cover; display: block; }

/* ── Cards / Panels ── */
.card {
  background: linear-gradient(145deg, rgba(32,13,13,.96), rgba(13,6,6,.96));
  border: 1px solid rgba(255,132,45,.18);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 16px 34px rgba(0,0,0,.38), inset 0 0 30px rgba(255,179,92,.03);
}
.card-title {
  font-family: 'Marcellus', serif;
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* ── Tables ── */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data-table th {
  background: rgba(142,31,18,.4);
  color: var(--amber);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,132,45,.08);
  color: var(--muted);
  vertical-align: middle;
}
table.data-table tr:hover td { background: rgba(229,91,34,.06); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--amber); margin-bottom: 6px; }
.form-group small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], textarea, select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,132,45,.25);
  border-radius: 10px;
  color: var(--cream);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 14px;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(229,91,34,.15);
}
select option { background: #1a0808; color: var(--cream); }
textarea { min-height: 120px; resize: vertical; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: .2s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, #8e1f12, #e55b22);
  color: white;
  box-shadow: 0 8px 22px rgba(229,91,34,.28);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(229,91,34,.45); transform: translateY(-1px); color: white; }
.btn-secondary {
  background: rgba(255,179,92,.10);
  border: 1px solid rgba(255,132,45,.28);
  color: var(--amber);
}
.btn-secondary:hover { background: rgba(229,91,34,.18); color: var(--cream); }
.btn-danger { background: linear-gradient(135deg, #6b0f0f, #c0392b); color: white; }
.btn-success { background: linear-gradient(135deg, #1a5c1a, #27ae60); color: white; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; }

/* ── Flash messages ── */
.flash { padding: 12px 18px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: rgba(39,174,96,.15); border: 1px solid rgba(39,174,96,.4); color: #7dff9b; }
.flash-error   { background: rgba(192,57,43,.18); border: 1px solid rgba(192,57,43,.5); color: #ff9b9b; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-free    { background: rgba(199,169,153,.15); color: var(--muted); border: 1px solid rgba(199,169,153,.3); }
.badge-bronze  { background: rgba(205,127,50,.2);   color: #cd7f32;      border: 1px solid rgba(205,127,50,.4); }
.badge-silver  { background: rgba(192,192,192,.15); color: #c0c0c0;      border: 1px solid rgba(192,192,192,.3); }
.badge-gold    { background: rgba(255,179,92,.15);  color: var(--amber);  border: 1px solid rgba(255,179,92,.4); }
.badge-active  { background: rgba(39,174,96,.15);   color: #7dff9b;       border: 1px solid rgba(39,174,96,.3); }
.badge-pending { background: rgba(241,196,15,.15);  color: #f1c40f;       border: 1px solid rgba(241,196,15,.3); }
.badge-paused  { background: rgba(127,140,141,.15); color: #95a5a6;       border: 1px solid rgba(127,140,141,.3); }
.badge-suspended { background: rgba(192,57,43,.15); color: #e74c3c;       border: 1px solid rgba(192,57,43,.3); }

/* ── Stats grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-box {
  background: linear-gradient(145deg, rgba(32,13,13,.96), rgba(13,6,6,.96));
  border: 1px solid rgba(255,132,45,.18);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.stat-box .stat-num { font-family: 'Marcellus', serif; font-size: 2rem; color: var(--amber); line-height: 1; }
.stat-box .stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Footer ── */
.site-footer {
  text-align: center;
  color: #ffd8b2;
  font-size: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #070303, #190707);
  border-top: 1px solid var(--line);
}
.site-footer a { color: var(--orange); }

/* ── Surf Bar ── */
.surfbar {
  background: linear-gradient(135deg, #0b0404, #200a08, #300d09);
  border-bottom: 2px solid var(--orange);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.surfbar-advertiser { display: flex; align-items: center; gap: 10px; }
.surfbar-advertiser img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--orange); }
.surfbar-advertiser .adv-name { font-size: 13px; font-weight: 700; color: var(--amber); }
.surfbar-banner img { height: 60px; width: 468px; max-width: 250px; object-fit: cover; border-radius: 8px; }
.surfbar-stats { font-size: 13px; color: var(--muted); }
.surfbar-stats strong { color: var(--amber); }
.surfbar-actions { display: flex; gap: 8px; margin-left: auto; }

/* ── Timer ── */
.timer-wrap { display: flex; align-items: center; gap: 10px; }
.timer-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: conic-gradient(var(--orange) var(--prog, 0%), rgba(255,132,45,.15) 0%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: var(--amber);
  position: relative;
}

/* ── Dice game ── */
.dice { display: inline-block; font-size: 3rem; cursor: pointer; transition: transform .3s; user-select: none; }
.dice.rolling { animation: roll .4s ease-in-out; }
@keyframes roll { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-20deg) scale(1.2); } 75% { transform: rotate(20deg) scale(1.2); } }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: 8px; font-size: 13px;
  background: rgba(255,179,92,.08); border: 1px solid rgba(255,132,45,.18);
  color: var(--amber);
}
.pagination .current { background: var(--orange); color: white; border-color: var(--orange); }
.pagination a:hover { background: rgba(229,91,34,.22); color: white; }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); z-index: 9999;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: linear-gradient(145deg, #1a0808, #0b0404);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 540px; width: 100%;
  box-shadow: var(--shadow);
}
.modal-title { font-family: 'Marcellus', serif; font-size: 1.4rem; color: var(--amber); margin-bottom: 16px; }

/* ── Section eyebrow ── */
.eyebrow { color: #ff9b54; font-weight: 700; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 8px; }

/* ── Responsive ── */
@media (max-width: 1050px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .ad-strip { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  h1 { font-size: 1.7rem; }
  .header-inner { padding: 12px; }
  .surfbar { flex-direction: column; align-items: flex-start; }
  .surfbar-actions { margin-left: 0; }
}

/* ── Admin ── */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; min-height: 100vh; flex-shrink: 0;
  background: linear-gradient(180deg, #0b0404, #1a0808);
  border-right: 1px solid var(--line);
  padding: 0 0 30px;
}
.admin-sidebar .admin-logo {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  font-family: 'Marcellus', serif;
  font-size: 1.2rem;
  color: var(--amber);
}
.admin-sidebar .admin-logo span { color: var(--muted); font-family: 'Poppins', sans-serif; font-size: 11px; display: block; margin-top: 2px; }
.admin-nav-section { padding: 14px 16px 4px; font-size: 10px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; color: #c7a999; font-size: 13px;
  border-left: 3px solid transparent; transition: .2s;
  text-decoration: none;
}
.admin-nav a:hover, .admin-nav a.active {
  color: var(--amber); background: rgba(229,91,34,.10);
  border-left-color: var(--orange);
}
.admin-content {
  flex: 1; padding: 28px;
  background: linear-gradient(180deg, #090404, #160909 60%, #0b0505);
  min-height: 100vh;
}
.admin-page-title {
  font-family: 'Marcellus', serif; font-size: 1.8rem;
  color: var(--cream); margin-bottom: 22px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}

/* ── Shine sweep effect (from original theme) ────────────────────────────── */
@keyframes shine {
  0%, 68% { left: -55%; }
  100%     { left: 130%; }
}

/* Moving shine on the header logo image */
.header-logo {
  position: relative;
  overflow: hidden;
}
.header-logo::before {
  content: "";
  position: absolute;
  inset: -80% auto auto -40%;
  width: 42%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255,220,170,.55), transparent);
  transform: rotate(25deg);
  animation: shine 5.8s infinite;
  pointer-events: none;
  z-index: 1;
}
.header-logo img {
  position: relative;
  z-index: 0;
}

/* Applied to banner slots, header logo area, and cards on hover */
.banner-slot-468,
.banner-slot-125,
.site-header,
.stat-box {
  position: relative;
  overflow: hidden;
}

.banner-slot-468::before,
.banner-slot-125::before {
  content: "";
  position: absolute;
  inset: -80% auto auto -40%;
  width: 42%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255,220,170,.45), transparent);
  transform: rotate(25deg);
  animation: shine 5.8s infinite;
  pointer-events: none;
  z-index: 1;
}

/* Slight shine on cards when hovered */
.card {
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: -80% auto auto -40%;
  width: 42%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255,220,170,.12), transparent);
  transform: rotate(25deg);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 0;
  animation: shine 8s infinite;
}

/* Admin cards get a slower, subtler shine */
.admin-content .card::before {
  animation: shine 10s infinite;
  background: linear-gradient(90deg, transparent, rgba(255,220,170,.08), transparent);
}

/* Make sure card content sits above the shine pseudo-element */
.card > * {
  position: relative;
  z-index: 1;
}

/* ── Inner grid for member pages with their own right column ── */
.inner-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  width: 100%;
}
@media (max-width: 900px) {
  .inner-grid { grid-template-columns: 1fr; }
}

/* ── Universal page layout ─────────────────────────────────────────────── */
.page-body {
  display: grid;
  grid-template-columns: 155px 1fr 155px;
  gap: 20px;
  padding: 22px;
  background:
    radial-gradient(circle at center, rgba(229,91,34,.07), transparent 45%),
    linear-gradient(180deg, #090404, #160909 56%, #0b0505);
  min-height: 500px;
}
.page-content {
  min-width: 0;
}
.sidebar-left, .sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
@media (max-width: 1050px) {
  .page-body { grid-template-columns: 1fr; }
  .sidebar-left, .sidebar-right { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

/* ── Public nav: 3 equal-width main buttons ─────────────────────────────── */
.site-nav a.nav-wide {
  flex: 1;
  max-width: 200px;
  text-align: center;
  justify-content: center;
  font-size: 15px;
  padding: 10px 20px;
}