/* ═══════════════════════════════════════════════════════════════════
   SEO Rank UP - Website & Dashboard CSS
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  --green: #2d8c3c;
  --green-dark: #1e6b2b;
  --green-light: #e8f5e9;
  --green-bg: #f0fdf4;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #1a1f2b;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-alt: #f8fafb;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #059669;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Cascadia Code", "Fira Code", Consolas, monospace;
}

html { scroll-behavior: smooth; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 640px; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; font-size: 14px; font-weight: 600;
  font-family: var(--font); border: 2px solid transparent;
  border-radius: var(--radius); cursor: pointer; transition: all 0.15s;
  text-decoration: none !important; white-space: nowrap;
}
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--text-muted); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }

.btn-small-link { font-size: 13px; color: var(--primary); background: none; border: none; cursor: pointer; padding: 4px 8px; }
.btn-small-link:hover { text-decoration: underline; }

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

.header-inner {
  display: flex; align-items: center; height: 60px; gap: 24px;
}

.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 800; color: var(--green);
  text-decoration: none !important;
}

.logo-icon { font-size: 24px; }

.main-nav { display: flex; gap: 24px; flex: 1; }
.main-nav a {
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  text-decoration: none !important; transition: color 0.15s;
}
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-btn {
  font-size: 13px; font-weight: 600; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); text-decoration: none !important;
  transition: all 0.15s;
}
.lang-btn:hover { background: var(--bg-alt); color: var(--text); }

.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ═══ HERO ═══ */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(170deg, var(--green-bg) 0%, #fff 60%);
  text-align: center;
}

.hero h1 {
  font-size: 42px; font-weight: 800; line-height: 1.15;
  margin-bottom: 16px; letter-spacing: -0.5px;
}

.hero-sub {
  font-size: 18px; color: var(--text-muted);
  max-width: 560px; margin: 0 auto 32px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }

/* ═══ Mock Window ═══ */
.hero-visual { display: flex; justify-content: center; }

.mock-window {
  width: 700px; max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden; border: 1px solid var(--border);
}

.mock-titlebar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: #f4f5f7; border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.mock-title { margin-left: 12px; font-size: 12px; color: var(--text-muted); font-weight: 600; }

.mock-body { display: flex; background: #fff; min-height: 220px; }

.mock-sidebar {
  width: 100px; background: #f8f9fb; border-right: 1px solid var(--border-light);
  padding: 12px 8px; display: flex; flex-direction: column; gap: 6px;
}

.mock-menu-item {
  height: 10px; border-radius: 3px; background: #e5e7eb;
}
.mock-menu-item.active { background: var(--green); opacity: 0.7; }

.mock-content { flex: 1; padding: 16px; }

.mock-stat-row { display: flex; gap: 10px; margin-bottom: 16px; }
.mock-stat {
  flex: 1; text-align: center; padding: 10px 6px;
  background: #f8f9fb; border-radius: var(--radius); border: 1px solid var(--border-light);
}
.mock-num { display: block; font-size: 16px; font-weight: 800; color: var(--text); }
.mock-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.mock-stat.warn .mock-num { color: var(--warning); }

.mock-table { display: flex; flex-direction: column; gap: 4px; }
.mock-row { display: flex; gap: 6px; }
.mock-row span {
  flex: 1; height: 8px; border-radius: 2px; background: #e5e7eb;
}
.mock-row.header span { background: #d1d5db; height: 10px; }

/* ═══ FEATURES ═══ */
.features { padding: 80px 0; background: var(--bg); }

.section-title {
  text-align: center; font-size: 30px; font-weight: 800;
  margin-bottom: 48px; letter-spacing: -0.3px;
}

.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); }

.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; font-weight: 700; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ═══ AI FEATURES ═══ */
.ai-features {
  padding: 80px 0;
  background: var(--bg);
}

.section-desc {
  max-width: 680px;
  margin: 0 auto 36px;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ai-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s;
}

.ai-card:hover {
  box-shadow: var(--shadow-lg);
}

.ai-card-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
}

.ai-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.ai-card p strong {
  color: var(--text);
}

/* ═══ AI CONTENT ENGINE ═══ */
.ai-content {
  padding: 80px 0;
  background: var(--bg-alt);
}

.ai-content-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.ai-content-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  transition: box-shadow 0.2s, transform 0.2s;
}

.ai-content-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.ai-content-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.ai-content-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.ai-content-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .ai-content-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .ai-content-grid { grid-template-columns: 1fr; }
}

/* ═══ BUILT BY SEO EXPERTS ═══ */
.experts {
  padding: 80px 0;
  background: var(--bg-alt);
}

.experts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 24px;
}

.experts-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  padding: 8px 0;
}

.experts-check {
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ═══ HOW TO USE ═══ */
.howto {
  padding: 80px 0;
  background: var(--bg-alt);
}

.howto-grid {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.howto-text {
  flex: 1;
  min-width: 0;
}

.howto-video {
  flex: 1;
  min-width: 0;
}

.howto-step {
  margin-bottom: 24px;
}

.howto-step h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--green);
}

.howto-step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.howto-video-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ═══ SAMPLE REPORT ═══ */
.sample-report {
  padding: 80px 0;
  background: var(--bg);
}

