:root {
  --ink: #182026;
  --muted: rgba(24, 32, 38, 0.68);
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.22);
  --glass-strong: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.44);
  --shadow: 0 28px 90px rgba(38, 34, 97, 0.26);
  --arrow-lime: #d7ff22;
  --arrow-gray: #53565a;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #8f88ff;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.public-page,
.admin-page {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(96, 119, 248, 0.95) 0%, rgba(177, 138, 246, 0.95) 45%, rgba(250, 174, 229, 0.95) 100%),
    #887cff;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.mesh {
  position: absolute;
  width: 48vmax;
  height: 48vmax;
  filter: blur(3px);
  opacity: 0.9;
  transform: translate3d(0, 0, 0);
  animation: mesh-drift 18s ease-in-out infinite alternate;
}

.mesh-a {
  left: -15vmax;
  bottom: -18vmax;
  background: radial-gradient(circle at 45% 45%, rgba(255, 255, 255, 0.96), rgba(224, 255, 244, 0.78) 38%, rgba(255, 255, 255, 0) 66%);
}

.mesh-b {
  top: -18vmax;
  left: 23vw;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96), rgba(161, 247, 242, 0.74) 36%, rgba(255, 255, 255, 0) 64%);
  animation-delay: -7s;
}

.mesh-c {
  right: -17vmax;
  top: 23vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92), rgba(255, 196, 218, 0.72) 38%, rgba(255, 255, 255, 0) 65%);
  animation-delay: -11s;
}

.shard {
  position: absolute;
  width: 46vw;
  height: 5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(215, 255, 34, 0), rgba(215, 255, 34, 0.35), rgba(255, 255, 255, 0));
  filter: blur(18px);
  opacity: 0.56;
  animation: shard-slide 16s ease-in-out infinite alternate;
}

.shard-a {
  top: 17vh;
  right: -10vw;
  transform: rotate(-16deg);
}

.shard-b {
  bottom: 13vh;
  left: -8vw;
  transform: rotate(19deg);
  animation-delay: -8s;
}

.glass {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(26px) saturate(155%);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
}

.public-shell {
  width: min(1120px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(320px, 1.16fr);
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
}

.hero-glass,
.links-glass {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
}

.hero-glass {
  min-height: 570px;
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: rise-in 700ms ease both;
}

.hero-glass::before,
.links-glass::before,
.admin-panel::before,
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.28) 48%, transparent 72%);
  transform: translateX(-110%);
  animation: sheen 6s ease-in-out infinite;
  pointer-events: none;
}

.brand-mark {
  width: min(280px, 78%);
  aspect-ratio: 1 / 1;
  align-self: center;
  margin: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 22px 60px rgba(47, 50, 93, 0.18);
  animation: float-logo 5.5s ease-in-out infinite;
}

.brand-mark img,
.login-card img {
  display: block;
  width: 88%;
  height: auto;
}

.handle,
.links-header {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-glass h1 {
  margin: 12px 0 12px;
  color: #fff;
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
}

.tagline {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  font-weight: 750;
}

.description {
  max-width: 34rem;
  margin: 14px 0 28px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.primary-action,
.solid-button,
.ghost-button,
.text-button,
.dashboard-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
}

.primary-action,
.solid-button {
  color: #22272a;
  background: linear-gradient(135deg, #ffffff, var(--arrow-lime));
  box-shadow: 0 18px 40px rgba(111, 137, 2, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.primary-action {
  width: fit-content;
  padding: 0 20px;
}

.primary-action svg,
.link-arrow svg,
.dashboard-actions svg {
  width: 18px;
  height: 18px;
}

.links-glass {
  min-height: 570px;
  padding: clamp(18px, 4vw, 36px);
  animation: rise-in 850ms ease 120ms both;
}

.links-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.link-card,
.bubble-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 22px;
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(42, 43, 90, 0.14)),
    rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: card-in 600ms ease both;
  animation-delay: var(--delay);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.link-card,
.bubble-summary {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.bubble-card {
  grid-column: 1 / -1;
}

.bubble-summary {
  position: relative;
  z-index: 1;
  cursor: pointer;
  list-style: none;
}

.bubble-summary::-webkit-details-marker {
  display: none;
}

.link-card::after,
.bubble-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% 20%;
  height: 90%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent), transparent 36%), transparent 68%);
  opacity: 0.95;
  transition: transform 180ms ease;
}

