﻿:root {
  --bg-1: #041126;
  --bg-2: #0a1b34;
  --bg-3: #122645;
  --surface: #12243f;
  --surface-soft: #162c4a;
  --text: #eaf2ff;
  --text-muted: #9eb3d1;
  --primary: #1f75ff;
  --primary-soft: #2d89ff33;
  --accent: #ff8a2a;
  --danger: #ff6262;
  --success: #4ad58f;
  --border: #2a4266;
  --shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(circle at 20% 0%, #18407a 0%, transparent 38%),
    radial-gradient(circle at 85% 5%, #153157 0%, transparent 30%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 65%, var(--bg-3));
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  top: -140px;
  left: -90px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(88, 141, 255, 0.25) 0%, rgba(88, 141, 255, 0) 68%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-drift 12s ease-in-out infinite;
}

.page-hobbies {
  background:
    radial-gradient(circle at 10% 0%, rgba(25, 76, 143, 0.55) 0%, transparent 38%),
    radial-gradient(circle at 88% 10%, rgba(196, 111, 32, 0.33) 0%, transparent 30%),
    linear-gradient(180deg, #030e22 0%, #0a1e38 62%, #10274b 100%);
}

.page-services {
  background:
    radial-gradient(circle at 10% 0%, rgba(30, 95, 200, 0.55) 0%, transparent 40%),
    radial-gradient(circle at 90% 12%, rgba(28, 155, 101, 0.3) 0%, transparent 33%),
    linear-gradient(180deg, #041224 0%, #081f3b 62%, #0f2f4e 100%);
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: #0f1f39;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: 2px solid #6aa7ff;
  outline-offset: 1px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #1673ff, #2e9bff);
  color: white;
  box-shadow: 0 8px 22px #1277ff4d;
}

.btn-ghost {
  background: #1a2f52;
  color: var(--text);
  border: 1px solid #365683;
}

.btn-danger {
  background: #4b2130;
  color: #ffd8de;
  border: 1px solid #7c2f47;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-card {
  background: linear-gradient(170deg, #102543, #0d1f38);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-bottom: 6px;
}

.auth-card p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.stack-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.error-text {
  color: #ff9bab;
  min-height: 20px;
  margin-top: 12px;
}

.app-body {
  padding: 14px 14px 84px;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
  animation: fade-flow 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #0f2340, #0e2038);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.page-hobbies .top-bar {
  background: linear-gradient(180deg, #102a4b, #0d213b);
}

.page-services .top-bar {
  background: linear-gradient(180deg, #0e2b44, #0d2238);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8fb0dc;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #325277;
  background: #11284a;
  color: #bdd4f8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.persona-hero {
  display: grid;
  gap: 10px;
}

.persona-card {
  border: 1px solid rgba(109, 151, 214, 0.45);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(20, 43, 74, 0.92), rgba(11, 24, 45, 0.92));
  box-shadow: 0 14px 25px rgba(0, 0, 0, 0.28);
  animation: card-rise 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.persona-card:nth-child(2) {
  animation-delay: 90ms;
}

.persona-card:nth-child(3) {
  animation-delay: 180ms;
}

.persona-head {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(12, 20, 39, 0.42);
  border: 1px solid rgba(135, 174, 233, 0.35);
}

.icon-svg {
  width: 20px;
  height: 20px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.persona-card h2 {
  margin: 3px 0 8px;
  font-size: 1.05rem;
}

.persona-label {
  margin: 0;
  color: #9fd6ff;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.games-tone {
  border-color: rgba(90, 125, 255, 0.55);
  background: linear-gradient(160deg, rgba(26, 35, 94, 0.9), rgba(13, 24, 61, 0.9));
}

.guitar-tone {
  border-color: rgba(255, 145, 53, 0.55);
  background: linear-gradient(160deg, rgba(82, 44, 25, 0.9), rgba(43, 24, 15, 0.9));
}

.court-tone {
  border-color: rgba(255, 188, 77, 0.55);
  background: linear-gradient(160deg, rgba(79, 57, 16, 0.9), rgba(46, 33, 10, 0.9));
}

.code-tone {
  border-color: rgba(63, 150, 255, 0.55);
  background: linear-gradient(160deg, rgba(12, 48, 94, 0.92), rgba(10, 27, 54, 0.92));
}

.sales-tone {
  border-color: rgba(41, 187, 129, 0.55);
  background: linear-gradient(160deg, rgba(15, 74, 54, 0.92), rgba(10, 42, 31, 0.92));
}

.task-tone {
  border-color: rgba(255, 147, 78, 0.55);
  background: linear-gradient(160deg, rgba(82, 46, 24, 0.92), rgba(48, 28, 15, 0.92));
}

.notice-banner {
  border: 1px solid rgba(249, 176, 71, 0.45);
  background: linear-gradient(160deg, rgba(62, 42, 19, 0.9), rgba(43, 30, 14, 0.9));
  color: #f9dab0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.93rem;
}

.notice-inline {
  border: 1px dashed rgba(255, 167, 84, 0.4);
  border-radius: 12px;
  padding: 10px 12px;
  color: #f9d3a4;
  background: rgba(63, 41, 18, 0.45);
}

.is-hidden {
  display: none;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.nav-item {
  text-align: center;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  background: #132947;
  color: var(--text-muted);
  font-weight: 700;
}

.nav-item.active {
  color: var(--text);
  background: linear-gradient(145deg, #154785, #1e63b3);
  border-color: #3e74b9;
}

.tabs-row,
.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tab-btn,
.subtab-btn {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #122440;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tab-icon {
  width: 16px;
  height: 16px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-btn.active,
.subtab-btn.active {
  color: white;
  border-color: #4f88cf;
  background: linear-gradient(135deg, #165fd4, #1985ff);
}

.panel,
.subpanel {
  display: none;
}

.panel.active,
.subpanel.active {
  display: grid;
  gap: 12px;
  animation: fade-flow 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #10233f, #0e2038);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #3a6194;
  box-shadow: 0 20px 35px rgba(4, 10, 22, 0.46);
}

.form-card {
  display: grid;
  gap: 10px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.cards-grid {
  display: grid;
  gap: 10px;
}

.cards-grid.compact .entry-card {
  padding: 10px;
}

.entry-card {
  border: 1px solid #29456f;
  background: linear-gradient(180deg, #132b4c, #0f2440);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  animation: card-rise 420ms cubic-bezier(0.24, 0.88, 0.3, 1);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.entry-title {
  margin: 0;
  font-size: 1rem;
}

.entry-subtitle {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: #95b2da;
}

.entry-body {
  margin: 0;
  color: #b3cae8;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.78rem;
  border: 1px solid #335883;
  background: #163156;
  color: #bdd6fb;
}

.tag-high {
  background: #4a2633;
  border-color: #7a3a50;
  color: #ffc7d3;
}

.tag-medium {
  background: #3f3423;
  border-color: #735737;
  color: #ffe2b3;
}

.tag-low {
  background: #203f2f;
  border-color: #3a6f55;
  color: #caffe2;
}

.muted {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.placeholder-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.games-placeholder {
  background: linear-gradient(180deg, rgba(18, 39, 77, 0.95), rgba(12, 28, 57, 0.95));
  border-color: rgba(83, 121, 220, 0.48);
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.filters-row label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
}

.split-layout {
  display: grid;
  gap: 12px;
}

.images-grid {
  display: grid;
  gap: 8px;
}

.image-row {
  border: 1px solid #2f4e77;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #122744;
}

.image-row img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #3a5f8d;
}

.actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: #0b1b30;
  border-top: 1px solid #274666;
  z-index: 90;
  backdrop-filter: blur(10px);
}

.bottom-nav a {
  text-align: center;
  padding: 12px 8px;
  color: var(--text-muted);
  font-weight: 700;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.bottom-nav a.active {
  color: #ffffff;
  background: #163f72;
}

.bottom-nav-icon {
  width: 16px;
  height: 16px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  border: 1px dashed #3a5c87;
  border-radius: 14px;
  color: #93afd5;
  padding: 18px;
  text-align: center;
}

.inline-link {
  color: #9ec2ff;
  text-decoration: underline;
}

@media (min-width: 700px) {
  .persona-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 540px) {
  .top-bar {
    flex-wrap: nowrap;
  }
}

@media (min-width: 900px) {
  .app-body {
    padding: 20px 20px 24px;
  }

  .bottom-nav {
    display: none;
  }

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

  .split-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes fade-flow {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.996);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ambient-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, 16px, 0) scale(1.08);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}
