@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --text2: #8b949e;
  --accent: #4f8ef7;
  --accent2: #7c4dff;
  --success: #3fb950;
  --warning: #d29922;
  --grad: linear-gradient(135deg, #4f8ef7, #7c4dff);
}

html, body {
  height: 100%; background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif; font-size: 15px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Screens ── */
.screen { display: none; flex-direction: column; min-height: 100vh; padding: 20px 16px 32px; }
.screen.active { display: flex; }

/* ── Screen 0: Lang ── */
.lang-hero { text-align: center; margin-top: 60px; margin-bottom: 24px; }
.logo-icon { font-size: 64px; line-height: 1; margin-bottom: 12px; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.accent { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.lang-sub { color: var(--text2); text-align: center; font-size: 13px; margin-bottom: 32px; }
.lang-cards { display: flex; flex-direction: column; gap: 12px; }
.lang-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  color: var(--text); font-size: 16px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-align: left;
}
.lang-card:hover, .lang-card:active { background: var(--bg3); border-color: var(--accent); transform: translateY(-1px); }
.flag { font-size: 28px; }

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.logo-small { font-weight: 700; font-size: 15px; }
.lang-switcher { display: flex; gap: 4px; background: var(--bg2); border-radius: 8px; padding: 3px; }
.lang-btn {
  padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--text2); background: none; border: none; cursor: pointer; transition: all 0.15s;
}
.lang-btn.active { background: var(--accent); color: #fff; }
.back-btn { background: none; border: none; color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0; }

/* ── Upload Screen ── */
.upload-section { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.drop-zone {
  border: 2px dashed var(--border); border-radius: 20px; padding: 40px 24px;
  text-align: center; background: var(--bg2); transition: all 0.25s; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.drop-zone.dragover { border-color: var(--accent); background: rgba(79,142,247,0.08); transform: scale(1.01); }
.drop-icon { font-size: 48px; }
.drop-title { font-size: 18px; font-weight: 700; }
.drop-sub { color: var(--text2); font-size: 13px; }
.drop-hint { color: var(--text2); font-size: 12px; margin-top: 4px; }
.progress-wrap { margin-top: 20px; }
.progress-bar-outer { height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.progress-bar-inner { height: 100%; background: var(--grad); border-radius: 99px; width: 0%; transition: width 0.3s; }
.progress-text { text-align: center; color: var(--text2); font-size: 13px; margin-top: 8px; }
.info-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.info-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--bg2); border-radius: 10px; font-size: 13px; color: var(--text2);
}
.info-icon { font-size: 18px; }

/* ── Result Screen ── */
.result-hero { text-align: center; margin-bottom: 20px; }
.check-icon { font-size: 48px; margin-bottom: 8px; }
.result-hero h2 { font-size: 22px; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; text-align: center;
}
.stat-num { font-size: 28px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 12px; color: var(--text2); margin-top: 4px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
.product-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.product-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--bg2); border: 2px solid var(--border); border-radius: 14px;
  cursor: pointer; transition: all 0.2s;
}
.product-card input[type="radio"] { display: none; }
.product-card.selected { border-color: var(--accent); background: rgba(79,142,247,0.08); }
.product-icon { font-size: 28px; flex-shrink: 0; }
.product-info { flex: 1; }
.product-name { font-weight: 600; font-size: 15px; }
.product-desc { color: var(--text2); font-size: 12px; margin-top: 2px; }
.product-price { text-align: right; flex-shrink: 0; }
.price-eur { font-weight: 700; font-size: 16px; }
.price-stars { color: var(--text2); font-size: 12px; }

/* ── Payment Screen ── */
.payment-hero { text-align: center; margin-bottom: 24px; }
.payment-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.payment-summary { color: var(--text2); font-size: 14px; }
.pay-section { margin-bottom: 8px; }
.btn-stars {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: linear-gradient(135deg, #f4a426, #f7c948); border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700; color: #000; cursor: pointer; transition: all 0.2s; text-align: left;
}
.btn-stars:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(244,164,38,0.4); }
.stars-icon { font-size: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text2); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.voucher-title { font-weight: 600; margin-bottom: 10px; font-size: 15px; }
.voucher-row { display: flex; gap: 8px; }
.voucher-input {
  flex: 1; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: 15px; font-family: monospace; letter-spacing: 2px;
  text-transform: uppercase; outline: none;
}
.voucher-input:focus { border-color: var(--accent); }
.btn-redeem {
  padding: 14px 18px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.btn-redeem:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.voucher-msg { margin-top: 8px; font-size: 13px; min-height: 20px; }
.voucher-msg.error { color: #f85149; }
.voucher-msg.success { color: var(--success); }
.legal-note { margin-top: auto; padding-top: 20px; font-size: 11px; color: var(--text2); text-align: center; line-height: 1.5; }

/* ── Wait Screen ── */
.wait-content { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 24px; text-align: center; }
.spinner-ring {
  width: 64px; height: 64px; border: 4px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.wait-content h2 { font-size: 22px; font-weight: 700; }
.wait-steps { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 260px; }
.wait-step { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text2); }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: all 0.4s; flex-shrink: 0; }
.step-dot.done { background: var(--success); box-shadow: 0 0 8px rgba(63,185,80,0.5); }
.step-dot.active { background: var(--accent); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.wait-info { color: var(--text2); font-size: 14px; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; background: var(--grad); border: none; border-radius: 12px;
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s;
  text-decoration: none; font-family: inherit;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(79,142,247,0.4); }
.btn-full { width: 100%; }
.btn-ghost {
  padding: 14px 28px; background: none; border: 1px solid var(--success); border-radius: 12px;
  color: var(--success); font-size: 15px; font-weight: 600; cursor: pointer;
}
.hidden { display: none !important; }
