* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: #1f2230;
  background: #2d3047 url("images/mainbackground.png") repeat fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

.site-wrap {
  position: relative;
  padding: 20px 0;
  z-index: 2;
}

.site {
  width: min(1120px, 95%);
  margin: 0 auto;
  background: rgba(247, 245, 251, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 16, 35, 0.20);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  position: relative;
}

.header {
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08);
}

.header img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 12px;
  padding: 12px;
  align-items: start;
}

.sidebar,
.rightbar,
.content section,
.widget {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(31, 28, 56, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sidebar,
.rightbar,
.content section {
  padding: 14px;
}

.widget {
  padding: 12px;
  margin-bottom: 12px;
}

.nav-section h2,
.profile-section h2,
.current-section h2,
.widget h2,
.content h1,
.content h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #1f1d38;
}

h1 {
  font-size: 2.15rem;
  letter-spacing: 0.4px;
  line-height: 1.1;
}

h2 {
  font-size: 1.55rem;
  line-height: 1.15;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: #2d294b;
  line-height: 1.2;
}

p,
li,
a,
span {
  font-size: 0.95rem;
  line-height: 1.6;
}

p,
li {
  color: #2f3148;
}

.nav-section {
  margin-bottom: 18px;
}

.sidebar a {
  display: block;
  padding: 8px 10px;
  color: #2f2a4d;
  text-decoration: none;
  border-bottom: 1px dotted rgba(140, 138, 168, 0.25);
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar a:hover {
  background: rgba(236, 232, 255, 0.35);
  color: #8a224f;
  transform: translateX(2px);
}

.profile-section,
.current-section,
.welcome {
  position: relative;
}

.profile {
  width: 140px;
  height: 140px;
  margin: 12px auto;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(217, 80, 125, 0.80);
  box-shadow: 0 0 12px rgba(217, 80, 125, 0.20);
  background: rgba(255, 255, 255, 0.55);
}

.profile-section p,
.current-section p,
.widget p,
.widget li {
  color: #3b3d55;
}

.welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.welcome p {
  max-width: 70ch;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.feature-card {
  display: block;
  text-decoration: none;
  color: #1f2230;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(31, 28, 56, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.feature-card span {
  display: block;
  padding: 10px 12px;
  font-weight: bold;
  text-align: center;
  color: #2d294b;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 80, 125, 0.45);
  box-shadow: 0 8px 18px rgba(217, 80, 125, 0.14);
}

.feature-card:hover img {
  transform: scale(1.03);
  filter: brightness(1.05) saturate(1.04);
}

audio {
  width: 100%;
  filter: saturate(0.95);
}

ul {
  margin: 0;
  padding-left: 18px;
}

footer {
  text-align: center;
  padding: 14px;
  background: rgba(221, 216, 235, 0.20);
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  color: #37354b;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sticker {
  display: block;
  height: auto;
}

.profile-sticker {
  width: 85px;
  margin: 8px auto 10px;
}

.welcome-sticker {
  width: 72px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(31, 29, 56, 0.10);
}

/* soft rain background */
.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0.08;
  background-image:
    repeating-linear-gradient(
      -12deg,
      rgba(255, 255, 255, 0) 0px,
      rgba(255, 255, 255, 0.18) 2px,
      rgba(255, 255, 255, 0) 12px
    );
  background-size: 140px 140px;
  animation: rain-drift 0.9s linear infinite;
}

@keyframes rain-drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -18px 30px;
  }
}

/* soft screen frame */
.screen-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.03), transparent 20%, transparent 80%, rgba(0,0,0,0.04)),
    radial-gradient(circle at top center, rgba(255,255,255,0.05), transparent 38%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    inset 0 0 18px rgba(255,255,255,0.02),
    inset 0 -8px 18px rgba(0,0,0,0.04);
}

/* falling drops */
.falling-drops {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.fall-drop {
  position: absolute;
  top: -40px;
  border-radius: 50% 50% 55% 55% / 45% 45% 60% 60%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), rgba(255,255,255,0.10) 45%, rgba(255,255,255,0.02) 70%),
    radial-gradient(circle at 70% 75%, rgba(0,0,0,0.10), transparent 60%);
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.22),
    inset -2px -2px 4px rgba(0,0,0,0.06),
    0 0 5px rgba(255,255,255,0.05);
  opacity: 0.38;
  animation: fall-drop-move linear forwards;
}

.fall-drop::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 24%;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  filter: blur(1px);
}

@keyframes fall-drop-move {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.38;
  }
  75% {
    opacity: 0.32;
  }
  100% {
    transform: translateY(120vh) scale(0.92);
    opacity: 0;
  }
}

/* rain button */
.rain-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 12;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(35, 36, 58, 0.35);
  color: #f4f3ff;
  font-family: inherit;
  font-size: 0.9rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rain-toggle:hover {
  background: rgba(55, 56, 88, 0.45);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .header img {
    height: 170px;
  }

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

  .feature-card img {
    height: 180px;
  }
}

@media (max-width: 600px) {
  .site-wrap {
    padding: 0;
  }

  .site {
    width: 100%;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .layout {
    padding: 8px;
    gap: 8px;
  }

  .sidebar,
  .rightbar,
  .content section,
  .widget,
  .feature-card {
    border-radius: 12px;
  }

  .sidebar,
  .rightbar,
  .content section {
    padding: 10px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.28rem;
  }

  .profile {
    width: 110px;
    height: 110px;
  }

  .header img {
    height: 130px;
  }

  .welcome-sticker {
    width: 60px;
  }

  .feature-card img {
    height: 150px;
  }

  .rain-toggle {
    right: 10px;
    bottom: 10px;
    font-size: 0.82rem;
    padding: 8px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rain {
    animation: none;
    opacity: 0.04;
  }

  .fall-drop {
    animation: none;
    opacity: 0.15;
  }

  .feature-card,
  .feature-card img,
  .sidebar a,
  .rain-toggle {
    transition: none;
  }
}