@font-face {
  font-family: 'RVFont';
  src: url('rvfont.ttf') format('truetype');
}

:root {
  --primary-bg: radial-gradient(ellipse at center, #1a2a3a 0%, #0d1a26 100%);
  --text-light: rgba(255, 255, 255, 0.9);
  --text-dim: rgba(255, 255, 255, 0.7);
  --glass-bg: linear-gradient(145deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.15));
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(20px) saturate(180%);
  --discord-height: 0px;
  
  --glass-surface: rgba(255, 255, 255, 0.06);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  
  /* Dynamic gradient variables */
  --gradient-hue-1: 210;
  --gradient-hue-2: 215;
  --gradient-sat-1: 35%;
  --gradient-sat-2: 40%;
  --gradient-light-1: 20%;
  --gradient-light-2: 12%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html, #app {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

#app {
  position: relative;
  overflow: hidden;
  user-select: none;
  background: radial-gradient(
    ellipse at center, 
    hsl(var(--gradient-hue-1), var(--gradient-sat-1), var(--gradient-light-1)) 0%, 
    hsl(var(--gradient-hue-2), var(--gradient-sat-2), var(--gradient-light-2)) 100%
  );
  animation: gradient-shift 30s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    --gradient-hue-1: 210;
    --gradient-hue-2: 215;
    --gradient-sat-1: 35%;
    --gradient-sat-2: 40%;
    --gradient-light-1: 20%;
    --gradient-light-2: 12%;
  }
  16.67% {
    --gradient-hue-1: 205;
    --gradient-hue-2: 220;
    --gradient-sat-1: 38%;
    --gradient-sat-2: 42%;
    --gradient-light-1: 21%;
    --gradient-light-2: 13%;
  }
  33.33% {
    --gradient-hue-1: 215;
    --gradient-hue-2: 210;
    --gradient-sat-1: 40%;
    --gradient-sat-2: 38%;
    --gradient-light-1: 22%;
    --gradient-light-2: 14%;
  }
  50% {
    --gradient-hue-1: 220;
    --gradient-hue-2: 205;
    --gradient-sat-1: 37%;
    --gradient-sat-2: 41%;
    --gradient-light-1: 21%;
    --gradient-light-2: 13%;
  }
  66.67% {
    --gradient-hue-1: 208;
    --gradient-hue-2: 218;
    --gradient-sat-1: 36%;
    --gradient-sat-2: 39%;
    --gradient-light-1: 20%;
    --gradient-light-2: 12%;
  }
  83.33% {
    --gradient-hue-1: 212;
    --gradient-hue-2: 213;
    --gradient-sat-1: 39%;
    --gradient-sat-2: 40%;
    --gradient-light-1: 22%;
    --gradient-light-2: 14%;
  }
}

#app canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#caustics-canvas {
  z-index: 0;
  opacity: 0.3;
  mix-blend-mode: screen;
}

#particles-canvas {
  z-index: 2;
  pointer-events: none;
}

#fish-canvas {
  z-index: 3;
}

#goldfish-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

#app::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,165,0,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,69,0,0.08) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(138,43,226,0.15) 0%, transparent 80%);
  pointer-events: none;
  z-index: 4;
  animation: ambient-shift 40s ease-in-out infinite;
}

