/*
 * RODNIE UNIVERSE UI 1.0
 * Independent visual layer.
 * Original application logic remains unchanged.
 */

:root {
  --universe-space: #080b20;
  --universe-deep: #10122d;
  --universe-violet: #9e83ff;
  --universe-blue: #79c8ff;
  --universe-glass: rgba(18, 23, 53, .78);
  --universe-border: rgba(184, 175, 255, .19);
  --universe-glow: 0 15px 55px rgba(3, 5, 22, .36);

  --bg: #080b20;
  --panel: #171a37;
  --ink: #f5f3ff;
  --muted: #b5b2d2;
  --line: rgba(181, 172, 255, .19);
  --soft: #29274b;
  --accent: #a38aff;
  --shadow: 0 15px 55px rgba(3, 5, 22, .30);

  color-scheme: dark;
}

html {
  min-height: 100%;
  background: #080b20;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(
      ellipse at 82% 5%,
      rgba(108, 76, 212, .22),
      transparent 45%
    ),
    radial-gradient(
      ellipse at 18% 65%,
      rgba(38, 101, 174, .15),
      transparent 45%
    ),
    linear-gradient(145deg, #080b20, #11132d 60%, #080b20);
}

/*
 * Independent graphic layers from Launch.
 * They are decorative and never capture clicks.
 */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    url("/static/brand/launch-v3-20261008-r1/stars.png"),
    url("/static/brand/launch-v3-20261008-r1/nebula.png");
  background-position: center, center top;
  background-repeat: repeat, no-repeat;
  background-size: 1100px auto, cover;
  opacity: .31;
}

body::after {
  content: "";
  position: fixed;
  right: -160px;
  top: 130px;
  width: min(50vw, 700px);
  height: min(50vw, 700px);
  z-index: 0;
  pointer-events: none;
  background:
    url("/static/brand/launch-v3-20261008-r1/planet-earth.png")
    center / contain no-repeat;
  opacity: .20;
  filter: drop-shadow(0 0 80px rgba(119, 125, 255, .35));
}

#app,
#toast,
#dialog,
#call-dialog {
  position: relative;
  z-index: 1;
}

#app {
  isolation: isolate;
}

/* Sidebar */

.sidebar {
  background:
    linear-gradient(
      165deg,
      rgba(22, 27, 61, .95),
      rgba(11, 15, 37, .96)
    ) !important;
  border-right: 1px solid rgba(185, 174, 255, .17);
  box-shadow: 12px 0 55px rgba(0, 0, 0, .15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.sidebar .brand {
  border-radius: 18px;
}

.brand b {
  color: #fff;
  letter-spacing: -.4px;
}

.brand small {
  color: #b7aaf0;
}

.nav a {
  border-radius: 14px;
  transition:
    background .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.nav a:hover {
  background: rgba(144, 125, 240, .15);
  transform: translateX(3px);
}

.nav a.active {
  color: #fff;
  background:
    linear-gradient(
      105deg,
      rgba(141, 111, 255, .32),
      rgba(76, 140, 242, .15)
    );
  border: 1px solid rgba(180, 162, 255, .23);
  box-shadow:
    inset 0 0 24px rgba(140, 112, 255, .09),
    0 0 24px rgba(117, 96, 230, .12);
}

.sidebar-bottom img {
  border-radius: 18px;
  opacity: .85;
}

/* Topbar */

.topbar {
  background: rgba(13, 18, 44, .79) !important;
  border-bottom: 1px solid rgba(181, 172, 255, .15);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}

.topbar input,
.topbar form {
  background: rgba(255, 255, 255, .045);
  color: #f5f3ff;
  border-color: rgba(178, 168, 255, .18);
}

.topbar input::placeholder {
  color: #aaa7c7;
}

/* Main content */

.page {
  position: relative;
}

.page > h1 {
  color: #fff;
  letter-spacing: -.9px;
  text-shadow: 0 0 35px rgba(159, 126, 255, .20);
}

.subtitle {
  color: #c5baf3;
}

/* Real glass components */

.card {
  position: relative;
  background:
    linear-gradient(
      145deg,
      rgba(34, 37, 78, .87),
      rgba(17, 22, 51, .90)
    ) !important;
  border: 1px solid var(--universe-border) !important;
  box-shadow:
    var(--universe-glow),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 22px;
}

.post {
  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.post:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 147, 255, .38) !important;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .31),
    0 0 30px rgba(118, 100, 224, .08);
}

/* Feed hero: independent graphic assets + real text */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 220px;
  border-radius: 26px;
  border: 1px solid rgba(172, 164, 255, .24);
  background:
    radial-gradient(
      circle at 80% 50%,
      rgba(101, 73, 204, .34),
      transparent 52%
    ),
    linear-gradient(115deg, #17153c, #0d1639 70%, #171342);
  box-shadow:
    0 20px 55px rgba(0, 0, 0, .26),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .20;
  z-index: -1;
}

.hero::before {
  content: "";
  position: absolute;
  right: -35px;
  top: -105px;
  width: 360px;
  height: 360px;
  z-index: -1;
  pointer-events: none;
  background:
    url("/static/brand/launch-v3-20261008-r1/planet-main.png")
    center / contain no-repeat;
  filter: drop-shadow(0 0 35px rgba(132, 126, 255, .35));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(12, 14, 39, .70),
      rgba(12, 14, 39, .10)
    );
}

