/* Hide menu-toggle on desktop */
.menu-toggle {
  display: none;
}

/* Language toggle button */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.1);
  border: 2px solid #a855f7;
  color: #a855f7;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-left: 20px;
}

.lang-toggle:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.lang-toggle i {
  font-size: 1.1rem;
}

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

body { 
  font-family:'Roboto',sans-serif; 
  background: #000000;
  color:#e0e0ff; 
  line-height:1.6;
  overflow-x: hidden;
  position: relative;
}

/* Futuristic circuit board pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    /* Vertical tech lines */
    linear-gradient(90deg, transparent 0%, transparent calc(50% - 1px), rgba(139, 92, 246, 0.1) calc(50% - 1px), rgba(139, 92, 246, 0.1) calc(50% + 1px), transparent calc(50% + 1px), transparent 100%),
    /* Horizontal tech lines */
    linear-gradient(0deg, transparent 0%, transparent calc(50% - 1px), rgba(168, 85, 247, 0.08) calc(50% - 1px), rgba(168, 85, 247, 0.08) calc(50% + 1px), transparent calc(50% + 1px), transparent 100%),
    /* Diagonal circuit pattern */
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(139, 92, 246, 0.03) 35px, rgba(139, 92, 246, 0.03) 37px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(168, 85, 247, 0.03) 35px, rgba(168, 85, 247, 0.03) 37px);
  background-size: 200px 200px, 200px 200px, 70px 70px, 70px 70px;
  animation: circuitMove 30s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

@keyframes circuitMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(200px, 200px); }
}

/* Glowing nodes and connection points */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    /* Glowing nodes at intersections */
    radial-gradient(circle at 15% 20%, rgba(168, 85, 247, 0.4) 2px, transparent 3px),
    radial-gradient(circle at 85% 25%, rgba(139, 92, 246, 0.3) 2px, transparent 3px),
    radial-gradient(circle at 25% 75%, rgba(168, 85, 247, 0.35) 2px, transparent 3px),
    radial-gradient(circle at 75% 80%, rgba(139, 92, 246, 0.3) 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.25) 2px, transparent 3px),
    radial-gradient(circle at 10% 60%, rgba(139, 92, 246, 0.2) 2px, transparent 3px),
    radial-gradient(circle at 90% 50%, rgba(168, 85, 247, 0.3) 2px, transparent 3px),
    /* Large ambient glows */
    radial-gradient(ellipse at 30% 40%, rgba(139, 92, 246, 0.08), transparent 40%),
    radial-gradient(ellipse at 70% 60%, rgba(168, 85, 247, 0.06), transparent 40%);
  background-size: 400px 400px, 350px 350px, 300px 300px, 380px 380px, 250px 250px, 320px 320px, 360px 360px, 800px 800px, 800px 800px;
  background-position: 0 0, 50px 80px, 120px 200px, 80px 120px, 180px 60px, 40px 140px, 200px 180px, 0 0, 0 0;
  animation: nodesFloat 40s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.7;
  z-index: 0;
}

@keyframes nodesFloat {
  0%, 100% { 
    transform: translate(0, 0);
    opacity: 0.7;
  }
  25% { 
    transform: translate(-20px, -30px);
    opacity: 0.9;
  }
  50% { 
    transform: translate(-40px, -15px);
    opacity: 0.6;
  }
  75% { 
    transform: translate(-20px, -25px);
    opacity: 0.85;
  }
}

/* Topbar - Futuristic glass morphism */
.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 60px;
  position:sticky;
  top:0;
  z-index:100;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent) 1;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
}

.topbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.8), transparent);
  animation: scanline 3s linear infinite;
}

@keyframes scanline {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.logo { 
  font-family:'Sora','Roboto',sans-serif; 
  font-size:1.45rem; 
  font-weight:700; 
  color:#a855f7;
  text-transform: none;
  letter-spacing: 3px;
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7, transparent);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.logo span { 
  color:#e0e0ff;
  font-weight: 300;
  letter-spacing: 2px;
}

nav a { 
  color:#c4b5fd; 
  text-decoration:none; 
  margin-left:30px; 
  font-weight:500; 
  font-size:0.95rem; 
  transition:all 0.3s ease;
  position: relative;
  padding: 5px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #a855f7, #c084fc);
  transition: width 0.3s ease;
}

nav a:hover { 
  color:#a855f7; 
}

nav a:hover::after {
  width: 100%;
}

/* Hero - Futuristic holographic effect */
.hero {    
  position: relative;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #000;
}

.hero-bg { 
  position:absolute;
  top:0; left:0; width:100%; height:100%;
  background: 
    linear-gradient(135deg, rgba(10,5,20,0.98) 0%, rgba(5,0,15,0.95) 50%, rgba(10,5,20,0.98) 100%);
  z-index: 0;
}

/* Subtle grid pattern */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.4;
}

