:root {
  --containerColor: #f8ddee; /* Pink base color */
  --containerGradient: none;
  --glowColor: #ffd8f0; /* Glow effect color */
}

/***** GLOBAL STYLES *****/
body {
  margin: 0;
  padding: 0;
  font-family: 'Kanit', sans-serif;
  color: #f8ddee;
  background: #1a1a1a;
  overscroll-behavior: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/***** BLACK FROSTED OVERLAY *****/
.black-overlay {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(30px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Kanit", system-ui;
  font-weight: 500;
  font-style: italic;
  font-size: 20px;
  color: #f8ddee;
  text-shadow: 0 0 5px var(--glowColor);
  transition: opacity 1s ease;
}

.black-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/***** GIF BACKGROUND *****/
#background-gif {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/***** AUDIO (Hidden) *****/
#background-audio {
  display: none;
}

/***** SNOWFLAKES CONTAINER *****/
#snowflakes-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/***** VOLUME CONTROL *****/
.volume-control {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: rgba(248, 221, 238, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-radius: 10px;
  box-shadow: 0 0 5px var(--glowColor);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease;
  overflow: hidden;
  z-index: 999;
}

#mute-button {
  cursor: pointer;
  font-size: 20px;
  color: #f8ddee;
  margin-left: 10px;
  margin-right: 10px;
}

#volume-slider {
  -webkit-appearance: none;
  background: transparent;
  width: 0;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
}

/***** TILT CONTROL *****/
.tilt-control {
  position: absolute;
  top: 20px;
  left: 90px;
  width: 50px;
  height: 50px;
  background: rgba(248, 221, 238, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-radius: 10px;
  box-shadow: 0 0 5px var(--glowColor);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.3s ease;
  z-index: 999;
}

#tilt-button {
  cursor: pointer;
  font-size: 20px;
  color: #f8ddee;
}

/* Desktop: Volume expands, pushes tilt button */
@media (min-width: 769px) {
  .volume-control:hover {
    width: 160px;
  }
  .volume-control:hover #volume-slider {
    width: 80px;
    opacity: 1;
  }
  .volume-control:hover + .tilt-control {
    left: 200px;
  }
}

/* Mobile: Hide slider, keep buttons static */
@media (max-width: 768px) {
  .volume-control {
    width: 50px;
  }
  #volume-slider {
    display: none;
  }
  #mute-button {
    margin: 0;
  }
  .tilt-control {
    left: 90px;
  }
}

/* Slider styling */
#volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: #f8ddee;
  border-radius: 2px;
}
#volume-slider::-moz-range-track {
  height: 4px;
  background: #f8ddee;
  border-radius: 2px;
}
#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f8ddee;
  cursor: pointer;
  margin-top: -5px;
}
#volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f8ddee;
  cursor: pointer;
}

/***** BIO-BOX *****/
.bio-box {
  position: relative;
  width: 420px;
  height: 420px;
  background: rgba(248, 221, 238, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  border-radius: 20px;
  box-shadow: 0 0 10px var(--glowColor);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 75px;
  z-index: 3;
  transform-style: preserve-3d;
  overflow: visible;
}

/***** ANIMATED PFP BORDER + PFP *****/
.profile-wrapper {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  z-index: 10;
}

.animated-pfp-border {
  position: absolute;
  width: 150px;
  height: 150px;
  top: 0;
  left: 0;
  background: url('https://cdn.rips.lol/media/angel.gif') no-repeat center center;
  background-size: cover;
  z-index: 2;
  border-radius: 50%;
  filter: hue-rotate(-100deg) saturate(1) brightness(1);
}

.profile-pic {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(248, 221, 238, 0.2);
  box-shadow: 0 0 10px var(--glowColor);
  z-index: 1;
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/***** NAME CONTAINER *****/
.name-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  position:4;
}

.name {
  display: inline-block;
  font-size: 32px;
  text-shadow: 0 0 5px var(--glowColor);
  letter-spacing: 2px;
  font-weight: 800;
  white-space: nowrap;
}

.neon-text {
  animation: neonBlink 1s infinite;
}

@keyframes neonBlink {
  0%, 100% {
    text-shadow: 0 0 10px var(--glowColor), 0 0 20px var(--glowColor);
  }
  50% {
    text-shadow: none;
  }
}

.guild-tag-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-style: bold;
  backdrop-filter: blur(var(--containerBlur)) !important;
  -webkit-backdrop-filter: blur(var(--containerBlur)) !important;
  background-color: var(--containerColor) !important;
  background-image: var(--containerGradient) !important;
  padding: 3px 7px;
  border-radius: 15px;
  box-shadow: 0 0 0px var(--glowColor), 0 0 3px var(--glowColor), 0 0 3px var(--glowColor);
  color: #000;
  margin-left: 10px;
  transition: margin-left 0.3s ease;
}

