/* OKPAY – Modern, clean, mobile-first stylesheet */
:root {
  --primary: #6B2DFF;
  --primary-dark: #4A1AB8;
  --primary-light: #8B5CFF;
  --accent: #00D4FF;
  --gradient: linear-gradient(135deg, #6B2DFF 0%, #00D4FF 100%);
  --text: #1a1a2e;
  --text-muted: #5a5a7a;
  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --bg-card: #ffffff;
  --border: #e8eaf0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(107, 45, 255, 0.08);
  --shadow-lg: 0 10px 40px rgba(107, 45, 255, 0.12);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1120px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 9999;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}
.logo-link:hover { color: var(--text); }
.header-logo { border-radius: 10px; }

.main-nav .nav-list {
  display: flex;
  list-style: none;
  gap: .25rem;
}
.main-nav a {
  display: block;
  padding: .5rem .85rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .925rem;
  border-radius: var(--radius-sm);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: rgba(107,45,255,.06);
}

.header-cta { display: none; }
@media (min-width: 900px) {
  .header-cta { display: block; }
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .25s;
}
@media (min-width: 900px) {
  .mobile-menu-toggle { display: none; }
}

/* Mobile nav */
@media (max-width: 899px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: .3s;
    pointer-events: none;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav .nav-list {
    flex-direction: column;
    gap: .25rem;
  }
  .main-nav a { padding: .75rem 1rem; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .7rem 1.4rem;
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
  line-height: 1.3;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(107,45,255,.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(107,45,255,.4);
  color: #fff;
}
.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: rgba(107,45,255,.05);
  color: var(--primary-dark);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-sm { padding: .45rem 1rem; font-size: .875rem; }
.btn-lg { padding: .9rem 1.8rem; font-size: 1.05rem; }

/* ========== HERO ========== */
.hero {
  background: linear-gradient(160deg, #f5f0ff 0%, #eef8ff 50%, #f7f8fc 100%);
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(107,45,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 720px; position: relative; }
.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text);
}
.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 580px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ========== SECTIONS ========== */
.section {
  padding: 3.5rem 0;
}
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: -0.01em;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: .25s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(107,45,255,.12), rgba(0,212,255,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.card h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin-bottom: .4rem;
}
.card p {
  color: var(--text-muted);
  font-size: .925rem;
}

/* Content pages */
.page-hero {
  background: var(--bg-alt);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 750;
  margin-bottom: .5rem;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: var(--text); font-weight: 500; }

.content-area {
  padding: 2.5rem 0 3.5rem;
}
.content-area h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
  padding-top: .5rem;
}
.content-area h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 1.5rem 0 .5rem;
}
.content-area p { margin-bottom: 1rem; }
.content-area ul, .content-area ol {
  margin: 0 0 1.25rem 1.25rem;
}
.content-area li { margin-bottom: .4rem; }
.content-area a { text-decoration: underline; text-underline-offset: 2px; }

/* Answer box (AEO) */
.answer-box {
  background: linear-gradient(135deg, #f8f5ff, #f0f9ff);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.answer-box .question {
  font-weight: 650;
  margin-bottom: .4rem;
}
.answer-box .short-answer {
  font-size: 1.05rem;
  color: var(--text);
}

/* Warning / note */
.note {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .95rem;
}
.note.warning {
  background: #fef2f2;
  border-color: #fca5a5;
}
.note strong { display: block; margin-bottom: .25rem; }

/* FAQ */
.faq-list { margin-top: 1.5rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover { background: var(--bg-alt); }
.faq-answer {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
  display: none;
}
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question { background: var(--bg-alt); }

/* CTA box */
.cta-box {
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}
.cta-box h2, .cta-box h3 { color: #fff; margin-bottom: .5rem; }
.cta-box p { opacity: .9; margin-bottom: 1.25rem; }
.cta-box .btn {
  background: #fff;
  color: var(--primary);
}
.cta-box .btn:hover {
  background: #f0f0ff;
  color: var(--primary-dark);
}

/* Refer code highlight */
.refer-code-box {
  background: #1a1a2e;
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  margin: 1.5rem 0;
}
.refer-code-box .code {
  font-family: ui-monospace, monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  margin: .75rem 0;
  user-select: all;
}
.refer-code-box .btn { margin-top: .5rem; }

/* ========== FOOTER ========== */
.site-footer {
  background: #0f0f1a;
  color: #b0b0c8;
  padding: 3.5rem 0 2rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-logo-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: .75rem;
}
.footer-logo-link img { border-radius: 8px; }
.footer-desc { font-size: .9rem; line-height: 1.6; max-width: 280px; }
.footer-links h3 {
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-links ul { list-style: none; }
.footer-links a {
  color: #b0b0c8;
  font-size: .9rem;
  display: block;
  padding: .3rem 0;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  font-size: .85rem;
}
.footer-disclaimer {
  margin-top: .5rem;
  opacity: .7;
  max-width: 700px;
}

/* ========== BLOG ========== */
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: .25s;
}
.post-card:hover { box-shadow: var(--shadow-lg); }
.post-card-body { padding: 1.25rem; }
.post-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.post-meta { font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; }

/* ========== ADMIN ========== */
.admin-body { background: #f0f2f8; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: #1a1a2e;
  color: #ccc;
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.admin-sidebar .brand {
  padding: 0 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 1rem;
}
.admin-sidebar a {
  display: block;
  padding: .6rem 1.25rem;
  color: #b0b0c8;
  font-size: .9rem;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(107,45,255,.25);
  color: #fff;
}
.admin-main { flex: 1; padding: 1.5rem 2rem; overflow-x: auto; }
.admin-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.admin-card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.stat-box {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  text-align: center;
}
.stat-box .num { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-box .label { font-size: .8rem; color: var(--text-muted); }

.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .35rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107,45,255,.12);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th { font-weight: 600; background: var(--bg-alt); }
.alert {
  padding: .85rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .925rem;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f5f0ff, #eef8ff);
  padding: 1.5rem;
}
.login-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-box h1 {
  font-size: 1.5rem;
  margin-bottom: .25rem;
  text-align: center;
}
.login-box .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: .9rem;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 5rem 1rem;
}
.error-page h1 { font-size: 4rem; color: var(--primary); margin-bottom: .5rem; }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}
