:root {
  --bg: #070b14;
  --bg2: #0d1526;
  --surface: rgba(16, 26, 46, 0.78);
  --surface-strong: rgba(20, 34, 62, 0.92);
  --border: rgba(110, 185, 255, 0.18);
  --border-bright: rgba(110, 210, 255, 0.45);
  --text: #f3f7ff;
  --muted: #9eb3d1;
  --sky: #38bdf8;
  --blue: #0ea5e9;
  --emerald: #10b981;
  --gold: #facc15;
  --orange: #f97316;
  --ruby: #f43f5e;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.16), transparent 44%),
    radial-gradient(circle at 82% 8%, rgba(244, 63, 94, 0.12), transparent 40%),
    linear-gradient(180deg, #070b14 0%, #0a1222 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.hidden { display: none !important; }

/* Sticky Portal Header */
.p-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 11, 20, 0.82);
  border-bottom: 1px solid var(--border);
}
.p-nav {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.p-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 900; font-size: 16px; letter-spacing: -0.02em; flex-shrink: 0;
}
.p-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  display: grid; place-items: center; font-weight: 900; font-size: 18px; color: #fff;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.45);
}
.p-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p-link {
  padding: 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); text-decoration: none; transition: all .15s;
}
.p-link:hover, .p-link.active { color: #fff; background: rgba(56, 189, 248, 0.14); }
.p-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: 99px; font-size: 13.5px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .14s, filter .14s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(180deg, #ffdd44 0%, #f97316 100%);
  color: #1f0a00; font-weight: 800; box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}
.btn-sky {
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  color: #fff; box-shadow: 0 6px 18px rgba(14, 165, 233, 0.32);
}
.btn-emerald { background: linear-gradient(180deg, #34d399, #059669); color: #022014; font-weight: 800; }
.btn-ghost { background: rgba(255,255,255,0.06); border-color: var(--border); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

.p-wrap { max-width: 1180px; margin: 0 auto; padding: 36px 20px 76px; }
.p-section { margin-top: 48px; }
.p-sec-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.p-sec-title { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -0.025em; }
.p-sec-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* Cards & Grids */
.p-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 22px; backdrop-filter: blur(18px);
}
.p-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.p-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.p-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .p-grid-3, .p-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) {
  .p-grid-2, .p-grid-3, .p-grid-4 { grid-template-columns: 1fr; }
  .p-links { display: none; }
}

/* Mobile Quick Sub-Nav */
.p-mobile-nav {
  display: none; overflow-x: auto; gap: 6px; padding: 8px 16px;
  border-top: 1px solid var(--border); background: rgba(7, 11, 20, 0.92);
}
@media (max-width: 680px) { .p-mobile-nav { display: flex; } }

/* Badges */
.p-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 700;
  background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.3); color: #bae6fd;
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.cat-badge {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
}
.cat-event { background: rgba(244, 63, 94, 0.2); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.4); }
.cat-update { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.cat-guide { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.cat-news { background: rgba(250, 204, 21, 0.2); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.4); }

/* News Card */
.news-card {
  display: flex; flex-direction: column; overflow: hidden; padding: 0; text-decoration: none;
  transition: transform .16s, border-color .16s;
}
.news-card:hover { transform: translateY(-3px); border-color: var(--border-bright); }
.news-cover { width: 100%; height: 158px; object-fit: cover; display: block; background: #0c1930; }
.news-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-title { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.35; color: #fff; }
.news-excerpt { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; flex: 1; }
.news-meta { font-size: 12px; color: #7c93b5; display: flex; align-items: center; justify-content: space-between; }

/* Tables */
.p-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.p-table th { text-align: left; padding: 10px 12px; color: var(--gold); border-bottom: 1px solid var(--border); font-weight: 700; }
.p-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.p-table tr:hover td { background: rgba(56, 189, 248, 0.06); }

/* Form Controls */
.p-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.p-field label { font-size: 12.5px; font-weight: 700; color: #cbd5e1; }
.p-input, .p-select, .p-textarea {
  width: 100%; padding: 10px 13px; border-radius: 11px;
  background: rgba(5, 10, 22, 0.85); border: 1px solid var(--border);
  color: #fff; font-size: 14px; font-family: inherit; outline: none;
}
.p-input:focus, .p-select:focus, .p-textarea:focus { border-color: var(--sky); }
.p-msg { font-size: 13px; font-weight: 700; min-height: 20px; margin: 6px 0; }
.p-msg.ok { color: #6ee7b7; }
.p-msg.err { color: #fda4af; }

/* Footer */
.p-footer {
  border-top: 1px solid var(--border); background: rgba(5, 9, 18, 0.9);
  padding: 32px 20px; color: var(--muted); font-size: 13px;
}
.p-footer-inner {
  max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 16px; align-items: center;
}
.p-footer a { color: var(--text); text-decoration: none; }
.p-footer a:hover { text-decoration: underline; }