@keyframes ambient-shift {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  50% {
    opacity: 0.9;
    transform: scale(0.98);
  }
  75% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

.rainbow-text-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  text-align: center;
  pointer-events: none;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.rainbow-text {
  font-family: 'RVFont', Arial, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  display: inline-block;
  line-height: 1;
  margin: 0;
}

.rainbow-text .char {
  display: inline-block;
  color: hsl(calc(360deg * var(--char-percent)), 90%, 75%);
  animation: rainbow-colors 2s linear infinite, float-effect 6s ease-in-out infinite;
  animation-delay: calc(-2s * var(--char-percent)), calc(0.1s * var(--char-index));
  transform-origin: center bottom;
}

@keyframes rainbow-colors {
  0% { color: #81a1c1; }
  25% { color: #b48ead; }
  50% { color: #8fbcbb; }
  75% { color: #ebcb8b; }
  100% { color: #88c0d0; }
}

@keyframes float-effect {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-15px) rotate(-2deg) scale(1.1); }
  50% { transform: translateY(-20px) scale(1.2); }
  75% { transform: translateY(-10px) rotate(2deg) scale(1.1); }
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rainbow-shift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes float-up {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(-20px); }
}

@keyframes glass-warp {
  0% {
    -webkit-backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%) hue-rotate(0deg);
    backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%) hue-rotate(0deg);
  }
  25% {
    -webkit-backdrop-filter: blur(85px) saturate(240%) contrast(125%) brightness(112%) hue-rotate(3deg);
    backdrop-filter: blur(85px) saturate(240%) contrast(125%) brightness(112%) hue-rotate(3deg);
  }
  50% {
    -webkit-backdrop-filter: blur(90px) saturate(250%) contrast(135%) brightness(118%) hue-rotate(5deg);
    backdrop-filter: blur(90px) saturate(250%) contrast(135%) brightness(118%) hue-rotate(5deg);
  }
  75% {
    -webkit-backdrop-filter: blur(85px) saturate(230%) contrast(128%) brightness(114%) hue-rotate(2deg);
    backdrop-filter: blur(85px) saturate(230%) contrast(128%) brightness(114%) hue-rotate(2deg);
  }
  100% {
    -webkit-backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%) hue-rotate(0deg);
    backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%) hue-rotate(0deg);
  }
}

.glass-dock-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  width: auto;
  max-width: 90vw;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.glass-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px 16px;
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow), inset 0 1px 1px var(--glass-highlight);
  animation: slideInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  transition: all 0.3s ease;
  width: fit-content;
}

.glass-dock:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 15px 50px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.1);
}

.dock-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 12px;
}

.social-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.icon-content {
  position: relative;
  cursor: pointer;
  opacity: 1;
  animation: slideInUp 0.6s ease-out forwards;
  flex: 0 0 auto;
  display: block;
}

.icon-content:nth-child(1) {
  animation-delay: 0.1s;
}

.icon-content:nth-child(2) {
  animation-delay: 0.2s;
}

.icon-content:nth-child(3) {
  animation-delay: 0.3s;
}

.icon-content:nth-child(4) {
  animation-delay: 0.4s;
}

.icon-content a {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(60px) saturate(200%) contrast(120%) brightness(110%);
  backdrop-filter: blur(60px) saturate(200%) contrast(120%) brightness(110%);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
              0 1px 2px rgba(255, 255, 255, 0.3) inset,
              0 -1px 2px rgba(0, 0, 0, 0.5) inset;
}

@supports not (backdrop-filter: blur(60px)) {
  .icon-content a {
    background: rgba(255, 255, 255, 0.1);
  }
}

.icon-content a:hover {
  transform: translateY(-3px) scale(1.05);
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%);
  backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
              0 2px 4px rgba(255, 255, 255, 0.4) inset,
              0 -2px 4px rgba(0, 0, 0, 0.3) inset;
}

