/* === Roter Panda – Red Panda Theme === */
:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface2: #222222;
  --border: #333333;
  --accent: #D1282B;
  --accent-hover: #C1282C;
  --accent-dim: #A72429;
  --text: #e0e0e0;
  --text-muted: #888888;
  --danger: #e53935;
  --warning: #fb8c00;
  --radius: 6px;
  --font-pixel: 'Courier New', Courier, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- Nav ---- */
nav {
  background: var(--surface);
  border-bottom: 2px solid var(--accent-dim);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-brand img {
  height: 40px;
  width: auto;
}
.nav-links { display: flex; gap: 1.2rem; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* ---- Layout ---- */
.container { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-title {
  font-family: var(--font-pixel);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 12px rgba(209,40,43,0.4);
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}
.card h2 {
  font-family: var(--font-pixel);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

/* ---- Forms ---- */
.form-group { margin-bottom: 1rem; }
label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.3rem; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
input:focus { outline: none; border-color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  text-align: center;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }

/* ---- Alerts ---- */
.alert {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
}
.alert.show { display: block; }
.alert-success { background: rgba(251,140,0,0.15); border: 1px solid var(--warning); color: #ffcc80; }
.alert-error { background: rgba(229,57,53,0.15); border: 1px solid var(--danger); color: #ef9a9a; }
.alert-info { background: rgba(33,150,243,0.12); border: 1px solid #1565c0; color: #90caf9; }

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}
.hero-logo {
  max-height: 200px;
  width: auto;
  margin-bottom: 1.2rem;
}
.hero-title {
  font-family: var(--font-pixel);
  font-size: 2.6rem;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(209,40,43,0.5);
  margin-bottom: 0.6rem;
}
.hero-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Server address box ---- */
.server-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.server-addr {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.server-addr .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.server-addr .addr {
  font-family: var(--font-pixel);
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: 0.2rem;
  word-break: break-all;
}

/* ---- Code display ---- */
.code-box {
  background: var(--surface2);
  border: 2px dashed var(--accent-dim);
  border-radius: var(--radius);
  text-align: center;
  padding: 1.5rem;
  margin: 1rem 0;
}
.code-display {
  font-family: var(--font-pixel);
  font-size: 2.4rem;
  color: var(--accent);
  letter-spacing: 6px;
  text-shadow: 0 0 16px rgba(209,40,43,0.6);
}
.code-timer { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-accent { background: rgba(209,40,43,0.2); color: var(--accent); }
.badge-red { background: rgba(229,57,53,0.2); color: #ef9a9a; }

/* ---- Downloads table ---- */
.dl-table { width: 100%; border-collapse: collapse; }
.dl-table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
.dl-table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.dl-table tr:last-child td { border-bottom: none; }
.dl-table tr:hover td { background: var(--surface2); }
.dl-table a { color: var(--accent); text-decoration: none; }
.dl-table a:hover { text-decoration: underline; }

/* ---- Map iframe ---- */
.map-frame { width: 100%; height: calc(100vh - 130px); min-height: 500px; border: 2px solid var(--border); border-radius: var(--radius); }

/* ---- Footer ---- */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ---- Utility ---- */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 600px) {
  .hero-title { font-size: 1.8rem; }
  .code-display { font-size: 1.8rem; letter-spacing: 4px; }
}

/* ======================================================
   Auth Overlay – Login / Signup / OTP / Forgot / Reset
   ====================================================== */

#auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  transition: opacity 0.45s ease;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

/* brand strip at top of card */
.auth-brand {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  padding: 1.4rem 1.5rem;
  text-align: center;
}
.auth-brand img { height: 56px; width: auto; }
.auth-brand-title {
  font-family: var(--font-pixel);
  color: #fff;
  font-size: 1.25rem;
  margin-top: 0.45rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* ---- Screen transitions ---- */
.auth-screen { display: none; padding: 1.8rem; }
.auth-screen.active {
  display: block;
  animation: authSlideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-screen.active.slide-back {
  animation: authSlideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authSlideInRight {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes authSlideInLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* screen headings */
.auth-screen h3 {
  font-family: var(--font-pixel);
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.4rem;
}

/* links inside auth card */
.auth-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.88rem;
}
.auth-link:hover { text-decoration: underline; }
.auth-footer-text {
  text-align: center;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* password toggle eye icon */
.input-wrapper { position: relative; }
.input-wrapper input { padding-right: 2.5rem; }
.pw-eye {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  transition: color 0.2s;
  user-select: none;
}
.pw-eye:hover { color: var(--text); }

/* password strength bar */
.pw-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin-top: 0.4rem;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ---- OTP digit inputs ---- */
.otp-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.8rem 0 0.4rem;
}
.otp-digit {
  width: 52px;
  height: 58px;
  text-align: center;
  font-size: 1.5rem;
  font-family: var(--font-pixel);
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.otp-digit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(209,40,43,0.18);
}
.otp-digit.filled { border-color: var(--accent-dim); }

/* OTP code preview box */
.otp-notice {
  background: rgba(209,40,43,0.1);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
}
.otp-preview {
  font-family: var(--font-pixel);
  font-size: 1.7rem;
  color: var(--accent);
  letter-spacing: 8px;
  text-shadow: 0 0 12px rgba(209,40,43,0.4);
}
.otp-notice small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

/* nav welcome text */
#nav-welcome {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Checkbox form rows (ToS / Privacy) ---- */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.form-check input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin-top: 0.22rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.form-check label {
  margin-bottom: 0;
  font-size: 0.83rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.4;
}

/* ---- Divider "oder" ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Google login button ---- */
.btn-google {
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
}
.btn-google:hover { background: var(--accent-hover); }
.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .auth-screen { padding: 1.4rem; }
  .otp-digit { width: 44px; height: 50px; font-size: 1.3rem; }
}
