/* CSS Variables */
:root {
  --bg-primary: #08090a;
  --bg-secondary: #101114;
  --bg-tertiary: #18191b;
  --bg-card: rgba(255,255,255,0.03);
  --accent: #5e6ad2;
  --accent-hover: #6e7ae2;
  --text-primary: #f7f8f8;
  --text-secondary: #8a8f98;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

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

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8,9,10,0.8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px; display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { font-size: 16px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 450; }
.nav-links a:hover { color: var(--text-primary); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer; border: none; transition: all 0.2s;
}
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.03); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* User Menu */
.user-menu { position: relative; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.user-dropdown {
  display: none; position: absolute; top: 40px; right: 0;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-width: 180px; padding: 4px;
  box-shadow: var(--shadow);
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; color: var(--text-secondary); font-size: 14px;
  border-radius: var(--radius); transition: all 0.15s;
}
.user-dropdown a:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Hero */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}
.hero h1 {
  font-size: 48px; font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 16px; line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 18px; color: var(--text-secondary); max-width: 520px; margin: 0 auto 40px; line-height: 1.6; }

.shorten-form {
  display: flex; gap: 8px; max-width: 560px; margin: 0 auto;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 6px;
}
.shorten-form input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-size: 15px; font-family: inherit;
  padding: 10px 14px;
}
.shorten-form input::placeholder { color: var(--text-secondary); }

/* Result area */
.shorten-result {
  max-width: 560px; margin: 16px auto 0; display: none;
}
.shorten-result.show { display: block; }
.result-box {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.result-box .short-url { color: var(--accent); font-weight: 500; }

/* Sections */
.section { padding: 80px 0; }
.section-title {
  font-size: 28px; font-weight: 600; text-align: center;
  margin-bottom: 12px; letter-spacing: -0.02em;
}
.section-sub {
  font-size: 15px; color: var(--text-secondary); text-align: center; margin-bottom: 48px;
}

/* Feature Cards */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-hover); }
.feature-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: rgba(94,106,210,0.12); display: flex; align-items: center;
  justify-content: center; font-size: 18px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Pricing */
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  display: flex; flex-direction: column;
  position: relative; transition: border-color 0.2s;
}
.pricing-card:hover { border-color: var(--border-hover); }
.pricing-card.recommended { border-color: var(--accent); }
.pricing-badge {
  position: absolute; top: -10px; right: 20px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 20px;
}
.pricing-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.pricing-price { font-size: 32px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.02em; }
.pricing-price span { font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.pricing-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.pricing-features { list-style: none; flex: 1; margin-bottom: 20px; }
.pricing-features li {
  font-size: 13px; color: var(--text-secondary); padding: 4px 0;
  display: flex; align-items: center; gap: 8px;
}
.pricing-features li::before { content: "✓"; color: var(--accent); font-size: 12px; }
.pricing-card .btn { width: 100%; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0; text-align: center;
}
.footer p { font-size: 13px; color: var(--text-secondary); }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; width: 380px;
  box-shadow: var(--shadow);
}
.modal h2 { font-size: 20px; font-weight: 600; margin-bottom: 24px; text-align: center; }
.modal .form-group { margin-bottom: 16px; }
.modal label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.modal input[type="email"],
.modal input[type="password"] {
  width: 100%; padding: 10px 14px; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.modal input:focus { border-color: var(--accent); }
.modal .btn { width: 100%; margin-top: 8px; }
.modal .switch-text { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }
.modal .close-btn {
  position: absolute; top: 12px; right: 12px; background: none;
  border: none; color: var(--text-secondary); cursor: pointer; font-size: 18px;
}
.modal-wrap { position: relative; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .shorten-form { flex-direction: column; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
  .nav-links { display: none; }
  .modal { width: 90%; max-width: 380px; }
}
