/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Khula', sans-serif;
  background: #000;
  color: #0ff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Neon Theme Variables */
:root {
  --neon-color: #0ff;
  --card-glow: 0 0 10px rgba(0,255,255,0.3);
  --hover-glow: 0 0 20px rgba(0,255,255,0.7);
}

/* Particle Background */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #000000;
}

/* Contact Container */
.contact-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: var(--card-glow);
  max-width: 1000px;
  width: 95%;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -40%) scale(0.98);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-container.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Heading with shimmer */
h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--neon-color);
  position: relative;
  font-weight: 700;
}

h1::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 250%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: shine 3s infinite;
  pointer-events: none;
}

@keyframes shine {
  0% { left: -150%; }
  50% { left: 150%; }
  100% { left: 150%; }
}

/* Subtitle */
.contact-container p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--neon-color);
  border-right: 0.1em solid var(--neon-color);
  white-space: nowrap;
  overflow: hidden;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  animation: blink 0.7s steps(1) infinite;
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--neon-color); }
}

/* Grid Layout */
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Contact Card */
.contact-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--neon-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.6s, box-shadow 0.3s ease;
  opacity: 0;
  transform-style: preserve-3d;
  transform: translateY(30px);
  box-shadow: var(--card-glow);
  min-height: 140px;
}

.contact-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-card:hover {
  transform: rotateY(10deg) scale(1.03);
  box-shadow: var(--hover-glow);
}

/* Platform Icon Colors */
.contact-card.instagram i { color: #e1306c; }
.contact-card.snapchat i { color: #fffc00; }
.contact-card.phone i { color: #1db954; }
.contact-card.email i { color: #0072c6; }

/* Icons */
.contact-card i {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Titles */
.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--neon-color);
  font-weight: 600;
}

/* Description Text */
.contact-card p {
  font-size: 0.9rem;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

/* Glow on Click */
.contact-card.glow {
  box-shadow: 0 0 20px 8px rgba(0, 255, 255, 0.7);
}

/* Home Button */
.home-button {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 220px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  text-decoration: none;
}

/* Glowing Button */
.glow-on-hover {
  border: none;
  outline: none;
  color: #000000;
  background: #111;
  cursor: pointer;
  position: fixed;
  border-radius: 10px;
  font-family: 'Khula', sans-serif;
  font-size: 15px;
  transition: opacity 0.3s ease-in-out;
}

.glow-on-hover:before {
  content: '';
  margin-left: 5px;
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing 20s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

.glow-on-hover:hover:before {
  opacity: 1;
}

.glow-on-hover:active {
  color: #d1d1d1;
}

.glow-on-hover:active:after {
  background: transparent;
}

.glow-on-hover:after {
  z-index: -1;
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0.9;
  left: 0;
  top: 0;
  border-radius: 10px;
  margin-left: 5px;
}

@keyframes glowing {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

/* 📱 Mobile Fixes */
@media (max-width: 680px) {
  html, body {
    font-size: 14px;
    overflow-y: auto;   /* allow scrolling */
    height: auto;       /* let body expand naturally */
    display: block;     /* disable flex centering */
    padding: 0;
    margin: 0;
  }

  #particles-js {
    position: fixed;  /* stay as background */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
  }

  .contact-container {
    position: fixed;    /* no fixed positioning */
    top: 50%;
    left: 50%;
    transform: none;
    
    width: calc(100% - 2rem);
    max-width: 420px;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
  }

  h1 {
    font-size: 1.6rem;
    line-height: 1.3;
    text-align: center;
  }

  .contact-container p {
    font-size: 0.95rem;
    white-space: normal;
    border-right: none;
    animation: none;
    text-align: center;
    max-width: 90%;
    margin: 0 auto 1.5rem auto;
  }

  .contact-links {
    grid-template-columns: 1fr; /* stack vertically */
    gap: 1rem;
    width: 100%;
  }

  .contact-card {
    min-height: auto;
    padding: 1rem;
    opacity: 1 !important;  /* ensure visible */
    transform: none !important;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
    width: 100%;
  }

  .contact-card i {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
  }

  .contact-card h3 {
    font-size: 0.95rem;
  }

  .contact-card p {
    font-size: 0.8rem;
  }

  .home-button {
    width: auto;
    padding: 0.5rem 1rem;
    height: auto;
    font-size: 14px;
    top: 10px;
    left: 10px;
    z-index: 1000;
  }
}
