/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a12;
  --bg2: #0f0f1a;
  --bg3: #14142a;
  --card: #13132080;
  --border: rgba(255,255,255,0.08);
  --purple: #7c3aed;
  --purple-light: #a855f7;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --text: #f1f0ff;
  --text-muted: #8b8aa8;
  --success: #10b981;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 32px rgba(124,58,237,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--purple-light); }
.gradient-text {
  background: linear-gradient(135deg, var(--purple-light), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ===== CARD ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(16px);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 10px; font-weight: 600;
  font-size: 0.95rem; cursor: pointer; transition: all 0.2s; border: none;
  text-decoration: none;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: #6d28d9; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(124,58,237,0.4); }
.btn-accent { background: linear-gradient(135deg, var(--gold), #f97316); color: #000; font-weight: 700; }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(245,158,11,0.4); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--purple-light); color: var(--purple-light); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.w-full { width: 100%; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,18,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); padding: 16px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 800; }
.logo-icon { font-size: 1.4rem; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav a:hover { color: var(--text); }

/* ===== HERO ===== */
.hero {
  position: relative; padding: 100px 0 80px; text-align: center; overflow: hidden;
}
.hero-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.badge {
  display: inline-block; padding: 6px 16px; border-radius: 100px;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3);
  font-size: 0.85rem; color: var(--purple-light); margin-bottom: 24px; font-weight: 500;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-stats {
  display: flex; gap: 48px; justify-content: center; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 32px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat strong { font-size: 1.8rem; font-weight: 800; color: var(--purple-light); }
.stat span { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== SECTION ===== */
.tools-section, .pricing-section { padding: 80px 0; }
.section-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--purple-light); font-weight: 600; margin-bottom: 12px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 800; margin-bottom: 48px; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.tab {
  padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 0.9rem; font-weight: 500; transition: all 0.2s; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 6px;
}
.tab:hover { border-color: var(--purple); color: var(--text); }
.tab.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.pro-badge {
  font-size: 0.65rem; background: var(--gold); color: #000;
  padding: 2px 6px; border-radius: 4px; font-weight: 700; letter-spacing: 0.05em;
}

/* ===== TOOL PANELS ===== */
.tool-panel { display: none; }
.tool-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-inputs h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text); font-size: 0.95rem; font-family: 'Inter', sans-serif;
  transition: border-color 0.2s; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--purple-light); }
.form-group select option { background: var(--bg3); }

/* ===== RESULT AREA ===== */
.tool-result { display: flex; flex-direction: column; }
.result-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; text-align: center; color: var(--text-muted); gap: 12px; padding: 40px 20px;
}
.result-placeholder span { font-size: 2.5rem; }

.result-box { display: flex; flex-direction: column; gap: 16px; }
.result-item {
  background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-sm); padding: 16px;
}
.result-item-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.result-item-value { font-size: 1.4rem; font-weight: 800; color: var(--purple-light); }
.result-item-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.result-item.gold { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.25); }
.result-item.gold .result-item-value { color: var(--gold-light); }
.result-item.green { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.25); }
.result-item.green .result-item-value { color: #34d399; }
.result-note { font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.result-dimensions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ===== PRO GATE ===== */
.pro-gate { text-align: center; }
.pro-gate-content { max-width: 500px; margin: 0 auto; padding: 20px; }
.pro-icon { font-size: 3rem; margin-bottom: 16px; }
.pro-gate h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.pro-gate p { color: var(--text-muted); margin-bottom: 24px; }
.pro-features-list { list-style: none; text-align: left; margin-bottom: 28px; display: flex; flex-direction: column; gap: 8px; }
.pro-features-list li { font-size: 0.95rem; }
.hidden { display: none; }

/* ===== DESCRIPTION RESULT ===== */
.desc-output {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; font-size: 0.9rem; line-height: 1.7;
  white-space: pre-wrap; flex: 1; overflow-y: auto;
}
.copy-btn { margin-top: 12px; }

/* ===== KEYWORD RESULT ===== */
.kw-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.kw-tag {
  padding: 6px 14px; border-radius: 100px; font-size: 0.82rem; font-weight: 500;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3); color: var(--purple-light);
  cursor: pointer; transition: all 0.2s;
}
.kw-tag:hover { background: var(--purple); color: #fff; transform: scale(1.05); }
.kw-section { margin-bottom: 20px; }
.kw-section-title { font-size: 0.78rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.08em; margin-bottom: 10px; font-weight: 600; }
.kw-bisac { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: var(--gold-light); }

/* ===== PRICING ===== */
.pricing-section { background: linear-gradient(180deg, transparent, rgba(124,58,237,0.05), transparent); }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 720px; margin: 0 auto 24px; }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { position: relative; }
.pricing-card.featured {
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 40px rgba(124,58,237,0.2);
}
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff; padding: 4px 16px; border-radius: 100px; font-size: 0.8rem; font-weight: 700;
  white-space: nowrap;
}
.plan-name { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.plan-price { font-size: 2.5rem; font-weight: 800; margin-bottom: 4px; }
.plan-price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.plan-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; font-size: 0.9rem; }
.plan-features .disabled { color: var(--text-muted); }
.pricing-note { text-align: center; font-size: 0.85rem; color: var(--text-muted); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg3); border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px; padding: 40px; max-width: 440px; width: 90%;
  position: relative; text-align: center;
  transform: scale(0.95); transition: transform 0.3s;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
}
.modal-icon { font-size: 3rem; margin-bottom: 16px; }
.modal-box h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.modal-box p { color: var(--text-muted); margin-bottom: 20px; }
.modal-features { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
.modal-features span {
  padding: 6px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); font-size: 0.85rem;
}
.modal-btn { margin-bottom: 16px; font-size: 1rem; padding: 14px 24px; }
.modal-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.license-input-row { display: flex; gap: 8px; }
.license-input-row input { flex: 1; padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text); font-family: 'Inter', sans-serif; outline: none; }
#license-msg { margin-top: 10px; font-size: 0.85rem; }
.msg-success { color: var(--success); }
.msg-error { color: #f87171; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer p { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--text); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 10px; }
