/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ── Fixed skyline background ─────────────────────────────────────────────── */
.bg-skyline {
  position: fixed;
  inset: 0;
  z-index: -1;
  /* Gradient fallback — shows if images haven't been added yet */
  background: linear-gradient(180deg, #04040d 0%, #0b1528 35%, #111e3a 65%, #080810 100%);
  background-size: cover;
  background-position: center;
}

/* ── Landing body ────────────────────────────────────────────────────────── */
.landing-body {
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
}

/* Light dim overlay for text readability */
.landing-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 4, 18, 0.22);
  z-index: 0;
  pointer-events: none;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 72px;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero p {
  margin-top: 16px;
  font-size: 1.45rem;
  line-height: 1.55;
  opacity: 0.88;
}

.cta {
  margin-top: 32px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ── Category list ───────────────────────────────────────────────────────── */
.categories {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.category-row {
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
}

.category-row.open {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.18);
}

.category-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: none;
  background: transparent;
  color: #fff;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.category-toggle:active {
  background: rgba(255, 255, 255, 0.06);
}

.category-name {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.category-icon { font-size: 1.35rem; }

.toggle-icon {
  font-size: 1.4rem;
  font-weight: 300;
  opacity: 0.55;
  line-height: 1;
  min-width: 22px;
  text-align: center;
  transition: transform 0.2s;
}

/* ── Offers panel ────────────────────────────────────────────────────────── */
.offers-panel {
  display: none;
  padding: 0 10px 10px;
}

.offers-panel.open {
  display: block;
}

.offer-card {
  background: rgba(0, 0, 0, 0.42);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}

.offer-card-body {
  display: flex;
  gap: 14px;
  padding: 14px 14px 10px;
  align-items: flex-start;
}

.offer-thumb {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.07);
}

.offer-thumb-placeholder {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.offer-info { flex: 1; min-width: 0; }

.offer-badge {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 5px;
}

.offer-badge.affiliate {
  background: rgba(255, 210, 0, 0.18);
  color: #ffd700;
  border: 1px solid rgba(255, 210, 0, 0.28);
}

.offer-badge.lmos_product {
  background: rgba(70, 210, 110, 0.18);
  color: #46d26e;
  border: 1px solid rgba(70, 210, 110, 0.28);
}

.offer-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 5px;
}

.offer-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.68;
}

.offer-cta {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  padding: 13px;
  background: #ffffff;
  color: #111;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  border-radius: 10px;
  border: none;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.offer-cta:active {
  transform: scale(0.97);
  background: #e0e0e0;
}

.no-offers {
  padding: 14px;
  font-size: 0.84rem;
  opacity: 0.42;
  font-style: italic;
}

/* ── Admin body ──────────────────────────────────────────────────────────── */
.admin-body {
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 0.93rem;
}

/* Login */
.admin-login-wrap {
  max-width: 360px;
  margin: 90px auto;
  padding: 36px 32px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 14px;
}

.admin-login-wrap h2 {
  margin-bottom: 28px;
  text-align: center;
  color: #e6edf3;
  font-size: 1.3rem;
}

/* Nav */
.admin-nav {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-nav strong { color: #e6edf3; font-size: 1rem; }
.admin-nav a { color: #8b949e; text-decoration: none; }
.admin-nav a:hover { color: #e6edf3; }

/* Container */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.admin-container h2 { color: #e6edf3; font-size: 1.15rem; }
.admin-container h3 { color: #c9d1d9; font-size: 0.95rem; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Table */
table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
th {
  background: #161b22;
  color: #8b949e;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  border-bottom: 1px solid #30363d;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid #21262d;
  color: #c9d1d9;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* Stats */
.stats-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.stat-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 20px 24px;
  min-width: 120px;
  flex: 1;
}

.stat-value { font-size: 2rem; font-weight: 700; color: #e6edf3; line-height: 1; }
.stat-label { font-size: 0.77rem; color: #8b949e; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  line-height: 1;
}
.btn:hover { opacity: 0.82; }
.btn-primary  { background: #238636; color: #fff; }
.btn-secondary{ background: #21262d; color: #c9d1d9; border: 1px solid #30363d; }
.btn-danger   { background: #b91c1c; color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 0.78rem; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 0.86rem;
  color: #8b949e;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 13px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 7px;
  color: #e6edf3;
  font-size: 0.92rem;
  font-family: inherit;
}
.form-group input[type="file"] { color: #8b949e; padding: 8px 0; }
.form-group textarea { height: 80px; resize: vertical; line-height: 1.5; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #388bfd;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-group input { width: auto; }
.checkbox-group label { margin: 0; color: #c9d1d9; }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

/* Flash messages */
.flash-success {
  background: #0f2d1c;
  color: #56d364;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  border: 1px solid #1f4d2c;
}
.flash-error {
  background: #2d1010;
  color: #f85149;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  border: 1px solid #4a1a1a;
}
