/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: rgb(20, 20, 20);
  color: #e0e0e0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background overlays and animations for visual effects */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(123, 44, 191, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(123, 44, 191, 0.1) 0%, transparent 30%),
    linear-gradient(45deg, rgb(20, 20, 20) 0%, rgb(30, 30, 30) 100%);
  z-index: -1;
}

.grid-pattern {
  position: fixed;
  top: 0; left: 0;
  width: 200%; height: 200%;
  background-image: 
    linear-gradient(rgba(140, 80, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 80, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: moveGrid 120s linear infinite;
  z-index: -1;
  opacity: 0.5;
}

.light-traces {
  position: fixed;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
}

.light-trail {
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(160, 100, 255, 0.4) 50%, transparent 100%);
  animation: lightTrail 10s linear infinite;
  opacity: 0.7;
  box-shadow: 0 0 15px rgba(160, 100, 255, 0.3);
}

.bass-glow {
  position: fixed;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(160, 100, 255, 0.2) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

@keyframes moveGrid {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}

@keyframes lightTrail {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Positioning for animated light trails */
.light-trail:nth-child(1) { top: 20%; animation-delay: 0s; }
.light-trail:nth-child(2) { top: 40%; animation-delay: 2s; }
.light-trail:nth-child(3) { top: 60%; animation-delay: 4s; }
.light-trail:nth-child(4) { top: 80%; animation-delay: 6s; }

.grid-glow {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(123, 44, 191, 0.08) 0%, transparent 20%);
  animation: flow 20s linear infinite;
  z-index: -1;
}

@keyframes flow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Controls for background music */
.music-controls {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 1000;
}

.music-toggle {
  background: rgba(160, 100, 255, 0.8);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(160, 100, 255, 0.3);
}
.music-toggle:hover {
  background: rgb(180, 120, 255);
}

/* ================================
    Updated: Use flexbox for the cards container
================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

/* Header styles */
.header {
  text-align: center;
  padding: 4rem 0;
  margin-bottom: 2rem;
  position: relative;
}
.header h1 {
  font-size: 2.5rem;
  color: #d8c3ff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.header p {
  color: #a0a0a0;
  font-size: 1.1rem;
}

/* Updated: Use flexbox for the cards container to center cards */
.cards-container {
  display: flex;
  flex-wrap: wrap; /* Allow multiple rows */
  justify-content: center; /* Center all cards horizontally in the container */
  gap: 2rem;
  padding: 2rem 0;
}

/* Card styles */
.card {
  background: rgba(30, 30, 30, 0.95);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(123, 44, 191, 0.15);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  min-height: 350px;
  max-width: 300px; /* optional */
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center internal content vertically */
  align-items: center;     /* Center internal content horizontally */
  margin: auto; /* optional, helps if needed */
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(123, 44, 191, 0.4);
}

/* icon styles inside cards */
.telegram-card i {
  color: #0088cc;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.signal-icon {
  width: 3rem; height: 3rem; margin: 0 auto 1rem; display: block;
}
.signal-card .cls-1 { fill: #3a76f0; }
.signal-card .cls-2 { fill: #fff; }
.contact-card i {
  color: rgb(123, 44, 191);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.discord-card i {
  color: #5865F2;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.card h2 {
  color: #d8c3ff;
  margin-bottom: 1rem;
}
.card p {
  color: #a0a0a0;
  margin-bottom: 1.5rem;
}
/* Button styles */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: rgb(123, 44, 191);
  color: white;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn:hover {
  background: rgb(143, 64, 211);
  box-shadow: 0 4px 15px rgba(123, 44, 191, 0.3);
}
.discord-btn {
  background: #5865F2;
}
.discord-btn:hover {
  background: #4752C4;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

/* Footer styles */
.footer {
  padding: 2.5rem 0 1.5rem;
  background: rgba(15, 15, 15, 0.98);
  border-top: 1px solid rgba(123, 44, 191, 0.2);
  margin-top: auto;
  width: 100%;
  backdrop-filter: blur(5px);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-brand {
  flex: 1;
}

.footer-title {
  color: #d8c3ff;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.footer-tagline {
  color: #909090;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 400px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(123, 44, 191, 0.3);
  border-radius: 20px;
  text-align: center;
}
.footer-contact:hover {
  color: #d8c3ff;
  border-color: rgba(123, 44, 191, 0.6);
}

.copyright {
  margin-top: 2rem;
  text-align: center;
  color: #707070;
  font-size: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .cards-container {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }
}