/* Main Layout & CSS Custom Variables Design Tokens */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Prompt:wght@400;500;600;700&display=swap');

:root {
  /* Brand Colors - Modern Cute / Kawaii Palette */
  --bg-primary: #F0F4F8;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.92);

  --accent-purple: #7C4DFF;
  --accent-purple-light: #EDE7F6;
  --accent-pink: #FF4081;
  --accent-pink-light: #F8BBD0;
  --accent-cyan: #00E5FF;
  --accent-green: #00E676;
  --accent-gold: #FFC107;
  --accent-amber: #FF9800;

  --text-dark: #1E293B;
  --text-muted: #64748B;
  --text-light: #FFFFFF;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(124, 77, 255, 0.15);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.2);

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --radius-full: 9999px;

  --font-main: 'Kanit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Prompt', var(--font-main);

  --nav-height: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 10% 20%, rgba(124, 77, 255, 0.1) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(255, 64, 129, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(0, 229, 255, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  user-select: none;
}

#app {
  width: 100%;
  max-width: 600px; /* Optimal mobile-first & tablet width */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #FFFFFF;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  #app {
    margin: 16px 0;
    min-height: calc(100vh - 32px);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-height) + 24px);
}

.view-container {
  flex: 1;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.25s ease-out forwards;
}

.view-container.active {
  display: flex;
}

/* Typography & Section Headers */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-dark);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.section-title {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}
