/* MY GREED — Design System */
/* European minimal. Warm. Mannered Gentleman Villain. */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500&family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Warm light European palette */
  --bg: #FAFAF7;
  --bg-warm: #F5F2ED;
  --surface: #FFFFFF;
  --surface-hover: #F0EDE8;

  /* Text hierarchy */
  --text: #1C1C1C;
  --text-dim: #4A4A4A;
  --text-muted: #7A7A7A;
  --text-ghost: #B5B0A8;

  /* Gentleman villain accent — deep emerald (greed = money = green, but classy) */
  --accent: #1B4332;
  --accent-light: #2D6A4F;
  --accent-pale: #D8F3DC;
  --accent-glow: rgba(27, 67, 50, 0.12);

  /* Danger / urgency */
  --red: #9B2226;
  --red-light: #E63946;
  --red-pale: #FDE8E8;

  /* Gold accent (luxury touches) */
  --gold: #8B7355;
  --gold-light: #B69A6E;

  /* Borders */
  --border: #E5E2DC;
  --border-dim: #EEEBE6;

  /* Typography */
  --font: 'DM Mono', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;

  --radius: 8px;
  --radius-lg: 12px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

::selection {
  background: var(--accent-pale);
  color: var(--accent);
}

/* ===== AUTH MODAL ===== */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 28, 0.6);
  backdrop-filter: blur(8px);
  z-index: 500;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}
.auth-overlay.active { display: flex; }

.auth-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  background: var(--surface);
  box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

.auth-box h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
  color: var(--accent);
}

.auth-box .auth-sub {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.auth-box input, .auth-box select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-box input:focus, .auth-box select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-box input::placeholder {
  color: var(--text-ghost);
}

.auth-box .auth-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.auth-box .auth-btn:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.auth-box .auth-btn:disabled {
  background: var(--border);
  color: var(--text-ghost);
  cursor: not-allowed;
}

.auth-box .auth-toggle {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.5rem;
}

.auth-box .auth-toggle span {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}

.auth-box .auth-toggle span:hover {
  text-decoration: underline;
}

.auth-box .auth-error {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--red);
  background: var(--red-pale);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

.auth-box .auth-error.show { display: block; }

/* ===== NAV BAR ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.nav-season {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--text-ghost);
  margin-left: 0.6rem;
  font-weight: 400;
  background: var(--accent-pale);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}

.nav-link:hover { color: var(--text); }

.nav-user {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.nav-auth-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-auth-btn:hover {
  background: var(--accent-light);
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.5rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  border-radius: var(--radius);
  z-index: 600;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== SHARE BUTTONS ===== */
.share-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn-social:hover {
  border-color: var(--text-muted);
  background: var(--bg-warm);
}

.share-btn-social.x-btn:hover { border-color: #1C1C1C; color: #1C1C1C; }
.share-btn-social.fb-btn:hover { border-color: #1877F2; color: #1877F2; }
.share-btn-social.reddit-btn:hover { border-color: #FF4500; color: #FF4500; }
.share-btn-social.whatsapp-btn:hover { border-color: #25D366; color: #25D366; }
.share-btn-social.telegram-btn:hover { border-color: #0088CC; color: #0088CC; }
.share-btn-social.linkedin-btn:hover { border-color: #0A66C2; color: #0A66C2; }
.share-btn-social.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== RECEIPT ===== */
.receipt {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.receipt-border {
  border-top: 1px dashed var(--border);
  margin: 1.2rem 0;
}

.receipt .receipt-title {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.receipt .receipt-field {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.receipt .receipt-field .val {
  color: var(--text);
  font-weight: 600;
}

.receipt .receipt-quote {
  font-style: italic;
  color: var(--text-muted);
  margin-top: 1.5rem;
  line-height: 1.8;
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

/* ===== LOADING ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.8rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; height: 50px; }
  .auth-box { padding: 1.5rem; }
}