.report-grid {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.report-left {
  flex: 1;
  min-width: 0;
}

.report-right {
  flex: 1;
  min-width: 0;
}

.report-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.report-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.report-features {
  list-style: none;
  margin: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.report-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-features li:last-child {
  border-bottom: none;
}

.report-check {
  color: var(--green);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ═══ PRICING ═══ */
.pricing { padding: 80px 0; background: var(--bg-alt); }

.pricing-desc {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
}

.pricing-desc strong {
  color: var(--text);
}

.pricing-desc a {
  color: var(--green);
  text-decoration: underline;
}

.pricing-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; max-width: 700px; margin: 0 auto;
}

.pricing-card {
  background: var(--bg); padding: 32px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); position: relative;
  transition: box-shadow 0.2s;
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }

.pricing-card.featured {
  border-color: var(--green); box-shadow: 0 0 0 1px var(--green);
}

.pricing-badge {
  position: absolute; top: -12px; right: 24px;
  background: var(--green); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 14px; border-radius: 12px; text-transform: uppercase;
}

.pricing-header { margin-bottom: 20px; }
.pricing-header h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pricing-price { font-size: 32px; font-weight: 800; color: var(--green); }

.pricing-features {
  list-style: none; margin-bottom: 24px;
}
.pricing-features li {
  padding: 6px 0; font-size: 14px; color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.pricing-update-note {
  max-width: 700px; margin: 20px auto 0; text-align: center;
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}

/* ═══ FAQ ═══ */
.faq { padding: 80px 0; background: var(--bg); }

.faq-list { max-width: 700px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 8px; overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; list-style: none; display: flex; align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--text-muted); }
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary { border-bottom: 1px solid var(--border-light); }

.faq-item p {
  padding: 16px 20px; font-size: 14px; color: var(--text-muted); line-height: 1.7;
}

/* ═══ CONTACT / PAGE SECTION ═══ */
.page-section { padding: 80px 0; }

.contact-form { max-width: 100%; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-family: var(--font);
  outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
}

.form-message { margin-top: 12px; font-size: 14px; min-height: 20px; }
.form-message.success { color: var(--success); }
.form-message.error { color: var(--danger); }

/* ═══ FOOTER ═══ */
.site-footer {
  padding: 24px 0; border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted);
}
.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-right { display: flex; gap: 16px; }
.footer-right a { color: var(--text-muted); }
.footer-right a:hover { color: var(--text); }

/* ═══ ADMIN ═══ */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 220px; background: #1a1f2b; color: #fff; padding: 20px 0;
  position: fixed; top: 0; left: 0; bottom: 0;
}
.admin-sidebar .logo { padding: 0 20px; margin-bottom: 24px; color: #fff; }

.admin-nav a {
  display: block; padding: 10px 20px; font-size: 14px;
  color: rgba(255,255,255,0.6); text-decoration: none !important; transition: all 0.15s;
}
.admin-nav a:hover, .admin-nav a.active {
  color: #fff; background: rgba(255,255,255,0.08);
}

.admin-main {
  flex: 1; margin-left: 220px; padding: 24px 32px;
  background: var(--bg-alt);
}

.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 22px; font-weight: 700; }

/* Admin Stats */
.admin-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 24px;
}
.admin-stat-card {
  background: var(--bg); padding: 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.admin-stat-card .label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.admin-stat-card .value { font-size: 28px; font-weight: 800; margin-top: 4px; }

/* Admin Table */
.admin-table-wrap {
  background: var(--bg); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
}
.admin-table-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.admin-table-header h2 { font-size: 16px; font-weight: 700; }

.admin-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table th {
  padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; color: var(--text-muted);
  background: #fafbfc; border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 10px 16px; border-bottom: 1px solid var(--border-light);
}
.admin-table tr:hover td { background: #f8f9fb; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 700;
}
.badge-active { background: #ecfdf5; color: #059669; }
.badge-expired { background: #fef2f2; color: #dc2626; }
.badge-revoked { background: #f3f4f6; color: #6b7280; }
.badge-yearly { background: #eff6ff; color: #2563eb; }
.badge-lifetime { background: #faf5ff; color: #7c3aed; }

/* Admin Form */
.admin-form { max-width: 600px; }

/* Login */
.login-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg-alt);
}
.login-box {
  background: var(--bg); padding: 40px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); width: 380px; box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-box h1 { font-size: 20px; margin-bottom: 24px; }
.login-box .form-group { text-align: left; }
.login-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; }

/* Pagination */
.pagination { display: flex; gap: 4px; margin-top: 16px; justify-content: center; padding: 16px; }
.pagination a, .pagination span {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text-muted); text-decoration: none !important;
}
.pagination .active { background: var(--green); color: #fff; border-color: var(--green); }

/* Plan notice on contact page */
.plan-notice {
  background: var(--green-light); border: 1px solid var(--green);
  color: var(--green-dark); padding: 14px 18px; border-radius: var(--radius);
  font-size: 14px; margin-bottom: 20px; text-align: center; font-weight: 500;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .main-nav, .header-actions { display: none; }
  .mobile-toggle { display: block; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .features-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .experts-grid { grid-template-columns: 1fr; }
  .howto-grid { flex-direction: column; }
  .report-grid { flex-direction: column; }
  .pricing-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
