:root {
  --bg: #0a0a14;
  --surface: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.06);
  --text: #e8e4f0;
  --muted: #7a7688;
  --violet: #9b8ef5;
  --gold: #e8c56d;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  -webkit-font-smoothing: antialiased;
}

.home-garden {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 400px;
}

.home-title {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.home-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  margin-top: -0.5rem;
}

.halls-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.hall-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.hall-card h2 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.hall-card p {
  font-size: 0.8rem;
  color: var(--muted);
}

.page {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  width: 100%;
}

.page.active {
  display: flex;
}

.back-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 100;
}

.back-link:hover {
  color: var(--violet);
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

#phoenix-pulsar {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--violet);
  animation: breathe 3s ease-in-out infinite;
}

#phoenix-pulsar.active {
  background: var(--gold);
}

#living-field {
  position: fixed;
  bottom: 24px;
  right: 24px;
  cursor: pointer;
  text-align: center;
}

#living-field span {
  display: block;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-top: 4px;
}

#about-link {
  position: fixed;
  bottom: 24px;
  left: 24px;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.6;
}

#about-link:hover {
  opacity: 1;
  color: var(--violet);
}

#lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 200;
}

#lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}

#lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #12121f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 170px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  border-radius: 10px;
  font-family: var(--font);
  text-align: left;
}

.lang-option:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

#profile-link {
  font-size: 17px;
  text-decoration: none;
  opacity: 0.6;
}

#profile-link:hover {
  opacity: 1;
}

#goal-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
}

.btn-primary {
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  background: var(--violet);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font);
  white-space: nowrap;
}

.btn-primary:active {
  opacity: 0.8;
}

.goal-item {
  padding: 0.8rem 1rem;
  margin-bottom: 6px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.2s;
}

.goal-item.done {
  opacity: 0.35;
  text-decoration: line-through;
}

.content-box {
  width: 100%;
  max-width: 480px;
}

@media (min-width: 768px) {
  .halls-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .hall-card {
    width: 200px;
  }
  .hall-card:hover {
    border-color: var(--violet);
    background: rgba(255,255,255,0.05);
  }
  .home-title {
    font-size: 2.2rem;
  }
}
