/* ============================================
   LAYOUT — Nav, Page Containers, Grid
   ============================================ */

/* Pages */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* Main container */
.container {
  padding: 15px;
  padding-bottom: 120px;
  position: relative;
  z-index: 1;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: none;
  min-height: 56px;
}

.page-title {
  font-size: 1.35em;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.2px;
}

/* Bottom Navigation */
#bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(24px + var(--safe-bottom));
  display: flex;
  justify-content: center;
  z-index: 1001;
  background: transparent;
  padding: 0;
}

#bottom-nav-inner {
  background: rgba(40, 40, 50, 0.65);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border-subtle);
}

#bottom-nav button {
  pointer-events: auto;
  background: none;
  border: none;
  margin: 0 8px;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
  color: var(--text-secondary);
  font-size: 1.2em;
  cursor: pointer;
}

#bottom-nav button:focus,
#bottom-nav button:active,
#bottom-nav button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
}

#bottom-nav button.active {
  color: var(--accent-purple);
}

#bottom-nav svg {
  display: block;
  width: 28px;
  height: 28px;
  transition: filter var(--transition), color var(--transition);
}

#bottom-nav button.active svg {
  filter: drop-shadow(0 0 8px rgba(160, 132, 238, 0.8)) drop-shadow(0 0 2px #d8b4fe);
  color: var(--accent-purple);
}

/* Hide nav during character creation */
body.creation-active #bottom-nav {
  display: none !important;
}

/* Generic grid */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Responsive */
@media (max-width: 600px) {
  #bottom-nav-inner {
    padding: 6px 10px;
  }
  #bottom-nav button {
    width: 48px;
    height: 48px;
  }
  #bottom-nav svg {
    width: 24px;
    height: 24px;
  }
}
