/* =====================================================
   ASD - Shared Styles v1.0
   Used by all pages: index, coder, pricing, marketplace,
   about, login, dashboard
   ===================================================== */

/* ========== VARIABLES ========== */
:root {
  --cyan: #00d2ff;
  --blue: #0066ff;
  --purple: #7b2ffc;
  --dark: #06060f;
  --dark-2: #0c0c1a;
  --dark-3: #121228;
  --dark-4: #1a1a35;
  --surface: #0e0e20;
  --surface-2: #161630;
  --text: #e0e4f0;
  --text-muted: #7a7ea0;
  --text-dim: #4a4e6a;
  --success: #00e68a;
  --warning: #ffaa00;
  --danger: #ff4466;
  --gradient: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 50%, var(--purple) 100%);
  --gradient-text: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  --radius: 16px;
  --radius-sm: 10px;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--dark);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
code, .mono { font-family: 'JetBrains Mono', monospace; }

/* ========== LAYOUT ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; position: relative; }
.section--alt { background: var(--dark-2); }
.section--dark { background: var(--dark-3); }

/* ========== GRADIENT TEXT ========== */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== SECTION LABEL ========== */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 16px;
}
.section-label::before {
  content: ''; width: 24px; height: 2px;
  background: var(--gradient); border-radius: 2px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; font-family: 'Outfit', sans-serif; font-size: 0.9rem;
  font-weight: 600; letter-spacing: 0.03em; border: none; border-radius: 50px;
  cursor: pointer; transition: all 0.3s; white-space: nowrap;
}
.btn--primary {
  background: var(--gradient); color: white;
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.5);
}
.btn--outline {
  background: transparent; color: var(--cyan);
  border: 2px solid rgba(0, 210, 255, 0.4);
}
.btn--outline:hover {
  background: rgba(0, 210, 255, 0.1);
  border-color: var(--cyan);
}
.btn--ghost {
  background: rgba(255,255,255,0.05); color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); }
.btn--danger { background: rgba(255,68,102,0.15); color: var(--danger); border: 1px solid rgba(255,68,102,0.3); }
.btn--sm { padding: 10px 22px; font-size: 0.8rem; }
.btn--lg { padding: 18px 40px; font-size: 1rem; }
.btn--block { width: 100%; text-align: center; }

/* ========== HEADER ========== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0; transition: all 0.3s; background: transparent;
}
.header.scrolled {
  background: rgba(6, 6, 15, 0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05); padding: 12px 0;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.header__logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.4rem;
}
.header__logo svg { width: 38px; height: 38px; }
.header__logo-text { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav__link {
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
  transition: color 0.3s; position: relative;
}
.nav__link:hover, .nav__link.active { color: var(--text); }
.nav__link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--gradient);
  transition: width 0.3s; border-radius: 2px;
}
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

/* User Menu */
.user-menu { position: relative; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gradient); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; cursor: pointer;
  transition: transform 0.2s; border: 2px solid transparent;
}
.user-avatar:hover { transform: scale(1.08); border-color: var(--cyan); }
.user-dropdown {
  position: absolute; top: 48px; right: 0;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  padding: 8px 0; min-width: 200px;
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s;
}
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown__item {
  display: block; padding: 12px 20px; font-size: 0.85rem;
  color: var(--text-muted); transition: all 0.2s;
}
.user-dropdown__item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.user-dropdown__divider { height: 1px; background: rgba(255,255,255,0.06); margin: 6px 0; }

.login-btn {
  font-size: 0.85rem; font-weight: 600; padding: 10px 24px;
  border: 2px solid rgba(0,210,255,0.4); border-radius: 50px;
  color: var(--cyan); transition: all 0.3s; font-family: 'Outfit', sans-serif;
}
.login-btn:hover { background: rgba(0,210,255,0.1); border-color: var(--cyan); }

/* Mobile menu */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 10px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: all 0.3s; }
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 1500; opacity: 0; visibility: hidden; transition: all 0.3s;
  backdrop-filter: blur(4px);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }
.mobile-nav {
  position: fixed; top: 0; right: -100%; width: 100%; max-width: 360px;
  height: 100vh; background: var(--dark-2); z-index: 2000;
  padding: 80px 32px; transition: right 0.4s;
  border-left: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav.active { right: 0; }
.mobile-nav__close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: var(--text-muted);
  font-size: 2rem; cursor: pointer;
}
.mobile-nav__links { display: flex; flex-direction: column; gap: 24px; list-style: none; }
.mobile-nav__link { font-size: 1.1rem; font-weight: 500; color: var(--text-muted); transition: color 0.3s; }
.mobile-nav__link:hover { color: var(--text); }

/* ========== CARDS (shared) ========== */
.card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius); padding: 36px 28px; transition: all 0.4s;
  position: relative; overflow: hidden;
}
.card:hover {
  transform: translateY(-6px); border-color: rgba(0,210,255,0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gradient); opacity: 0; transition: opacity 0.4s;
}
.card:hover::before { opacity: 1; }

/* ========== PAGE HERO (sub-pages) ========== */
.page-hero {
  padding: 160px 0 80px; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}
.page-hero__glow-1 {
  position: absolute; top: -30%; right: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(123,47,252,0.1), transparent 70%);
  border-radius: 50%; filter: blur(50px);
}
.page-hero__glow-2 {
  position: absolute; bottom: -20%; left: -5%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,210,255,0.07), transparent 70%);
  border-radius: 50%; filter: blur(40px);
}
.page-hero h1 { margin-bottom: 16px; position: relative; }
.page-hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto; position: relative; }

/* ========== FOOTER ========== */
.footer {
  background: var(--dark); padding: 60px 0 30px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer__logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.2rem; margin-bottom: 16px;
}
.footer__logo svg { width: 32px; height: 32px; }
.footer__desc { font-size: 0.85rem; color: var(--text-dim); max-width: 280px; line-height: 1.7; }
.footer__heading { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__link { font-size: 0.85rem; color: var(--text-dim); transition: color 0.3s; }
.footer__link:hover { color: var(--cyan); }
.footer__bottom {
  text-align: center; margin-top: 50px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 0.8rem; color: var(--text-dim);
}

/* ========== FORM ELEMENTS ========== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 8px; }
.form-input, .form-textarea, .form-select, select.form-input, textarea.form-input {
  width: 100%; padding: 14px 18px;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'Outfit', sans-serif; font-size: 0.9rem;
  transition: border-color 0.3s;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
select.form-input, .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7ea0' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px; cursor: pointer;
}
select.form-input option, .form-select option {
  background: var(--dark); color: var(--text); padding: 8px;
}
textarea.form-input, .form-textarea {
  resize: vertical; min-height: 80px; line-height: 1.6;
}
.form-input:focus, .form-textarea:focus, .form-select:focus, select.form-input:focus, textarea.form-input:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,210,255,0.08);
}
.form-input::placeholder, textarea.form-input::placeholder { color: var(--text-dim); }
.form-input:disabled, select.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
.form-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--text-dim); font-size: 0.85rem; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer__inner { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}