/***** TOP BUTTONS *****/
.top-buttons {
  display: flex;
  justify-content: space-between;
  width: 90%;
  margin-top: 5px;
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  padding: 0 20px;
}

.like-button,
.views-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 18px;
  backdrop-filter: blur(var(--containerBlur)) !important;
  -webkit-backdrop-filter: blur(var(--containerBlur)) !important;
  background-color: var(--containerColor) !important;
  background-image: var(--containerGradient) !important;
  padding: 5px 10px;
  border-radius: 15px;
  box-shadow: 0 0 0px var(--glowColor), 0 0 3px var(--glowColor), 0 0 3px var(--glowColor);
  color: #000;
  cursor: pointer;
}

/***** BADGE BAR *****/
.badge-bar {
  display: flex;
  justify-content: center;
  gap: 8px; /* Adjusted for even spacing */
  margin-top: 10px;
  backdrop-filter: blur(var(--containerBlur)) !important;
  -webkit-backdrop-filter: blur(var(--containerBlur)) !important;
  background-color: var(--containerColor) !important;
  background-image: var(--containerGradient) !important;
  padding: 11px;
  border-radius: 20px;
  box-shadow: 0 0 0px var(--glowColor), 0 0 3px var(--glowColor), 0 0 3px var(--glowColor);
  z-index: 5;
  overflow: visible;
}

.badge-with-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #000;
  z-index: 25; /* Increased z-index to appear above name */
}

/* Ensure badges with no icon still take up space */
.badge-with-tooltip:empty {
  width: 20px;
  height: 20px;
}

.badge-with-tooltip i {
  font-size: 20px;
  color: #000;
  position: relative;
  z-index: 25;
}

/***** DESCRIPTION *****/
.description {
  margin-top: 10px;
  font-size: 20px;
  position: relative;
  z-index: 20;
  font-weight: 700;
  text-shadow: 0 0 1px var(--glowColor), 0 0 3px var(--glowColor), 0 0 6px var(--glowColor);
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/***** LOCATION *****/
.location-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 5px;
  z-index: 20;
}

.location-icon {
  font-size: 12px;
  color: #f8ddee;
  text-shadow: 0 0 10px var(--glowColor);
  margin-right: 5px;
}

#location-typer {
  font-size: 14px;
  text-shadow: 0 0 5px var(--glowColor);
  font-style: bold;
  font-weight: 900;
}

.cursor-location {
  font-size: 14px;
  animation: blink 1s infinite;
  font-style: bold;
  font-weight: 900;
}

/***** DISCORD PRESENCE *****/
.discord-presence {
  margin-top: 5px;
  width: 90%;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  z-index: 10;
  backdrop-filter: blur(var(--containerBlur)) !important;
  -webkit-backdrop-filter: blur(var(--containerBlur)) !important;
  background-color: var(--containerColor) !important;
  background-image: var(--containerGradient) !important;
  border-radius: 20px;
  box-shadow: 0 0 0px var(--glowColor), 0 0 3px var(--glowColor), 0 0 3px var(--glowColor);
  display: flex;
  align-items: center;
  height: 75px;
  padding: 10px 15px;
  box-sizing: border-box;
}

.discord-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.discord-pfp-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
  margin-right: 15px;
}

