/* ===========================
   Root Variables & Base
   =========================== */
:root {
  --bg: #0b0714;
  --bg2: #120a26;
  --ink: #e9e5ff;
  --muted: #bdb6e6;
  --brand: #6c3bf0;
  --brand2: #22d3ee;
  --accent: #863421;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg,var(--bg),var(--bg2));
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Helvetica Neue, Arial;
}

a { color: #cfe7ff; text-decoration: none; }
a:hover { opacity: .9; text-decoration: underline; }

/* ===========================
   Header & Navigation
   =========================== */
header {
  background: #120a26cc;
  backdrop-filter: blur(8px);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.brand img { height: 36px; width: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.site-nav a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#pwaInstallBtn {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
  color: #fff;
}

@media (max-width: 640px){
  .site-nav { flex-basis: 100%; }
  #pwaInstallBtn { margin-left: 0; }
}
@media (max-width: 380px){
  .btn { padding: 7px 12px; font-size: .95rem; }
}
@media (min-width: 1025px){
  #pwaInstallBtn { display: none !important; }
}

/* ===========================
   Buttons
   =========================== */
button,
.btn {
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: linear-gradient(135deg,var(--brand),var(--brand2));
  color: #fff;
  font-weight: 600;
  line-height: 1;
  transition: background .2s ease, transform .15s ease, opacity .2s ease;
}

button:hover,
.btn:hover {
  opacity: .95;
  transform: translateY(-1px);
}

.site-nav .btn.active {
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

@media (max-width:640px){
  form .btn,
  form button {
    width: 100%;
    margin-top: 8px;
  }
}

/* Special Install CTA */
.install-cta {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: 9px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.22);
  background: linear-gradient(135deg,var(--brand),var(--brand2));
  color: #fff;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(108,59,240,.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.install-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(108,59,240,.35);
  text-decoration: none;
  opacity: .95;
}
.install-cta:focus-visible {
  outline: 2px solid var(--brand2);
  outline-offset: 2px;
}
.install-cta[hidden]{ display:none !important; }

/* ===========================
   Forms & Inputs
   =========================== */
input[type=text],
input[type=number],
input[type=date],
input[type=email],
textarea,
select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: var(--ink);
  font: inherit;
  margin-bottom: 12px;
}

input::placeholder,
textarea::placeholder { color: var(--muted); }

select option {
  background: var(--bg2);
  color: var(--ink);
}

/* ===========================
   Main Layout
   =========================== */
main { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }

h1 { font-size: clamp(32px,6vw,56px); }
h2 { font-size: clamp(24px,4vw,36px); margin-top: 60px; }
p { max-width: 780px; }

/* Cards */
.card {
  background: #1a1130;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h3 { margin-top: 0; }

/* ===========================
   Tables
   =========================== */
.table-wrap { max-width: 100%; overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: top;
}
.force-wrap { word-break: break-word; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.payments-table { min-width: 720px; }
@media (max-width:640px){
  .table th, .table td { padding: 7px 8px; font-size: .95rem; }
  .payments-table { min-width: 600px; }
}

/* ===========================
   Blog & Posts
   =========================== */
.blog-hero { margin: 10px 0 30px; }
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 20px;
}
.post-card {
  background: #1a1130;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.post-card h3 { margin: 0 0 6px; }
.post-card .meta { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.post-card .excerpt { flex: 1; }
.post-card .thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 12px;
}
.post-meta { color: var(--muted); font-size: 14px; margin: 10px 0 24px; }
.post-body img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
}
.post-body pre {
  background: #0f0a1e;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
}
.post-body code { font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }

/* ===========================
   Dropdowns
   =========================== */
.dropdown { position: relative; display: inline-block; }
.dropbtn {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}
.dropbtn:hover {
  background: rgba(255,255,255,.2);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0px 6px 14px rgba(0,0,0,.3);
  z-index: 1000;
  padding: 4px 0;
}
.dropdown-content a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 0;
  transition: background .2s ease;
}
.dropdown-content a:hover { background: rgba(255,255,255,.15); }
.dropdown:hover .dropdown-content { display: block; }

/* ===========================
   Footer
   =========================== */
footer {
  padding: 40px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 40px;
  text-align: center;
}
footer p { max-width: 100%; }

/* ===========================
   Accents & Helpers
   =========================== */
.dyor {
  font-weight: bold;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent);
}
.social-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.social-row .btn { flex: 0 0 auto; padding: 6px 12px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  margin: 6px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  background: #6c3bf0;
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-group .btn {
  flex: 1 1 200px; /* tries to keep 200px min width */
}

@media (max-width: 640px) {
  .btn-group .btn {
    flex: 1 1 100%; /* full width on phones */
  }
}


