/* 米兰电竞(MILAN ESPORTS)官方网站 - style.css */
/* UI Style: Random Modern Cyber-Glass with Gradient Accents */

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.8);
  --text-primary: #eaeaea;
  --text-secondary: #b0b0c0;
  --accent: #e94560;
  --accent2: #0f3460;
  --gradient1: linear-gradient(135deg, #1a1a2e, #16213e);
  --gradient2: linear-gradient(135deg, #e94560, #0f3460);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --transition: 0.3s ease;
}

[data-theme="light"] {
  --bg-primary: #f5f5fa;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --glass-bg: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #ff6b81;
}

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

/* ===== Header & Nav ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

header.sticky {
  box-shadow: var(--shadow);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo svg {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--glass-bg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle,
.search-toggle,
.menu-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}

.theme-toggle:hover,
.search-toggle:hover,
.menu-toggle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  z-index: 999;
  padding: 20px;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* ===== Search Overlay ===== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
}

.search-overlay.open {
  display: flex;
}

.search-box {
  background: var(--bg-secondary);
  padding: 30px;
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.1rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-results {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.search-results div {
  padding: 10px;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
}

.search-results div:hover {
  background: var(--glass-bg);
}

/* ===== Banner ===== */
.banner {
  margin-top: 70px;
  position: relative;
  height: 70vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient1);
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-content {
  text-align: center;
  z-index: 2;
  padding: 20px;
}

.banner-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  background: var(--gradient2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 30px;
}

.banner-content .btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--gradient2);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
}

.banner-content .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
}

.banner-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.banner-indicators span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background var(--transition);
}

.banner-indicators span.active {
  background: var(--accent);
}

/* ===== Sections ===== */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient2);
  margin: 10px auto 0;
  border-radius: 2px;
}

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

.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

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

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--accent);
}

.card p {
  color: var(--text-secondary);
}

.card svg {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 30px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 8px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.timeline-item h4 {
  font-size: 1.2rem;
  color: var(--accent);
}

.timeline-item p {
  color: var(--text-secondary);
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--glass-bg);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 18px;
}

/* ===== HowTo ===== */
.howto-steps {
  counter-reset: step;
}

.howto-step {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  background: var(--accent);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Articles ===== */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 25px;
  transition: transform var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
}

.article-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.article-card .meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.article-card p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.article-card .read-more {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Footer ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--text-secondary);
  margin: 0 10px;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 500;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .banner-content h1 {
    font-size: 2rem;
  }

  .banner {
    height: 50vh;
    min-height: 300px;
  }

  section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .banner-content h1 {
    font-size: 1.6rem;
  }
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.count-up {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}

.breadcrumb {
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb span {
  margin: 0 8px;
}

.map-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}