.link-card:hover,
.link-card:focus-visible,
.bubble-card:hover,
.bubble-card:focus-within {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.68);
  outline: none;
}

.link-card:hover::after,
.link-card:focus-visible::after,
.bubble-card:hover::after,
.bubble-card:focus-within::after {
  transform: translateY(-10px) scale(1.08);
}

.bubble-card[open] .link-arrow {
  transform: rotate(90deg);
}

.bubble-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.bubble-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(42, 43, 90, 0.12)),
    rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44), 0 14px 32px rgba(48, 41, 104, 0.16);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.bubble-tile::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% 20%;
  height: 80%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent), transparent 40%), transparent 68%);
  opacity: 0.9;
  transition: transform 180ms ease;
  pointer-events: none;
}

.bubble-card[open] .bubble-tile {
  animation: bubble-pop 380ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
  animation-delay: calc(var(--bubble-index) * 45ms);
}

.bubble-tile:hover,
.bubble-tile:focus-within {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.68);
}

.bubble-tile:hover::after,
.bubble-tile:focus-within::after {
  transform: translateY(-8px) scale(1.06);
}

.bubble-tile-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 14px;
  color: #fff;
  text-decoration: none;
}

.bubble-tile-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #1e222a;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.56)),
    var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px color-mix(in srgb, var(--accent), transparent 65%);
}

.bubble-tile-icon svg {
  width: 22px;
  height: 22px;
}

.bubble-tile-name {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 1px 14px rgba(31, 27, 77, 0.26);
  word-break: break-word;
}

.bubble-tile-meta {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.3;
  text-shadow: 0 1px 10px rgba(31, 27, 77, 0.18);
  direction: ltr;
}

