@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;
}

* {
  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: var(--primary-bg);
}

#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;
}

.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 float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@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); }
}

.social-container {
  position: fixed !important;
  bottom: 20px !important;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.social-links {
  display: flex !important;
  justify-content: center;
  align-items: center;
  list-style: none;
  gap: 20px;
  padding: 0;
  margin: 0 0 20px 0;
  flex-wrap: wrap;
}

.icon-content {
  position: relative;
  cursor: pointer;
  opacity: 1 !important;
  animation: slideInUp 0.6s ease-out forwards, float 3s ease-in-out infinite;
  flex: 0 0 auto;
  display: block !important;
}

.icon-content:nth-child(1) { 
  animation-delay: 0.1s, 0s;
}
.icon-content:nth-child(2) { 
  animation-delay: 0.2s, 0.2s;
}
.icon-content:nth-child(3) { 
  animation-delay: 0.3s, 0.4s;
}
.icon-content:nth-child(4) { 
  animation-delay: 0.4s, 0.6s;
}

.icon-content a {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  width: clamp(50px, 6vw, 80px);
  height: clamp(50px, 6vw, 80px);
  border-radius: 24px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  border: 2px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              inset 0 2px 4px rgba(255, 255, 255, 0.2),
              inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}

@supports not (backdrop-filter: blur(20px)) {
  .icon-content a {
    background: rgba(0, 0, 0, 0.25);
  }
}

.icon-content a:hover {
  transform: translateY(-10px) scale(1.1);
  border-radius: 20px;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
              inset 0 2px 8px rgba(255, 255, 255, 0.3),
              inset 0 -2px 8px rgba(0, 0, 0, 0.5);
}

.icon-content a svg {
  position: relative;
  z-index: 2;
  width: clamp(25px, 3.5vw, 45px);
  height: clamp(25px, 3.5vw, 45px);
  transition: all 0.4s ease;
  color: var(--text-dim);
}

.icon-content a:hover svg {
  color: white;
  transform: scale(1.2) rotateZ(360deg);
}

.filled {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  border-radius: 30px;
  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 !important;
  justify-content: center;
  opacity: 1 !important;
  animation: slideInUp 0.6s ease-out 0.8s forwards;
}

.about-btn {
  padding: 12px 24px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 2px solid var(--glass-border);
  border-radius: 20px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(14px, 2vw, 16px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              inset 0 2px 4px rgba(255, 255, 255, 0.2),
              inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.about-btn:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7),
              inset 0 2px 8px rgba(255, 255, 255, 0.3),
              inset 0 -2px 8px rgba(0, 0, 0, 0.5);
}

.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;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  font-size: clamp(12px, 1.5vw, 14px);
  font-weight: 500;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  width: max-content;
  max-width: 150px;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 
              0 2px 8px rgba(0, 0, 0, 0.3);
  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;
}

.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::before {
  left: 100%;
}

.icon-content:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.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;
}

.about-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  backdrop-filter: blur(25px) saturate(180%);
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  z-index: 2000;
  transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow-y: auto;
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
}

.about-panel.open {
  right: 0;
}

.about-panel-content {
  padding: 40px 30px;
  color: var(--text-light);
  line-height: 1.6;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: rotate(90deg);
}

.about-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #81a1c1, #b48ead, #8fbcbb, #ebcb8b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-shift 8s linear infinite;
}

.about-section {
  margin-bottom: 30px;
}

.about-section h3 {
  color: #88c0d0;
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.about-section p {
  margin-bottom: 15px;
  color: var(--text-dim);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.skill-tag {
  background: rgba(129, 161, 193, 0.2);
  border: 1px solid rgba(129, 161, 193, 0.3);
  padding: 8px 12px;
  border-radius: 20px;
  text-align: center;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: rgba(129, 161, 193, 0.3);
  transform: translateY(-2px);
}

.social-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  vertical-align: middle;
}

/* 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) {
  .social-container {
    bottom: 20px !important;
    padding: 0 15px;
    z-index: 1500;
  }
  
  body:has(.discord-presence) .rainbow-text-container,
  .has-discord .rainbow-text-container {
    padding-top: 180px;
  }
  
  .social-links {
    gap: 15px;
    margin-bottom: 15px;
  }
  
  .icon-content a {
    width: clamp(50px, 12vw, 70px);
    height: clamp(50px, 12vw, 70px);
    min-width: 44px;
    min-height: 44px;
  }
  
  .icon-content a svg {
    width: clamp(25px, 6vw, 35px);
    height: clamp(25px, 6vw, 35px);
  }
  
  .about-btn {
    padding: 12px 24px;
    font-size: 15px;
    min-height: 44px;
  }
  
  .tooltip {
    bottom: calc(100% + 15px);
    max-width: calc(100vw - 40px);
    font-size: 13px;
  }
  
  .about-panel {
    width: 100vw;
    right: -100vw;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }
  
  .about-panel-content {
    padding: 60px 20px 40px 20px;
    padding-top: 80px;
  }
  
  body:has(.discord-presence) .about-panel-content,
  .has-discord .about-panel-content {
    padding-top: 200px;
  }
  
  @media (orientation: landscape) and (max-height: 500px) {
    body:has(.discord-presence) .rainbow-text-container,
    .has-discord .rainbow-text-container {
      padding-top: 120px !important;
    }
    
    .social-container {
      bottom: 15px;
    }
  }
}

@media (max-width: 480px) {
  body:has(.discord-presence) .rainbow-text-container,
  .has-discord .rainbow-text-container {
    padding-top: 160px !important;
  }
  
  .social-container {
    bottom: 15px !important;
    padding: 0 10px;
  }
  
  .social-links {
    gap: 12px;
    margin-bottom: 12px;
  }
  
  .about-btn {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 44px;
  }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
  .icon-content a,
  .about-btn,
  .discord-presence {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  .icon-content a {
    min-width: 48px;
    min-height: 48px;
  }
  
  .close-btn {
    min-width: 48px;
    min-height: 48px;
  }
}