* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Orbitron', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

.app-container {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Scanlines effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: scanline-move 10s linear infinite;
}

@keyframes scanline-move {
  0% { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

/* Star field */
.star-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

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

/* Grid background */
.grid-bg {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: 
    linear-gradient(transparent 0%, rgba(255, 0, 255, 0.1) 100%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 50px,
      rgba(255, 0, 255, 0.1) 50px,
      rgba(255, 0, 255, 0.1) 51px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 50px,
      rgba(255, 0, 255, 0.1) 50px,
      rgba(255, 0, 255, 0.1) 51px
    );
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom;
  pointer-events: none;
  z-index: 0;
}

/* Main content */
.main-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Control bar */
.control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 30px;
  padding-top: 20px;
}

.retro-btn {
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.retro-btn:hover {
  background: rgba(255, 0, 255, 0.2);
  box-shadow: 0 0 20px currentColor, inset 0 0 20px rgba(255, 0, 255, 0.2);
  transform: scale(1.05);
}

.retro-select {
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 10px 20px;
  background: rgba(10, 10, 26, 0.9);
  border: 2px solid;
  cursor: pointer;
  appearance: none;
  min-width: 150px;
}

.retro-select option {
  background: #0a0a1a;
  color: #ff00ff;
}

/* Header section */
.header-section {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.header-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.profile-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
  cursor: pointer;
}

.profile-glow {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ff00ff;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.profile-container:hover .profile-image {
  transform: scale(1.1);
}

.neon-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  animation: flicker 4s infinite;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.8;
  }
}

.username {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  margin-bottom: 10px;
  text-shadow: 0 0 10px currentColor;
}

.tagline {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  font-style: italic;
  text-shadow: 0 0 10px currentColor;
}

/* Links grid */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 700px;
}

.link-card {
  background: rgba(10, 10, 26, 0.9);
  border: 2px solid;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  position: relative;
  overflow: hidden;
}

.link-card.visible {
  animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.link-card:hover::before {
  left: 100%;
}

.link-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 0 30px currentColor, inset 0 0 30px rgba(255, 0, 255, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: auto;
}

.card-icon {
  font-size: 2rem;
}

.status-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: dot-pulse 1.5s ease-in-out infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.card-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 15px;
  text-shadow: 0 0 10px currentColor;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 30px 0;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 1rem;
}

.footer a {
  text-decoration: underline;
  transition: all 0.3s ease;
}

.footer a:hover {
  text-decoration: none;
}

/* Glitch effect */
.glitching {
  animation: glitch 0.3s infinite;
}

.glitching .neon-name {
  animation: text-glitch 0.1s infinite;
}

@keyframes glitch {
  0% { transform: translate(0); filter: hue-rotate(0deg); }
  20% { transform: translate(-5px, 5px); filter: hue-rotate(90deg); }
  40% { transform: translate(5px, -5px); filter: hue-rotate(180deg); }
  60% { transform: translate(-5px, -5px); filter: hue-rotate(270deg); }
  80% { transform: translate(5px, 5px); filter: hue-rotate(360deg); }
  100% { transform: translate(0); filter: hue-rotate(0deg); }
}

@keyframes text-glitch {
  0% { text-shadow: 2px 0 red, -2px 0 cyan; }
  25% { text-shadow: -2px 0 red, 2px 0 cyan; }
  50% { text-shadow: 2px 2px red, -2px -2px cyan; }
  75% { text-shadow: -2px 2px red, 2px -2px cyan; }
  100% { text-shadow: 2px 0 red, -2px 0 cyan; }
}

/* Max synthwave mode */
.max-synthwave .scanlines {
  opacity: 0.8;
}

.max-synthwave .star {
  animation-duration: 0.5s;
}

.max-synthwave .profile-image {
  animation: max-float 0.5s ease-in-out infinite;
}

@keyframes max-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Responsive */
@media (max-width: 640px) {
  .neon-name {
    font-size: 1.8rem;
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .profile-container {
    width: 120px;
    height: 120px;
  }
  
  .control-bar {
    flex-direction: column;
    align-items: center;
  }
  
  .retro-btn, .retro-select {
    width: 100%;
    max-width: 200px;
  }
  
  .links-grid {
    grid-template-columns: 1fr;
  }
  
  .card-label {
    font-size: 0.75rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}