/* Minimal ambient glow */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(139, 92, 246, 0.08), transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(168, 85, 247, 0.06), transparent 60%);
  filter: blur(80px);
}

.hero-content { 
  position:relative; 
  z-index:2; 
  max-width:800px;
  padding: 40px;
}

.hero h1 { 
  font-family:'Bebas Neue','Roboto',sans-serif; 
  font-size:4rem; 
  color:#e0e0ff;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom:30px;
  position: relative;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero h1::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), transparent);
}

.hero h1::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), transparent);
}

.topbar a {
    text-decoration: none;
}

/* Buttons - Futuristic holographic */
.btn { 
  display:inline-block; 
  padding:18px 40px; 
  border-radius:0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  text-decoration:none; 
  color:#fff; 
  font-weight:700; 
  margin:15px; 
  transition:all 0.4s ease;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.95rem;
  overflow: hidden;
  border: 2px solid #a855f7;
  background: rgba(168, 85, 247, 0.1);
}

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

.btn:hover::before {
  left: 100%;
}

.btn-neon { 
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.3));
  box-shadow:
    0 0 5px rgba(168, 85, 247, 0.5),
    0 0 10px rgba(168, 85, 247, 0.4),
    0 0 20px rgba(168, 85, 247, 0.3),
    inset 0 0 20px rgba(168, 85, 247, 0.1);
  border: 2px solid #a855f7;
}

.btn-neon:hover { 
  transform:translateY(-4px) scale(1.05); 
  box-shadow:
    0 0 10px rgba(168, 85, 247, 0.8),
    0 0 20px rgba(168, 85, 247, 0.6),
    0 0 40px rgba(168, 85, 247, 0.4),
    inset 0 0 30px rgba(168, 85, 247, 0.2);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(168, 85, 247, 0.5));
}

.btn-alt { 
  background: rgba(100, 100, 120, 0.2);
  border: 2px solid #6b7280;
}

.btn-alt:hover { 
  background: rgba(120, 120, 140, 0.3);
  border-color: #9ca3af;
  box-shadow: 0 0 20px rgba(156, 163, 175, 0.3);
}

.btn-discord {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(114, 137, 218, 0.3));
  border: 2px solid #5865f2;
}

.btn-discord:hover {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.5), rgba(114, 137, 218, 0.5));
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
}

/* Sections with futuristic dark backgrounds */
section { 
  padding:120px 30px; 
  text-align:center; 
  position:relative; 
  z-index:1;
  background: linear-gradient(180deg, rgba(5,0,15,0.95), rgba(10,0,20,0.95));
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), transparent);
}

section:nth-of-type(even) { 
  background: linear-gradient(180deg, rgba(10,0,20,0.95), rgba(5,0,15,0.95));
}

section:nth-of-type(even)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05), transparent 70%);
  pointer-events: none;
}

.section-title { 
  font-family:'Bebas Neue','Roboto',sans-serif; 
  font-size:3rem; 
  color:#e0e0ff;
  margin-bottom:60px;
  text-transform: uppercase;
  letter-spacing: 4px;
  position: relative;
  display: inline-block;
}

.section-title::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -80px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7);
}

.section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -80px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #a855f7, transparent);
}

/* Cards - Futuristic hexagonal design */
.cards { 
  display:flex; 
  flex-wrap:wrap; 
  gap:30px; 
  justify-content:center;
  perspective: 1000px;
}

.card {
  background: linear-gradient(135deg, rgba(20,15,35,0.8), rgba(30,20,50,0.8));
  padding:30px;
  width:280px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color:#e0e0ff;
  border: 1px solid rgba(168, 85, 247, 0.3);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  overflow: hidden;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(30px) rotateX(10deg);
}

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

.card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(168, 85, 247, 0.5), transparent);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.card:hover::after {
  left: 100%;
}

.card:hover::before {
  opacity: 1;
}

.card:hover { 
  background: linear-gradient(135deg, rgba(30,20,50,0.9), rgba(40,25,65,0.9));
  transform:translateY(-10px) scale(1.03);
  box-shadow:
    0 20px 40px rgba(168, 85, 247, 0.3),
    inset 0 0 20px rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.6);
}

