:root {
  --bg: #0b1221;
  --panel: #111a2e;
  --accent: #5ee1ff;
  --muted: #8d98b4;
  --text: #e8ecf5;
  --stroke: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(94, 225, 255, 0.12), transparent 26%),
    radial-gradient(circle at 80% -4%, rgba(255, 255, 255, 0.06), transparent 30%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--stroke);
  border-radius: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #8eeaff);
  box-shadow: 0 0 0 6px rgba(94, 225, 255, 0.12);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-sub {
  color: var(--muted);
  font-size: 13px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-user {
  color: var(--muted);
  font-size: 14px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.nav-link.ghost {
  background: transparent;
  color: var(--muted);
}

/* Layout */
.page-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: start;
}

.card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(94, 225, 255, 0.14);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(32px, 4vw, 46px);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
}

.card-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: var(--muted);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.feature-list .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #8eeaff);
  box-shadow: 0 0 0 6px rgba(94, 225, 255, 0.08);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.stat {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.02);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #5ee1ff, #7bd8ff);
  color: #0b1221;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(94, 225, 255, 0.35);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(94, 225, 255, 0.4);
}

.cta.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--stroke);
}

.cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.muted {
  color: var(--muted);
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--muted);
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 225, 255, 0.15);
}

/* Messages */
.error-msg {
  color: #ff8787;
  padding: 12px 14px;
  background: rgba(255, 107, 107, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.success-msg {
  color: #9ae6b4;
  padding: 12px 14px;
  background: rgba(105, 219, 124, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(105, 219, 124, 0.25);
}

/* Upload */
.upload-box {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.upload-box.highlight {
  border-color: var(--accent);
  background: rgba(94, 225, 255, 0.06);
}

.upload-box input[type="file"] {
  margin-top: 12px;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
  padding: 0 16px;
  font-size: 14px;
}

/* Google button */
.google-btn {
  width: 100%;
  justify-content: center;
  background: #fff;
  color: #111a2e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.google-btn:hover {
  background: #f5f5f5;
}

/* Image preview */
.preview-container {
  margin: 10px 0 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#preview-image,
#source-preview-image {
  display: block;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: 400px;
  margin: 0 auto;
}

/* Progress bar */
.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7bd8ff);
  width: 0%;
  transition: width 0.3s ease;
}

/* Helpers */
.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.muted-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--stroke);
  padding: 14px 16px;
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 26px;
  }
}

/* Hamburger menu button - hidden on desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 600px) {
  .button-row {
    flex-direction: column;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-right {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: #111a2e;
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
  }

  .nav-right.open {
    display: flex;
  }

  .nav-right .nav-user {
    font-size: 13px;
    color: var(--muted);
    padding: 8px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--stroke);
  }

  .nav-right .nav-link {
    font-size: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.15s;
  }

  .nav-right .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav {
    position: relative;
  }
}