.bubble-tile-map {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1e222a;
  text-decoration: none;
  background: linear-gradient(135deg, #7ee8ff, #54e1ff);
  box-shadow: 0 4px 14px rgba(84, 225, 255, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.bubble-tile-map svg {
  width: 16px;
  height: 16px;
}

.bubble-tile-map:hover,
.bubble-tile-map:focus-visible {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(84, 225, 255, 0.5);
  outline: none;
}

.bubble-tile-phone-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1e222a;
  text-decoration: none;
  background: linear-gradient(135deg, #a3f7bf, #39e879);
  box-shadow: 0 4px 14px rgba(57, 232, 121, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.bubble-tile-phone-btn svg {
  width: 14px;
  height: 14px;
}

.bubble-tile-phone-btn:hover,
.bubble-tile-phone-btn:focus-visible {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(57, 232, 121, 0.5);
  outline: none;
}

.link-icon {
  width: 54px;
  height: 54px;
  position: relative;
  z-index: 1;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #2b3034;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.58)),
    var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 15px 28px color-mix(in srgb, var(--accent), transparent 72%);
}

.link-icon svg {
  width: 25px;
  height: 25px;
}

.link-copy,
.link-arrow {
  position: relative;
  z-index: 1;
}

.link-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.link-copy strong {
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.2;
  text-shadow: 0 1px 16px rgba(31, 27, 77, 0.28);
  word-break: break-word;
}

.link-copy small {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.45;
  text-shadow: 0 1px 12px rgba(31, 27, 77, 0.2);
}

.link-arrow {
  color: rgba(255, 255, 255, 0.75);
  transition: transform 180ms ease;
}

.admin-entry {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-wrap,
.admin-wrap {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.login-card {
  width: min(430px, 100%);
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 30px;
}

.login-card img {
  width: 170px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.login-card h1,
.admin-header h1,
.admin-panel h2 {
  margin: 0;
  color: #fff;
  letter-spacing: 0;
}

.login-card h1 {
  margin-bottom: 20px;
  text-align: center;
  font-size: 2rem;
}

.admin-wrap {
  padding: 32px 0 44px;
}

.admin-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 24px;
}

.admin-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
}

.admin-panel h2 {
  margin-bottom: 16px;
}

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

.stack-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.88rem;
  font-weight: 700;
}

.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

.stack-form textarea {
  resize: vertical;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
  border-color: var(--arrow-lime);
  box-shadow: 0 0 0 4px rgba(215, 255, 34, 0.18);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr;
  gap: 12px;
}

.check-line {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check-line input {
  width: 20px;
  min-height: 20px;
}

.solid-button {
  width: 100%;
  padding: 0 18px;
}

.ghost-button,
.dashboard-actions button,
.text-button {
  min-height: 40px;
  padding: 0 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.text-button {
  width: fit-content;
}

.dashboard-actions .danger {
  color: #fff;
  background: rgba(255, 78, 111, 0.38);
}

.form-error,
.form-success {
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
}

.form-error {
  background: rgba(197, 34, 69, 0.52);
}

.form-success {
  background: rgba(45, 141, 84, 0.48);
}

.link-manager {
  margin-top: 18px;
}

.dashboard-list {
  display: grid;
  gap: 12px;
}

.dashboard-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
}

.dashboard-link.is-muted {
  opacity: 0.56;
}

.dashboard-link strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.dashboard-link small {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.76);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-actions form {
  margin: 0;
}

.dashboard-actions form:first-child button {
  width: 40px;
  padding: 0;
  transform: rotate(-90deg);
}

@keyframes mesh-drift {
  from {
    transform: translate3d(-2%, 1%, 0) scale(0.98);
  }
  to {
    transform: translate3d(3%, -3%, 0) scale(1.05);
  }
}

@keyframes shard-slide {
  from {
    translate: -2vw 0;
  }
  to {
    translate: 5vw 2vh;
  }
}

@keyframes float-logo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes bubble-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sheen {
  0%,
  45% {
    transform: translateX(-120%);
  }
  70%,
  100% {
    transform: translateX(120%);
  }
}

@media (max-width: 880px) {
  .public-shell {
    min-height: auto;
    padding: 24px 0 56px;
    grid-template-columns: 1fr;
  }

  .hero-glass,
  .links-glass {
    min-height: auto;
  }

  .brand-mark {
    width: min(230px, 66vw);
    margin-bottom: 42px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .public-shell,
  .login-wrap,
  .admin-wrap {
    width: min(100% - 22px, 520px);
  }

  .public-shell {
    gap: 8px;
    padding: 12px 0 34px;
  }

  .hero-glass,
  .links-glass,
  .admin-panel,
  .login-card {
    border-radius: 22px;
  }

  .hero-glass {
    min-height: auto;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    padding: 8px;
  }

  .hero-glass h1 {
    margin: 0 0 4px;
    font-size: 1.16rem;
    line-height: 1;
  }

  .hero-glass .handle,
  .hero-glass .description,
  .hero-glass .primary-action {
    display: none;
  }

  .hero-glass .tagline {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .brand-mark {
    width: 62px;
    margin: 0;
    grid-row: 1 / span 2;
    border-radius: 15px;
    animation: none;
  }

  .links-glass {
    padding: 12px;
  }

  .links-header {
    display: none;
  }

  .links-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .link-card,
  .bubble-summary {
    min-height: 86px;
    gap: 12px;
    padding: 12px;
  }

  .link-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .link-copy strong {
    font-size: 0.98rem;
  }

  .link-copy small {
    font-size: 0.82rem;
  }

  .bubble-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 12px;
  }

  .bubble-tile-main {
    padding: 14px 10px;
    gap: 6px;
  }

  .bubble-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .bubble-tile-icon svg {
    width: 20px;
    height: 20px;
  }

  .bubble-tile-name {
    font-size: 0.74rem;
  }

  .bubble-tile-meta {
    font-size: 0.68rem;
  }

  .bubble-tile-map,
  .bubble-tile-phone-btn {
    width: 28px;
    height: 28px;
    top: 6px;
    right: 6px;
  }

  .bubble-tile-map svg,
  .bubble-tile-phone-btn svg {
    width: 14px;
    height: 14px;
  }

  .admin-entry {
    position: static;
    width: fit-content;
    margin: -36px auto 18px;
    display: flex;
  }

  .admin-header,
  .dashboard-link {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .admin-header {
    flex-direction: column;
  }

  .admin-header nav,
  .dashboard-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dashboard-link {
    grid-template-columns: auto 1fr;
  }

  .dashboard-actions {
    grid-column: 1 / -1;
  }
}

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