/* ═══════════════════════════════════════════════════════════
   Family Fun Apps – Shared Base Styles v1
   Jede App setzt nur noch --accent und --accent2 selbst.
   ═══════════════════════════════════════════════════════════ */

/* === Design Tokens === */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3347;
  --text: #e2e8f0;
  --text2: #8892a4;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  /* --accent und --accent2 werden pro App definiert */

  /* Typography Scale */
  --fs-xs: 0.7rem;
  --fs-sm: 0.8rem;
  --fs-base: 1rem;
  --fs-md: 1.15rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-2xl: 2.5rem;

  /* Motion / Transitions */
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
  --duration-slow: 0.4s;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
}

/* === Base Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* === Login Screen === */
#screen-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.login-hero { font-size: 4rem; margin-bottom: 1rem; }
.login-title {
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .4rem;
}
.login-sub {
  color: var(--text2);
  margin-bottom: 2.5rem;
  max-width: 360px;
  line-height: 1.6;
}

/* === Google Login Button === */
.btn-google {
  background: white;
  color: #374151;
  border: none;
  border-radius: 12px;
  padding: .9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
  transition: transform .15s;
}
.btn-google:hover { transform: translateY(-2px); }

/* === Header === */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: none;
}
#screen-app { display: none; }

/* === Common Buttons === */
.btn-sm {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  padding: .3rem .7rem;
  font-size: .78rem;
  cursor: pointer;
}

/* === Shared main container === */
.main {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::selection { background: var(--accent); color: white; }

/* === Home Link (injected by auth.js) === */
.home-link {
  text-decoration: none;
  font-size: 1.1rem;
  opacity: .6;
  transition: opacity var(--duration-fast);
  line-height: 1;
}
.home-link:hover { opacity: 1; }

/* === Shared Animations === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }
.anim-fade-in { animation: fadeIn var(--duration-normal) ease; }
.anim-slide-up { animation: slideUp var(--duration-normal) ease; }
.anim-pulse { animation: pulse 1.5s ease infinite; }

/* === Common Form Elements === */
.form-group { margin-bottom: var(--space-md); }
.form-group label { display: block; font-size: var(--fs-sm); color: var(--text2); margin-bottom: var(--space-xs); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: var(--space-sm);
  font-size: var(--fs-base);
  font-family: inherit;
}

/* === Modal Overlay (shared pattern) === */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
