/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

/* Basic Setup & Custom Cursor */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
  font-family: 'Poppins', sans-serif;
  cursor: none; /* Hide default cursor */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Custom cursor dot */
#custom-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px white, 0 0 20px white;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}

/* Background Effects */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 1s ease;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  flex-direction: column;
  text-align: center;
  transition: opacity 0.8s ease-in-out;
}

#splashText {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* IP Address Text */
#ipText {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 5px;
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff;
}

/* "click to enter..." text */
#accessText {
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff;
}

/* Glowing dots animation */
.glowing-dots {
  display: inline-block;
  animation: glowPulse 1.5s infinite;
}

@keyframes glowPulse {
  0%, 100% { 
    text-shadow: 0 0 5px #fff, 0 0 10px #fff; 
  }
  50% { 
    text-shadow: 0 0 15px #fff, 0 0 30px #fff; 
  }
}

/* Card Container */
.card-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  perspective: 1500px;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.card-container.visible {
  display: flex;
  animation: cardEntry 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardEntry {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modern Card Design */
.card {
  width: 350px;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s linear, box-shadow 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255,255,255,0.05);
  animation: cardPulse 8s infinite ease-in-out;
}

@keyframes cardPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255,255,255,0.05);
  }
  50% {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(255,255,255,0.1);
  }
}

/* Tilt effect on hover */
.card:hover {
  animation-name: none;
  transform: rotateX(var(--x-rotation, 0)) rotateY(var(--y-rotation, 0)) scale(1.08);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 50px rgba(255,255,255,0.2);
}

/* Radial gradient glow from cursor */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.card:hover::after {
  opacity: 1;
}

/* Card Content Styling */
.card-image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin-bottom: 30px;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.image-glow {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid #fff;
  opacity: 0;
  box-shadow: 0 0 20px #fff;
  animation: subtleRotate 8s linear infinite, glowPulse 4s infinite ease-in-out;
  transition: opacity 0.4s ease;
}

@keyframes subtleRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.card:hover .image-glow {
  animation: subtleRotate 8s linear infinite;
  opacity: 0.5;
}

.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  animation: picSubtleScale 8s infinite ease-in-out alternate;
  user-drag: none;
  -webkit-user-drag: none;
}

@keyframes picSubtleScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.card-content {
  text-align: center;
  margin-bottom: 35px;
}

.card-content h2 {
  font-size: 2.2rem;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #ffffff;
  text-shadow: 0 0 5px #fff, 0 0 15px #fff;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.card-content h2.typing {
  animation: typing 1s steps(var(--steps), end) forwards, blink-caret 0.55s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: calc(var(--steps) * 1ch); }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: rgba(255, 255, 255, 0.8); }
}

.card-content p {
  font-size: 1rem;
  font-weight: 400;
  margin: 0;
  color: #bbbbbb;
  line-height: 1.6;
}

/* Footer & Social Links */
.card-footer {
  display: flex;
  justify-content: center;
  gap: 25px;
  width: 100%;
}

/* Social Link Box Expansion */
.social-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 8px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 0 5px rgba(255,255,255,0.05);
  white-space: nowrap;
  height: 44px;
  box-sizing: border-box;
  width: 44px;
  justify-content: center;
  cursor: pointer; /* Show pointer cursor on hover */
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255,255,255,0.2), 0 0 30px rgba(255,255,255,0.1);
  transform: translateY(-3px);
  width: auto;
  padding-right: 15px;
  justify-content: flex-start;
}

.social-icon {
  width: 28px;
  height: 28px;
  filter: grayscale(1) brightness(1.5) contrast(0.8);
  transition: filter 0.3s ease, margin-right 0.3s ease;
  flex-shrink: 0;
  animation: iconSubtlePulse 3s infinite ease-in-out;
}

@keyframes iconSubtlePulse {
  0%, 100% { filter: grayscale(1) brightness(1.5) contrast(0.8); transform: translateY(0); }
  50% { filter: grayscale(1) brightness(1.6) contrast(0.9); transform: translateY(-2px); }
}

.social-link:hover .social-icon {
  filter: grayscale(0) brightness(1) contrast(1) drop-shadow(0 0 8px #fff) drop-shadow(0 0 15px #fff);
  margin-right: 10px;
  animation-name: none;
}

.social-text {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0;
  max-width: 0;
  transition: opacity 0.3s ease, max-width 0.3s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.social-link:hover .social-text {
  opacity: 1;
  max-width: 250px;
}

.arrow-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

/* Views Counter Styles */
.card-stats {
  margin-top: 25px;
  text-align: center;
  width: 100%;
}

.views-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 15px;
  color: #bbbbbb;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 0 5px rgba(255,255,255,0.03);
  transition: all 0.3s ease;
  cursor: default;
}

.views-counter:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.views-icon {
  width: 20px;
  height: 20px;
  filter: brightness(1.2) grayscale(0.5);
  transition: filter 0.3s ease;
}

.views-counter:hover .views-icon {
    filter: brightness(1.5) grayscale(0);
}

#viewCount {
  color: #ffffff;
  text-shadow: 0 0 5px #fff;
}

/* Audio Control with Tilt Effect */
#audio-control {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 999;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 0.7rem;
  width: 3.4rem;
  height: 3.4rem;
  display: none; /* Hidden initially */
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(255,255,255,0.04);
  animation: cardPulse 8s infinite ease-in-out;
  transition: transform 0.1s linear, box-shadow 0.3s ease;
  cursor: pointer; /* Show pointer cursor on hover */
  transform-style: preserve-3d;
  opacity: 0;
  transform: translateY(100px) scale(0.9);
}

#audio-control.visible {
  display: flex;
  animation: cardEntry 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#audio-control:hover {
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.3), inset 0 0 35px rgba(255,255,255,0.08);
  background: rgba(255, 255, 255, 0.08);
  transform: rotateX(var(--audio-x-rotation, 0)) 
             rotateY(var(--audio-y-rotation, 0)) 
             scale(1.08);
}

#audio-control img {
  width: 22px;
  height: 22px;
  filter: grayscale(1) brightness(1.6);
  transition: filter 0.3s ease;
}

#audio-control:hover img {
  filter: grayscale(0) brightness(1.2) drop-shadow(0 0 10px white);
}

/* Radial glow effect for audio button */
#audio-control::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background: radial-gradient(circle at var(--audio-x, 50%) var(--audio-y, 50%), 
              rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#audio-control:hover::after {
  opacity: 1;
}