.discord-pfp {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.discord-status {
  position: absolute;
  width: 20px;
  height: 20px;
  bottom: 0;
  right: 0;
  border-radius: 50%;
  background: #f8ddee;
  box-sizing: border-box;
}

.discord-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.discord-username {
  font-size: 18px;
  font-weight: 800;
  color: #000;
}

.discord-divider {
  width: 100%;
  height: 1px;
  background: #000000;
  margin: 5px 0;
  opacity: 0.3;
}

.discord-last-seen {
  font-size: 14px;
  font-style: italic;
  color: #000;
}

/***** SOCIAL CAROUSEL *****/
.social-carousel {
  margin-top: 20px;
  width: 90%;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  z-index: 10;
  backdrop-filter: blur(var(--containerBlur)) !important;
  -webkit-backdrop-filter: blur(var(--containerBlur)) !important;
  background-color: var(--containerColor) !important;
  background-image: var(--containerGradient) !important;
  border-radius: 20px;
  box-shadow: 0 0 0px var(--glowColor), 0 0 3px var(--glowColor), 0 0 3px var(--glowColor);
}

.carousel-wrapper {
  display: flex;
  will-change: transform;
  padding: 10px 0;
  overflow: visible;
}

.carousel-page {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 5px;
  box-sizing: border-box;
}

.carousel-page a {
  display: inline-block;
  transform: scale(1);
  transition: transform 0.2s ease;
  flex: 1;
  min-width: 18%;
  text-align: center;
  position: relative;
  margin: 0 1%;
  color: #f8ddee;
  text-decoration: none;
}

.carousel-page a:hover {
  transform: scale(1.15);
}

.carousel-page a:visited,
.carousel-page a:focus,
.carousel-page a:active {
  color: #f8ddee;
  text-decoration: none;
  outline: none;
}

.icon {
  font-size: 50px;
  color: #000000;
  text-shadow: 0 0 10px var(--glowColor);
  display: block;
}

/***** CAROUSEL DOTS *****/
.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  background: #f8ddee;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
  border: solid 1px #000;
}

.dot.active {
  background: #000;
  border: solid 1px #f8ddee;
}

/***** TOOLTIP STYLES *****/
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
  pointer-events: none;
  position: absolute;
  opacity: 0;
  transition: all 0.2s ease;
  font-weight: bold;
  z-index: 9999;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  font-family: 'Kanit', sans-serif;
  background: #000;
  color: #f8ddee;
  padding: 8px 10px;
  font-size: 14px;
  letter-spacing: 0.5px;
  border-radius: 8px;
  white-space: nowrap;
  top: -50px; /* Adjusted to appear above username */
  left: 50%;
  transform: translateX(-50%);
  transform-origin: bottom center;
}

[data-tooltip]::after {
  content: '';
  top: -10px; /* Adjusted to align with tooltip */
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #000 transparent transparent transparent;
  border-radius: 8px;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/***** TOASTER OVERLAY *****/
.toaster-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.toaster-box {
  background: #000;
  width: 300px;
  border-radius: 10px;
  border: 1px solid #f8ddee;
  box-shadow: 0 0 15px var(--glowColor);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toaster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
  padding: 10px;
  font-size: 16px;
  color: #f8ddee;
  font-weight: bold;
}

.toaster-header .toaster-close {
  cursor: pointer;
}

.toaster-body {
  padding: 20px;
  color: #f8ddee;
  text-align: center;
  background: #000;
  font-weight: bold;
}

.toaster-link {
  margin: 10px auto 0 auto;
  padding: 5px;
  background: #f8ddee;
  border-radius: 4px;
  max-width: 90%;
  word-break: break-all;
  color: #000;
}

.toaster-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px;
  background: #000;
}

.toaster-visit {
  background: #f8ddee;
  border: 1px solid #000;
  color: #000;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  font-family: 'Kanit', sans-serif;
  font-weight: bold;
}

.toaster-cancel {
  background: #000;
  color: #f8ddee;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  font-family: 'Kanit', sans-serif;
  border: 1px solid #f8ddee;
  font-weight: bold;
}

.toaster-visit:hover,
.toaster-cancel:hover,
.toaster-close:hover {
  opacity: 0.8;
}