:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --primary-color: #000000;
  --accent-color: #333333;
  --header-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.1);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition-speed: 0.3s;
  --safe-area-bottom: env(safe-area-inset-bottom);
}

/* Mobile-first: Base styles are for mobile */
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

#app {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  transition: background-color var(--transition-speed), color var(--transition-speed);
  overscroll-behavior-y: none;
}

.container {
  width: 100%;
  max-width: 1000px; /* Centered content on desktop */
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* App-like Sections */
section {
  width: 100%;
  min-height: 100dvh;
  /* Dynamic viewport height for mobile */
  padding: 80px 0 calc(80px + var(--safe-area-bottom));
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fancy-glass {
  background: var(--header-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.alternate-bg {
  padding: 30px 10px;
  margin: 0 10px;
  border-radius: 20px;
  width: calc(100% - 20px);
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

p {
  line-height: 1.6;
  opacity: 0.9;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Theme Overrides */
[data-theme='dark'] {
  --bg-color: #0f0f0f;
  --text-color: #f0f0f0;
  --primary-color: #d4af37;
  --accent-color: #ffffff;
  --header-bg: rgba(15, 15, 15, 0.85);
  --glass-border: rgba(212, 175, 55, 0.2);
}

[data-theme='nat'] {
  --bg-color: #1a2f1a;
  --text-color: #d4c4a8;
  --primary-color: #4a3728;
  --accent-color: #8b5a2b;
  --header-bg: rgba(26, 47, 26, 0.9);
  --glass-border: #2e4d2e;
  --font-family: 'Courier New', monospace;
}

[data-theme='nat'] .fancy-glass {
  border: 3px solid #4a3728;
  background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
}

/* Desktop Polish */
@media (min-width: 768px) {
  section {
    padding: 100px 40px;
  }
}