/* Reset, variables, layout, typography - AImart-inspired */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-primary: #059669;
  --color-primary-dark: #047857;
  --color-primary-light: #10b981;
  --color-primary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-error: #dc2626;
  --color-success: #16a34a;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --min-touch: 44px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }
input, button, select, textarea { font: inherit; font-size: 16px; }
img { max-width: 100%; height: auto; }
@media (max-width: 480px) {
  body { font-size: 15px; }
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
.main { min-height: calc(100vh - 64px); padding: var(--space-xl) 0; }

.view { display: none; }
.view.active { display: block; }

/* Auth pages: center card vertically */
#view-login.active,
#view-register.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl) 0;
}

/* Login screen: background video (loop, mute) */
.login-view-with-video {
  position: relative;
  overflow: hidden;
}
.login-bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.login-view-with-video .login-card {
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}
#view-login.active .login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

h1 { font-size: 1.75rem; font-weight: 700; color: var(--color-text); margin: 0 0 var(--space-md); }
h2 { font-size: 1.375rem; font-weight: 600; margin: 0 0 var(--space-sm); }
h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 var(--space-xs); }

/* Site footer: AiBeing powered */
.site-footer {
  text-align: center;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.site-footer-powered {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.site-footer-powered:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
