/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@300;400;500;600&display=swap');

/* === Переменные === */
:root {
  --primary: #00ff9d;
  --primary-light: #7dffd0;
  --primary-dark: #00cc7d;
  --accent: #ff00ff;
  --text-color: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --bg-header: linear-gradient(to right, #0a0a0a, #1a1a1a);
  --bg-main: linear-gradient(135deg, #0a0a0a, #1a1a1a, #0a0a0a);
  --card-bg: rgba(0, 255, 157, 0.03);
  --border-color: rgba(0, 255, 157, 0.2);
  --shadow: 0 10px 30px rgba(0, 255, 157, 0.1);
  --shadow-hover: 0 15px 40px rgba(0, 255, 157, 0.2);
  --neon-glow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
  --btn-bg: rgba(0, 255, 157, 0.3);
}

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

html {
  font-size: 80%;
}

body {
  background: var(--bg-main);
  color: var(--text-color);
  font-family: 'Rajdhani', sans-serif;
  line-height: 1.8;
  min-height: 100vh;
  text-align: center;
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  letter-spacing: 1px;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 0;
}

header {
  background: var(--bg-header);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 5px 20px rgba(0, 255, 157, 0.1);
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, rgba(0, 255, 157, 0.1), transparent),
    linear-gradient(-45deg, rgba(255, 0, 255, 0.05), transparent);
  animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.header-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.header-title h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
  animation: titleFloat 6s ease-in-out infinite;
  letter-spacing: 2px;
  -webkit-text-stroke: 1px var(--primary);
}

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

.subtitle {
  margin-top: 20px;
  font-size: 1.4rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  gap: 50px;
}

.nav-btn,
.card-footer button,
.card-footer .go-btn {
  background: var(--btn-bg);
  border: 2px solid var(--primary);
  color: var(--text-color);
  padding: 15px 35px;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
  width: fit-content;
  text-decoration: none;
  display: inline-block;
  margin: 0 auto;
}

.nav-btn div {
  color: var(--text-color) !important;
  text-decoration: none;
}

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

.nav-btn:hover::before,
.card-footer button:hover::before,
.card-footer .go-btn:hover::before {
  left: 100%;
}

.nav-btn:hover,
.card-footer button:hover,
.card-footer .go-btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: var(--neon-glow);
  transform: translateY(-3px);
}

.cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  align-items: stretch;
}

.market-card,
.feature-item {
  flex: 1 1 calc(33.333% - 30px);
  background: var(--card-bg);
  padding: 45px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .market-card,
  .feature-item {
    flex: 1 1 100%;
  }
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.market-card::before,
.feature-item::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  z-index: -1;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.market-card:hover::before,
.feature-item:hover::before {
  opacity: 1;
}

.market-card:hover,
.feature-item:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.card-header h2,
.feature-item h3 {
  font-family: 'Orbitron', serif;
  color: var(--primary);
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  font-size: 2.2rem;
  text-shadow: 0 0 10px var(--primary);
}

.card-header h2::after,
.feature-item h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.market-card:hover .card-header h2::after,
.feature-item:hover h3::after {
  transform: scaleX(1);
}

footer {
  text-align: center;
  padding: 70px 0;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  position: relative;
  margin-top: 50px;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    top: 80px;
    right: -200%;
    flex-direction: column;
    gap: 25px;
    background: rgba(10, 10, 10, 0.95);
    padding: 40px;
    border-left: 2px solid var(--primary);
    border-radius: 10px 0 0 10px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 1000;
  }


.header-title {
    width: 90%;
    margin: 0 auto;
    text-align: center;
  }

  .header-title h1 {
    font-size: 2rem; /* уменьшено в 2 раза */
    text-align: center;
    word-break: break-word;
  }

  .subtitle {
    font-size: 1.08rem; /* уменьшено в 1.3 раза */
    text-align: center;
    word-break: break-word;
  }
  
  .header-nav.show {
    right: 0;
  }

  .menu-toggle {
    display: block;
    margin-top: 20px;
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
  }

  .menu-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
  }
}