.card h3 { 
  color:#a855f7; 
  font-size:2rem; 
  margin-bottom:15px;
  font-weight: 700;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
}

.card p, .card span { 
  color:#c4b5fd;
  line-height: 1.8;
}

/* FAQ specific styling for better text handling */
.faq .card {
  width: 300px;
  min-height: auto;
  padding: 25px;
}

.faq .card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.faq .card p {
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Contact */
#contact {
  background: linear-gradient(180deg, rgba(5,0,15,0.98), rgba(15,0,30,0.98));
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.1), transparent 60%);
  pointer-events: none;
}

#contact p {
  max-width: 700px;
  margin: 20px auto;
  line-height: 1.9;
  font-size: 1.1rem;
  color: #c4b5fd;
}

/* Footer - Futuristic */
footer { 
  padding:40px; 
  background: linear-gradient(180deg, rgba(0,0,0,0.95), rgba(5,0,10,1));
  text-align:center; 
  font-size:0.9rem; 
  color:#8b5cf6;
  border-top: 1px solid rgba(168, 85, 247, 0.3);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

/* Responsivita */
@media(max-width:768px){
  
  body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .menu-toggle {
    display: block;
  }

  /* Mobile nav uses max-height/opacity for smooth roll-down animation */
  nav {
    display: flex;
    flex-direction: column;
    position: static;
    width: 100%;
    background: rgba(10,5,20,0.98);
    backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    z-index: 999;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    border-top: 1px solid rgba(168, 85, 247, 0.3);
  }

  nav.active {
    max-height: 100vh;
    opacity: 1;
    pointer-events: auto;
  }

  nav a {
    margin: 15px 0;
    font-size: 1.3rem;
    padding: 12px 25px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    width: 100%;
    text-align: center;
  }

  nav a::after {
    display: none;
  }

  .lang-toggle {
    margin: 15px 0;
    padding: 12px 20px;
    font-size: 1.1rem;
    width: auto;
    min-width: 200px;
    justify-content: center;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    clip-path: none !important;
    border: 1px solid #a855f7;
    border-radius: 4px;
    box-sizing: border-box;
  }

  .cards { 
    flex-direction:column; 
    align-items:center; 
    gap:25px; 
  }

  .card {
    width: 90%;
    max-width: 350px;
    /* Karty zobrazit hned na mobilu bez animace */
    opacity: 1 !important;
    transform: translateY(0) rotateX(0) !important;
  }

  /* Konzistentní výška pro všechny karty v sekci "Jak to funguje" */
  .how .card {
    min-height: 180px;
  }

  /* Konzistentní výška pro všechny karty v sekci FAQ */
  .faq .card {
    min-height: 200px;
  }

  /* Konzistentní výška pro všechny karty v sekci "Co říkají hráči" */
  .testimonials .card {
    min-height: 180px;
  }

  .topbar {
    flex-direction:row;
    align-items:center;
    padding:15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    justify-content:space-between;
    flex-wrap: wrap;
    will-change: auto;
  }

  .logo {
    font-size:0.95rem;
    margin-bottom:0;
    display:flex;
    align-items:center;
    letter-spacing: 1px;
  }

  .logo span {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
  }

  .logo img {
    height: 22px;
  }

  .logo::after {
    display: none;
  }

  .menu-toggle {
    display:block;
    background:none;
    border: 2px solid #a855f7;
    color:#a855f7;
    font-size:1.5rem;
    cursor:pointer;
    padding: 8px 12px;
    margin-left:16px;
    margin-top:0;
    align-self:center;
    z-index:10001;
    transition: all 0.3s ease;
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
  }

  .menu-toggle:hover {
    background: rgba(168, 85, 247, 0.2);
  }

  .hero {
    margin-top: 70px; /* Aby nebyl hero zakrytý fixním headerem */
    height: 60vh;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero h1::before,
  .hero h1::after {
    width: 80%;
  }

  section {
    padding: 80px 20px;
  }

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

  .section-title::before,
  .section-title::after {
    display: none;
  }

  .btn {
    padding: 15px 30px;
    font-size: 0.9rem;
  }
  
  /* Vypnout animace na pozadí pro lepší výkon na mobilu */
  body::before,
  body::after,
  .hero-bg::before,
  .hero-bg::after {
    animation: none !important;
  }
}
