:root {
  --background: 0 0% 98%;
  --foreground: 210 20% 12%;
  --card: 0 0% 100%;
  --card-foreground: 210 20% 12%;
  --primary: 175 70% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 170 30% 95%;
  --secondary-foreground: 210 20% 12%;
  --muted: 180 10% 96%;
  --muted-foreground: 200 10% 45%;
  --accent: 38 95% 55%;
  --accent-foreground: 30 50% 15%;
  --border: 180 10% 88%;
  --shadow-soft: 0 4px 20px -2px hsl(175 70% 40% / 0.12);
  --shadow-card: 0 2px 12px -2px hsl(200 20% 20% / 0.08);
  --gradient-primary: linear-gradient(135deg, hsl(175 70% 40%) 0%, hsl(195 75% 45%) 100%);
  --gradient-secondary: linear-gradient(135deg, hsl(38 95% 55%) 0%, hsl(25 95% 55%) 100%);
  --gradient-background: linear-gradient(135deg, hsl(0 0% 98%) 0%, hsl(175 20% 96%) 50%, hsl(38 20% 97%) 100%);
}

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

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.page {
  width: min(1300px, 100%);
  min-height: calc(100vh - 64px);
  background: var(--gradient-background);
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, hsl(175 70% 40% / 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, hsl(38 95% 55% / 0.04) 0%, transparent 55%);
  pointer-events: none;
}

header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header img {
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand .logo {
  display: flex;
  align-items: center;
}

.brand .logo img {
  display: block;
  height: 56px;
}

.brand .app-version {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #555;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  text-transform: uppercase;
  line-height: 1;
}

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

.header-actions form {
  margin: 0;
  display: inline-flex;
}

.language-form {
  display: inline-flex;
}

select.language {
  appearance: none;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 8px 16px;
  background: hsl(var(--card) / 0.5);
  font-size: 14px;
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

select.language:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.login-button,
.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-card);
}

.login-button {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  border: none;
}

.login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -14px hsl(var(--primary));
}

.logout-button {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.logout-button:hover {
  background: hsl(var(--muted));
}

main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  position: relative;
  border-radius: 24px;
  padding: 32px;
  background: linear-gradient(135deg, hsl(175 60% 92%) 0%, hsl(38 95% 92%) 100%);
  border: 1px solid hsl(var(--primary) / 0.25);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.35;
}

.hero::before {
  width: 240px;
  height: 240px;
  background: hsl(175 70% 60%);
  top: -40px;
  right: -40px;
}

.hero::after {
  width: 200px;
  height: 200px;
  background: hsl(38 95% 65%);
  bottom: -40px;
  left: -40px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  display: grid;
  gap: 16px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.25);
  color: hsl(var(--primary));
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-pill::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--primary));
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.6);
    opacity: 0.45;
  }
}

.hero-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  font-weight: 700;
}

.hero-title span {
  background: linear-gradient(90deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-text {
  color: hsl(var(--muted-foreground));
  font-size: clamp(14px, 2vw, 16px);
  max-width: 520px;
}

.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.upload-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-soft);
  font-size: 18px;
}

.upload-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dropzone {
  position: relative;
  border: 2px dashed hsl(var(--primary) / 0.4);
  border-radius: 20px;
  padding: 32px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.08), hsl(var(--accent) / 0.08));
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.dropzone.is-dragover {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15), hsl(var(--accent) / 0.15));
}

.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-help {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.dropzone-file {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: hsl(var(--foreground));
}

.dropzone strong {
  display: block;
  color: hsl(var(--foreground));
  font-size: 16px;
  margin-bottom: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

select,
input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  font-size: 14px;
  background: hsl(var(--background));
}

.btn-primary {
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  box-shadow: 0 12px 20px -12px hsl(var(--primary));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px -12px hsl(var(--primary));
}

.btn-primary.is-disabled,
.btn-primary:disabled {
  background: linear-gradient(135deg, hsl(var(--muted) / 0.6), hsl(var(--muted) / 0.8));
  color: hsl(var(--muted-foreground));
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 32px;
}

.login-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.login-card p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.welcome-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(var(--card)) 100%);
  border: 1px solid hsl(var(--primary) / 0.25);
}

.welcome-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.welcome-card p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  margin: 0;
}

