/* === Robbel3D Landing Pages — Shared Design System === */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #0a0a14;
  --bg-card: #141428;
  --bg-main: #10101e;
  --bg-surface: #1a1a35;
  --border: rgba(233, 69, 96, 0.15);
  --accent: #e94560;
  --accent-dark: #c81d45;
  --accent-glow: rgba(233, 69, 96, 0.35);
  --accent-soft: #ff6b81;
  --discord: #5865F2;
  --telegram: #29b6f6;
  --text: #e8e8f0;
  --text-muted: #7a7a9a;
  --text-dim: #4a4a6a;
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  position: relative;
}

/* --- Dartboard Background --- */
body::after {
  content: '';
  position: fixed;
  width: 1100px;
  height: 1100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  animation: dartSpin 300s linear infinite;
  background-image: url("/dartboard.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
@keyframes dartSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Atmospheric Background --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(233, 69, 96, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(88, 101, 242, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(41, 182, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* --- Card --- */
.card {
  position: relative;
  z-index: 1;
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg-main) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px 32px;
  max-width: 460px;
  width: 100%;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px var(--accent-glow);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 20px 20px 0 0;
  opacity: 0.6;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Logo --- */
.logo { text-align: center; margin-bottom: 12px; }
.logo img {
  filter: drop-shadow(0 4px 20px var(--accent-glow));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo img:hover { transform: scale(1.08) rotate(3deg); }

/* --- Typography --- */
h1, h2.page-title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
  margin-bottom: 6px;
  text-shadow: 0 0 30px var(--accent-glow);
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.subtitle strong { color: var(--accent); }

/* --- Form Elements --- */
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
label span { font-weight: 400; color: var(--text-dim); text-transform: none; letter-spacing: 0; }

input[type=text],
input[type=email],
textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
input[type=text]:focus,
input[type=email]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}
input[type=text]::placeholder,
input[type=email]::placeholder,
textarea::placeholder { color: var(--text-dim); }
textarea { height: 100px; resize: vertical; }

input[type=checkbox] {
  accent-color: var(--accent);
  cursor: pointer;
}

.form-group { margin-bottom: 16px; }

/* --- Buttons --- */
.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn:active { transform: scale(.97); }
.btn:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.25);
}
.btn-primary:hover:not(:disabled) { opacity: .9; }

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.06);
}
.btn-secondary:hover:not(:disabled) { color: #fff; border-color: var(--accent); }

.btn-discord { background: var(--discord); color: #fff; margin-top: 8px; }
.btn-discord:hover:not(:disabled) { opacity: .88; }

.btn-telegram { background: var(--telegram); color: #fff; margin-top: 8px; }
.btn-telegram:hover:not(:disabled) { opacity: .88; }

/* --- Divider --- */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--text-dim); font-size: 13px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06);
}

/* --- Messages --- */
.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}
.msg.success { display: block; background: rgba(46,204,113,.12); color: #2ecc71; border: 1px solid rgba(46,204,113,.2); }
.msg.error { display: block; background: rgba(231,76,60,.12); color: #e74c3c; border: 1px solid rgba(231,76,60,.2); }

/* --- Success / Error Cards --- */
.success-card { text-align: center; }
.success-card .icon { font-size: 52px; margin-bottom: 12px; }
.success-card h2 { color: #2ecc71; margin-bottom: 10px; font-size: 20px; font-weight: 700; }
.success-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.success-card .btn { margin-top: 20px; }

.error-card { text-align: center; }
.error-card .icon { font-size: 52px; margin-bottom: 12px; }
.error-card h2 { color: var(--accent); margin-bottom: 10px; font-size: 20px; font-weight: 700; }
.error-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* --- Warning Box (DM failed etc.) --- */
.warning-box {
  background: rgba(243, 156, 18, 0.08);
  border: 1px solid rgba(243, 156, 18, 0.25);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0;
  text-align: left;
}
.warning-box h3 {
  color: #f39c12;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.warning-box p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
}
.warning-box ol {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
  padding-left: 20px;
  margin-bottom: 10px;
}
.warning-box .dm-help-link {
  display: inline-block;
  color: var(--discord);
  font-size: 13px;
  margin-bottom: 12px;
  text-decoration: none;
}
.warning-box .dm-help-link:hover { text-decoration: underline; }
.warning-box .btn {
  margin-top: 4px;
  font-size: 13px;
  padding: 8px 16px;
}
.dm-retry-result {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}
.dm-retry-result.error {
  color: #e74c3c;
}
.warning-box.dm-success {
  background: rgba(46, 204, 113, 0.08);
  border-color: rgba(46, 204, 113, 0.25);
}
.warning-box.dm-success h3 {
  color: #2ecc71;
}

/* --- Consent --- */
.consent-group {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 14px; font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.consent-group input[type=checkbox] { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; }
.consent-group a { color: var(--accent); text-decoration: underline; }
.consent-group a:hover { color: var(--accent-soft); }
.required { color: var(--accent); }

.optional-consents {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.optional-consents .consent-group { margin-bottom: 10px; }
.optional-consents .consent-group:last-child { margin-bottom: 0; }
.optional-consents .consent-group label { color: #bbb; font-size: 13px; cursor: pointer; }
.optional-consents .desc { color: var(--text-dim); font-size: 12px; margin-top: 2px; }

/* --- Hints / Links --- */
.login-hint, .register-hint {
  text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted);
}
.login-hint a, .register-hint a { color: var(--accent); text-decoration: none; font-weight: 600; }
.login-hint a:hover, .register-hint a:hover { color: var(--accent-soft); }

/* --- Upload Area (claim) --- */
.upload-area {
  border: 2px dashed rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-top: 5px;
}
.upload-area:hover, .upload-area:active {
  border-color: var(--accent);
  background: rgba(233,69,96,0.05);
}
.upload-icon { font-size: 32px; margin-bottom: 6px; }
.upload-text { color: var(--text-muted); font-size: 14px; }
.upload-hint { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.cam-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 12px 18px;
  background: var(--bg-surface); color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 10px;
  font-size: 14px; cursor: pointer; font-family: var(--font);
  transition: border-color .2s, color .2s; min-height: 48px;
}
.cam-btn:hover, .cam-btn:active { border-color: var(--accent); color: #fff; }

.submit-btn {
  margin-top: 28px; width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; border: none; border-radius: 10px;
  font-size: 17px; font-weight: 700; cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 4px 16px rgba(233, 69, 96, 0.25);
  transition: opacity .2s; min-height: 52px;
}
.submit-btn:hover { opacity: .9; }
.submit-btn:disabled { background: #333; cursor: not-allowed; opacity: 1; box-shadow: none; }

#preview-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.prev-item { position: relative; }
.prev-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); display: block; }
.prev-item button { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 15px; cursor: pointer; padding: 0; line-height: 28px; text-align: center; }

.note { font-size: 12px; color: var(--text-dim); margin-top: 14px; text-align: center; line-height: 1.5; }
.loading { text-align: center; color: var(--text-muted); font-size: 14px; padding: 40px 0; }

/* --- Spinner --- */
.spinner-wrap { text-align: center; padding: 40px 0; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Footer --- */
.page-footer, .impressum {
  text-align: center; margin-top: 20px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.page-footer a, .impressum a {
  color: var(--text-dim); font-size: 12px;
  text-decoration: none; padding: 8px; transition: color .2s;
}
.page-footer a:hover, .impressum a:hover { color: var(--text-muted); }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
  animation: fadeIn .2s ease;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px; max-width: 380px; width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px var(--accent-glow);
}
.modal-box h3 { color: var(--accent); font-size: 18px; margin-bottom: 10px; font-weight: 700; }
.modal-box p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.modal-btns { display: flex; gap: 10px; }
.modal-btns .btn { flex: 1; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Responsive --- */
@media (max-width: 480px) {
  body { padding: 12px; }
  .card { padding: 32px 22px 24px; border-radius: 16px; }
  .logo img { width: 72px; height: 72px; }
  h1, h2.page-title { font-size: 20px; }
  .subtitle { font-size: 13px; margin-bottom: 20px; }
  .prev-item img { width: 72px; height: 72px; }
}

@media (max-height: 500px) {
  body { align-items: flex-start; padding-top: 8px; }
  .card { padding: 20px 16px; }
}

@supports (-webkit-touch-callout: none) {
  input[type=text], input[type=email] { font-size: 16px; }
}
