/* dombi.net — warm & personal. No frameworks, no external assets. */

:root {
  --bg-1: #fdf6ec;
  --bg-2: #f7e8d5;
  --card: #fffdf9;
  --ink: #4a3728;
  --ink-soft: #8a6f5c;
  --accent: #d97742;
  --accent-deep: #b85c2e;
  --ring: rgba(217, 119, 66, 0.25);
  --shadow: 0 20px 60px rgba(122, 82, 52, 0.18);
  --up: #4f9d69;
  --down: #c94f3d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #241a13;
    --bg-2: #2f2119;
    --card: #33251c;
    --ink: #f3e7db;
    --ink-soft: #c4a68f;
    --accent: #e8925e;
    --accent-deep: #f0a878;
    --ring: rgba(232, 146, 94, 0.3);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --up: #6fbe88;
    --down: #e07360;
  }
}

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

html { height: 100%; }

body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 20% -10%, var(--bg-2), transparent 60%),
              radial-gradient(1000px 700px at 110% 110%, var(--bg-2), transparent 55%),
              var(--bg-1);
  display: flex;
  flex-direction: column;
}

/* Language switching: only the active language's spans are visible. */
[data-when] { display: none; }
html[data-lang="en"] [data-when="en"] { display: inline; }
html[data-lang="hu"] [data-when="hu"] { display: inline; }
/* Before JS runs, default to English so the page never renders empty. */
html:not([data-lang]) [data-when="en"] { display: inline; }

/* Header chips: language on the LEFT, login/logout on the RIGHT. */
.chip {
  position: fixed;
  top: 1rem;
  z-index: 10;
  border: 1px solid var(--ring);
  background: var(--card);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.chip:hover { color: var(--accent-deep); border-color: var(--accent); }
.chip-left { left: 1rem; }
.chip-right { right: 1rem; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.25rem 2rem;
  gap: 2.5rem;
}

.card {
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 3rem 2.5rem;
  max-width: 34rem;
  width: 100%;
  text-align: center;
}
.card-narrow { max-width: 24rem; }

.avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 6px var(--ring);
}
.avatar-small { width: 56px; height: 56px; margin: 0; }

h1 {
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.tagline {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.bio {
  line-height: 1.65;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

.button {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  border: none;
  font: inherit;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 18px var(--ring);
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--ring); }

/* Login form */
form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }
form input {
  font: inherit;
  color: var(--ink);
  background: var(--bg-1);
  border: 1px solid var(--ring);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  text-align: center;
}
form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.error { color: var(--down); font-size: 0.95rem; margin-bottom: 0.5rem; }

/* Dashboard */
.dash { width: 100%; max-width: 62rem; }
.dash-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.dash-head h1 { font-size: 1.6rem; }
.dash-head .tagline { margin-bottom: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.tile {
  display: block;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s;
}
a.tile:hover { transform: translateY(-3px); }
.tile-muted { opacity: 0.92; }

.tile-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.tile-head h2 { font-size: 1.1rem; }
.tile-host {
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin-left: auto;
  word-break: break-all;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.dot.up { background: var(--up); box-shadow: 0 0 0 3px rgba(79, 157, 105, 0.2); }
.dot.down { background: var(--down); box-shadow: 0 0 0 3px rgba(201, 79, 61, 0.25); }

.tile-desc { font-size: 0.95rem; line-height: 1.5; margin-bottom: 0.6rem; }

.tile-info {
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.6;
}
.tile-info li::before { content: "· "; color: var(--accent); }

footer {
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding-bottom: 1.5rem;
  text-align: center;
}