.hero > div {
  position: relative;
  z-index: 1;
}

.hero h2 {
  color: #fff;
  text-shadow: 0 3px 25px rgba(0, 0, 0, .45);
}

.hero p {
  color: #e0d9ff;
}

/* Composer */

.composer {
  border-color: rgba(168, 148, 255, .32) !important;
}

.composer textarea,
.card textarea,
.card input,
.card select {
  color: var(--ink);
}

.composer textarea::placeholder {
  color: #a9a5c7;
}

/* Buttons */

button,
.button {
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

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

.primary,
button.primary,
.button.primary {
  background:
    linear-gradient(
      120deg,
      #8d6af0,
      #736de4 55%,
      #547cdb
    ) !important;
  color: #fff !important;
  border-color: rgba(201, 185, 255, .30) !important;
  box-shadow: 0 8px 24px rgba(108, 86, 225, .25);
}

.primary:hover,
button.primary:hover,
.button.primary:hover {
  box-shadow: 0 10px 30px rgba(125, 102, 245, .42);
}

/* Stories */

.story-row {
  position: relative;
}

.story-row .story,
.story-row button {
  transition:
    transform .2s ease,
    filter .2s ease;
}

.story-row .story:hover,
.story-row button:hover {
  transform: translateY(-3px);
  filter: brightness(1.12);
}

.story-row .avatar {
  box-shadow:
    0 0 0 2px rgba(153, 120, 255, .65),
    0 0 19px rgba(122, 98, 255, .23);
}

/* Right panel */

.sidecards .card {
  background:
    linear-gradient(
      150deg,
      rgba(35, 35, 82, .88),
      rgba(16, 24, 54, .88)
    ) !important;
}

.sidecards h3 {
  color: #f8f5ff;
}

/* Avatars */

.avatar {
  border-color: rgba(191, 176, 255, .30);
}

/* Tabs */

.tabs {
  gap: 8px;
}

.tabs .button {
  border: 1px solid rgba(166, 153, 240, .20);
  background: rgba(31, 34, 72, .72);
  color: #d7d0f7;
}

.tabs .button.active {
  background: rgba(125, 101, 235, .25);
  border-color: rgba(171, 149, 255, .48);
  color: #fff;
}

/* Text and links */

.muted {
  color: #b6b2d1;
}

a {
  text-underline-offset: 3px;
}

/* Dialogs */

dialog {
  color: #f5f3ff;
  background: #171a38;
  border: 1px solid rgba(181, 164, 255, .30);
  box-shadow: 0 25px 90px rgba(0, 0, 0, .55);
}

dialog::backdrop {
  background: rgba(2, 5, 20, .75);
  backdrop-filter: blur(7px);
}

/* Mobile */

@media (max-width: 1050px) {
  body::after {
    width: 440px;
    height: 440px;
    right: -220px;
    opacity: .12;
  }
}

@media (max-width: 768px) {
  body::before {
    opacity: .20;
    background-size: 850px auto, cover;
  }

  body::after {
    width: 310px;
    height: 310px;
    right: -170px;
    top: 105px;
    opacity: .10;
  }

  .sidebar {
    z-index: 100;
  }

  .hero {
    min-height: 190px;
    border-radius: 20px;
  }

  .hero::before {
    width: 240px;
    height: 240px;
    right: -95px;
    top: -35px;
    opacity: .75;
  }

  .hero::after {
    background:
      linear-gradient(
        90deg,
        rgba(12, 14, 39, .85),
        rgba(12, 14, 39, .25)
      );
  }

  .hero > div {
    max-width: 78%;
  }

  .card {
    border-radius: 18px;
  }

  .post:hover {
    transform: none;
  }
}

@media (max-width: 420px) {
  .hero::before {
    right: -115px;
    opacity: .55;
  }

  .hero > div {
    max-width: 90%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post,
  button,
  .button,
  .nav a,
  .story-row button {
    transition: none !important;
    animation: none !important;
  }
}
