:root {
  --primary: #ff69b4;
  --secondary: #ff1493;
  --accent: #ff5555;
  --bg-dark: #0a0a12;
  --bg-card: rgba(20, 20, 35, 0.6);
  --text-main: #ffffff;
  --text-muted: #8b9bb4;
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-hover-shadow: 0 0 30px rgba(255, 105, 180, 0.2);
  --scroll-padding-top: 100px;
}

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

html {
  scroll-padding-top: var(--scroll-padding-top);
  scroll-behavior: smooth;
}

body {
  font-family: 'Exo 2', 'Noto Sans SC', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 20, 147, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 105, 180, 0.15) 0%, transparent 40%),
    linear-gradient(180deg, rgba(10, 10, 18, 0.9) 0%, rgba(10, 10, 18, 1) 100%);
}

.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: top center;
  opacity: 0.5;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 500px; }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.header {
  text-align: center;
  margin-bottom: 60px;
  padding: 40px 0;
  position: relative;
}

.logo-text {
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(255, 105, 180, 0.3);
  position: relative;
  display: inline-block;
}

.logo-text::after {
  content: 'TZ E-SPORTS';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(20px);
  opacity: 0.5;
  z-index: -1;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: 10px;
}

.nav-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 50px;
  position: sticky;
  top: 20px;
  z-index: 100;
  backdrop-filter: blur(10px);
  padding: 10px;
  border-radius: 50px;
  background: rgba(10, 10, 18, 0.7);
  border: 1px solid var(--glass-border);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.2);
  border: 1px solid rgba(255, 105, 180, 0.3);
}

.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 101;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(10, 10, 18, 0.7);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card.visible:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 105, 180, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.7;
}

.card-header {
  padding: 25px 30px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 105, 180, 0.2);
}

.card-icon {
  font-size: 2rem;
  margin-right: 15px;
  filter: drop-shadow(0 0 10px rgba(255, 105, 180, 0.3));
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-body {
  padding: 25px 30px;
  flex-grow: 1;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 105, 180, 0.1);
  cursor: pointer;
}

.link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 105, 180, 0.4);
  transform: translateX(5px);
}

.link-item .arrow {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--primary);
}

.link-item:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

.link-emoji {
  margin-right: 12px;
  font-size: 1.2rem;
}

.image-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 12px 12px;
  margin-top: -5px;
  position: relative;
}

.image-container::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 0;
}

@keyframes spin {
  to { transform: translateX(-50%) rotate(360deg); }
}

.image-container img {
  width: 100%;
  display: block;
  padding: 10px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  min-height: 150px;
  background: inherit;
}

.link-item.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  border-radius: 12px 12px 0 0;
}

.link-item.active .arrow {
  opacity: 1;
  transform: rotate(90deg);
  color: var(--primary);
}

.image-container.load-failed::before {
  display: none;
}

.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
  min-height: 150px;
  width: 100%;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

.error-alt {
  font-size: 0.8rem;
  margin-top: 5px;
  opacity: 0.7;
}

.contact-wrapper {
  text-align: center;
  margin-top: 80px;
  padding-bottom: 40px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 60px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.contact-btn::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px; right: 2px; bottom: 2px;
  background: var(--bg-dark);
  border-radius: 48px;
  z-index: -1;
  transition: all 0.3s ease;
}

.contact-btn span {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(255, 20, 147, 0.6);
}

.contact-btn:hover::before {
  background: transparent;
}

.contact-btn:hover span {
  -webkit-text-fill-color: #000;
}

.footer {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-muted);
}

.footer p {
  margin: 5px 0;
}

.copyright {
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-slogan {
  font-size: 0.8rem;
  opacity: 0.6;
  letter-spacing: 1px;
}

.beian {
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
  color: #666;
}
.beian a {
  color: #666;
  text-decoration: none;
}

.card.delta-force { --primary: #ff4d4d; }
.card.lol        { --primary: #00a8ff; }
.card.pubg       { --primary: #ffaa00; }
.card.valorant   { --primary: #ff4655; }

@media (max-width: 768px) {
  .logo-text {
    font-size: 2.5rem;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
  .nav-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    border-radius: 0;
    padding: 80px 20px;
    background: rgba(10, 10, 18, 0.95);
  }
  .nav-bar.active {
    display: flex;
  }
  .mobile-nav-toggle {
    display: flex;
  }
}