.welcome-badge {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 24px 28px;
  background: linear-gradient(180deg, hsl(165 60% 96%) 0%, hsl(var(--card)) 100%);
  border: 1px solid hsl(165 55% 85% / 0.6);
  box-shadow: 0 18px 35px -25px hsl(165 60% 35% / 0.35);
}

.user-dashboard-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: 0.01em;
}

.user-dashboard-title span {
  display: inline-block;
  margin-top: 4px;
  color: hsl(165 45% 40%);
}

.user-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.user-dashboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid hsl(165 55% 85% / 0.8);
  background: linear-gradient(135deg, hsl(165 55% 96%) 0%, hsl(43 95% 95%) 100%);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.6);
}

.user-dashboard-text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.user-dashboard-text p {
  margin: 6px 0 0;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.user-dashboard-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, hsl(165 55% 94%) 0%, hsl(43 95% 93%) 100%);
  display: grid;
  place-items: center;
  color: hsl(165 45% 40%);
}

.user-dashboard-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.google-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  color: hsl(var(--foreground));
  text-decoration: none;
}

.google-button:hover {
  background: hsl(var(--muted));
}

.google-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  border-radius: 50%;
  background: conic-gradient(#ea4335 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75%);
  position: relative;
}

.google-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: white;
  border-radius: 50%;
}

.legal-text {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.feed-ready-main {
  display: flex;
  justify-content: center;
  padding: 12px 0 72px;
  position: relative;
}

.feed-ready {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0;
  color: hsl(var(--card-foreground));
}

.feed-ready-shell {
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--secondary)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 28px;
  overflow: hidden;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-card);
}

.feed-ready-content {
  padding: 28px 28px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.feed-ready-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feed-ready-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.feed-ready-back svg {
  width: 16px;
  height: 16px;
}

.feed-ready-back:hover {
  color: hsl(var(--card-foreground));
}

.feed-ready-card {
  background: hsl(var(--card) / 0.96);
  border-radius: 24px;
  border: 1px solid hsl(var(--border));

  padding: 32px;
  display: grid;
  gap: 32px;
  box-shadow: 0 12px 28px -18px hsl(200 40% 20% / 0.6);
}

.feed-ready-sample {
  display: grid;
  gap: 12px;
}

.feed-ready-sample-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.feed-ready-sample-header h2 {
  margin: 0;
  font-size: 20px;
  color: hsl(var(--foreground));
}

.feed-ready-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.feed-ready-download svg {
  width: 18px;
  height: 18px;
}

.feed-ready-download:hover {
  background: hsl(var(--muted));
  transform: translateY(-1px);
}

.feed-ready-note {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.feed-ready-hint {
  margin: 0;
  color: hsl(var(--primary));
  font-size: 14px;
}

.feed-ready-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.feed-ready-stat {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  display: grid;
  gap: 6px;
}

.feed-ready-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.feed-ready-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
}

.feed-ready-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px;
}

.feed-ready-pricing-title {
  font-size: 18px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.feed-ready-pricing-total {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 700;
  color: hsl(var(--foreground));
}

.feed-ready-pricing-note {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.feed-ready-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.feed-ready-form-section {
  display: grid;
  gap: 16px;
}

.feed-ready-form-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.feed-ready-field {
  display: grid;
  gap: 6px;
}

.feed-ready-field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feed-ready-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  font-size: 14px;
  color: hsl(var(--foreground));
}

.feed-ready-field input:focus {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 0;
}

.feed-ready-pay {
  display: flex;
  justify-content: flex-end;
}

.feed-ready-pay-button {
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  color: hsl(var(--primary-foreground));
  background: var(--gradient-primary);
  box-shadow: 0 18px 28px -18px hsl(var(--primary));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feed-ready-pay-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 32px -18px hsl(var(--primary));
}

.feed-ready svg {
  display: block;
}

@media (max-width: 768px) {
  body {
    padding: 24px 12px;
  }

  .page {
    border-radius: 16px;
    padding: 24px;
  }

  header img {
    height: 48px;
  }

  .hero {
    padding: 24px;
  }

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

  .login-card {
    padding: 24px;
  }

  .feed-ready-main {
    padding: 8px 0 56px;
  }

  .feed-ready {
    padding: 0;
  }

  .feed-ready-content {
    padding: 24px;
    gap: 24px;
  }

  .feed-ready-card {
    padding: 24px;
  }

  .feed-ready-field-row {
    grid-template-columns: 1fr;
  }
}