/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: transparent;
  transition: background var(--transition-fast);
}

.icon-btn:hover {
  background: var(--color-primary-light);
}

/* Navigation */
.nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: stretch;
  z-index: 99;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  padding: 0 var(--space-sm);
}

.nav-item.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.nav-item:hover {
  color: var(--color-text);
}

/* Main content */
.main {
  padding-top: calc(var(--header-height) + var(--nav-height) + var(--space-md));
  padding-bottom: calc(var(--footer-height) + var(--space-md));
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
}

.main > * {
  padding: 0 var(--space-md);
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 100;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* View container */
.view {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  margin-bottom: var(--space-lg);
}

.view-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.view-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  margin-top: var(--space-xs);
}
