:root {
  --bg: #f6f9fc;
  --surface: #ffffff;
  --text: #0a2540;
  --text-muted: #425466;
  --border: #e3e8ee;
  --accent: #635bff;
  --accent-hover: #4f46e5;
  --accent-dark: #0a2540;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --shadow: 0 4px 24px rgba(10, 37, 64, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7a73ff);
  display: grid;
  place-items: center;
  color: white;
  font-size: 0.85rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

main {
  padding: 2.5rem 0 4rem;
}

.hero {
  background: linear-gradient(135deg, #0a2540 0%, #1a3a5c 100%);
  color: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.section {
  margin-bottom: 2.5rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  flex: 1;
}

.price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-usd {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-eur {
  background: #dbeafe;
  color: #1e40af;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-paid {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-cancelled {
  background: #f3f4f6;
  color: #4b5563;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
}

.btn-secondary {
  background: var(--accent-dark);
  color: white;
}

.btn-secondary:hover {
  background: #163a5f;
  color: white;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--accent-hover);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.page-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.meta {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.notice {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.notice-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.notice-cancelled {
  background: var(--error-bg);
  color: var(--error-text);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: var(--text-muted);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 2px solid var(--border);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

#payment-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

#payment-element {
  margin-bottom: 1rem;
}

#payment-message {
  color: var(--error-text);
  margin-top: 0.75rem;
}

.api-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.api-list table {
  width: 100%;
  border-collapse: collapse;
}

.api-list th,
.api-list td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.api-list tr:last-child td {
  border-bottom: none;
}

.api-list code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.order-form {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
}

.order-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.order-form input[type="number"] {
  width: 5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.cart-link {
  position: relative;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

.cart-merge {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.cart-merge h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.cart-merge select {
  width: 100%;
  max-width: 420px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.qty-input {
  width: 4rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

@media (max-width: 640px) {
  .hero {
    padding: 1.5rem;
  }

  .page-card {
    padding: 1.25rem;
  }

  .btn-group .btn {
    width: 100%;
  }
}