.icon-content svg {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  transition: all 0.4s ease;
  fill: rgba(255, 255, 255, 0.85);
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.icon-content a:hover svg {
  fill: white;
  color: white;
  transform: scale(1.1);
}

.social-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.filled {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  border-radius: 10px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
  opacity: 0;
}

.icon-content a:hover .filled {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 0.9;
}

[data-social="discord"] .filled {
  background: linear-gradient(135deg, #7289da 0%, #5865f2 50%, #454fbf 100%);
}

[data-social="steam"] .filled {
  background: linear-gradient(135deg, #171d25 0%, #2a475e 50%, #1b2838 100%);
}

[data-social="instagram"] .filled {
  background: linear-gradient(45deg, #405de6 0%, #5851db 20%, #833ab4 40%, #c13584 60%, #e1306c 80%, #fd1d1d 100%);
}

[data-social="twitter"] .filled {
  background: linear-gradient(135deg, #1da1f2 0%, #0084ff 50%, #0066cc 100%);
}

.about-button {
  display: flex;
  justify-content: center;
  opacity: 1;
  position: relative;
}

.about-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(60px) saturate(200%) contrast(120%) brightness(110%) hue-rotate(0deg);
  backdrop-filter: blur(60px) saturate(200%) contrast(120%) brightness(110%) hue-rotate(0deg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
              0 1px 2px rgba(255, 255, 255, 0.3) inset,
              0 -1px 2px rgba(0, 0, 0, 0.5) inset;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 0;
}

.about-btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  -webkit-backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%) hue-rotate(5deg);
  backdrop-filter: blur(80px) saturate(220%) contrast(130%) brightness(115%) hue-rotate(5deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
              0 2px 4px rgba(255, 255, 255, 0.4) inset,
              0 -2px 4px rgba(0, 0, 0, 0.3) inset;
  animation: glass-warp 0.6s ease-in-out infinite alternate;
}

.about-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.about-btn:hover::before {
  left: 100%;
}

.about-btn span {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  color: #fff;
  padding: 6px 10px;
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  font-size: 11px;
  font-weight: 500;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  width: max-content;
  max-width: 200px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4),
              0 1px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  background: linear-gradient(135deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.2) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.tooltip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%);
  transition: left 0.5s ease;
}

.icon-content:hover .tooltip,
.about-button:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.icon-content:hover .tooltip::before,
.about-button:hover .tooltip::before {
  left: 100%;
}

.copy-confirmation {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: transparent;
  color: transparent;
  background-image: linear-gradient(to right, #81a1c1, #b48ead, #8fbcbb, #ebcb8b, #88c0d0);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: rainbow-shift 8s linear infinite;
  padding: 8px 16px;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: bold;
  z-index: 1500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
  border: none;
  white-space: nowrap;
}

.copy-confirmation.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: rainbow-shift 8s linear infinite, float-up 1.5s ease-out forwards;
}

/* Responsive Typography */
@media (min-width: 1600px) {
  .rainbow-text { font-size: 15vw; }
}
@media (max-width: 1599px) and (min-width: 1200px) {
  .rainbow-text { font-size: 14vw; }
}
@media (max-width: 1199px) and (min-width: 992px) {
  .rainbow-text { font-size: 13vw; }
}
@media (max-width: 991px) and (min-width: 768px) {
  .rainbow-text { font-size: 12vw; }
}
@media (max-width: 767px) and (min-width: 480px) {
  .rainbow-text { font-size: 8rem; }
}
@media (max-width: 479px) {
  .rainbow-text { font-size: 6rem; }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .glass-dock-container {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90vw;
    padding: 0 15px;
    z-index: 1500;
  }

  .glass-dock {
    justify-content: center;
    padding: 6px 12px;
  }

  .social-links {
    gap: 3px;
  }

  .icon-content a {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .icon-content a svg {
    width: 16px;
    height: 16px;
  }

  .about-button {
    gap: 6px;
    flex-direction: row;
  }

  .about-btn {
    padding: 6px 12px;
    font-size: 11px;
    height: 32px;
  }

  .tooltip {
    bottom: calc(100% + 10px);
    max-width: calc(100vw - 40px);
    font-size: 10px;
  }

  @media (orientation: landscape) and (max-height: 500px) {
    .glass-dock-container {
      bottom: 15px;
    }
  }
}

@media (max-width: 480px) {
  .glass-dock-container {
    padding: 0 10px;
    max-width: 95vw;
  }

  .glass-dock {
    padding: 5px 10px;
  }

  .social-links {
    gap: 2px;
  }

  .about-button {
    gap: 4px;
    flex-direction: row;
  }

  .about-btn {
    padding: 5px 10px;
    font-size: 10px;
    height: 30px;
  }

  .tooltip {
    white-space: normal;
    max-width: 100px;
    font-size: 9px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  #app {
    animation: none;
  }
  
  #app::before {
    animation: none;
  }
  
  .rainbow-text .char {
    animation: none;
  }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
  .icon-content a,
  .about-btn {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .icon-content a {
    min-width: 44px;
    min-height: 44px;
  }

  .close-btn {
    min-width: 44px;
    min-height: 44px;
  }
}