/* BODY */
body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Segoe UI', sans-serif;
  background: var(--primary-dark);
  color: var(--text-light);
}

/* === APP CONTAINER === */
#root {
  width: 100%;
  min-height: 100vh;
}

/* === LOADER === */
.loader-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: var(--primary-dark);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
}

.loader {
  position: relative;
  width: 70%; max-width: 500px;
  height: 20px;
  background: var(--primary-gray);
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--accent-cyan);
}

.progress-bar {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-yellow), var(--accent-purple));
  border-radius: 10px;
}

.percentage {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-weight: bold;
  color: var(--accent-yellow);
}

/* === NAVBAR === */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gray) 100%);
  border-bottom: 2px solid var(--accent-cyan);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0,240,255,0.2);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo-container:hover {
  transform: scale(1.05);
}

.logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-cyan));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-dark);
  font-size: 1.5rem;
}

.navbar-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.nav-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.language-switch {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.language-switch:hover {
  background: var(--accent-cyan);
  color: var(--primary-dark);
  box-shadow: 0 0 15px var(--accent-cyan);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--accent-yellow);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -7px);
}

/* === NAVIGATION MENU === */
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-yellow));
  transition: width 0.3s ease;
}

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

.nav-menu a:hover::after {
  width: 100%;
}

/* === MOBILE MENU === */
.mobile-menu {
  position: fixed;
  top: 70px;
  right: -100%;
  width: 100%;
  height: calc(100vh - 70px);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-gray) 100%);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1.5rem;
  transition: right 0.3s ease;
  z-index: 99;
  border-top: 2px solid var(--accent-cyan);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1rem;
  border-left: 3px solid var(--accent-cyan);
  padding-left: 1.5rem;
  transition: all 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--accent-yellow);
  padding-left: 2rem;
}

/* === HERO SECTION === */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 0; /* height adjusted dynamically via script for strict centering */
}

#background-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

.content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px;
  width: min(92%, 900px);
  margin: 0 auto; /* force horizontal centering */
}

.menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Menu item base style (buttons/links in hero) */
.menu .menu-item {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 10px;
  border: 2px solid rgba(0,240,255,0.25);
  background: rgba(0,0,0,0.08);
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Responsive: tablet and below */
@media (max-width: 1024px) {
  .navbar { padding: 0.75rem 1rem; }
  .nav-menu { gap: 1rem; }
  .nav-menu a { font-size: 0.95rem; }
  .hamburger { display: flex; }
  .nav-menu { display: none; }
  .mobile-menu { top: 60px; }
  .content { width: 94%; }
}

/* Responsive: mobile */
@media (max-width: 768px) {
  .title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .content { width: 96%; }
  .menu { width: 100%; }
  .menu .menu-item { width: min(92%, 360px); margin: 0.4rem auto; }
  .nav-menu { display: none !important; }
  .hamburger { display: flex !important; }
  .navbar { padding: 0.6rem 0.8rem; }
  #background-canvas { opacity: 0.9; }
}

/* Small phones */
@media (max-width: 420px) {
  .title { font-size: clamp(1.6rem, 9vw, 2.2rem); }
  .menu .menu-item { padding: 0.9rem 1.4rem; }
}

/* Ensure hero centers content vertically and horizontally across devices */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* TITLU */
.title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  background: linear-gradient(270deg, var(--accent-cyan), var(--accent-yellow), var(--accent-purple), var(--accent-cyan));
  background-size: 800% 800%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientAnimation 8s ease infinite;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
}

.highlight {
  font-style: italic;
  font-weight: 900;
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeSlide 1.5s forwards 0.3s;
}

/* MENIU */
.menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  opacity: 0;
  animation: fadeSlide 1.5s forwards 0.6s;
}

.menu-item {
  padding: 1rem 2.5rem;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--accent-cyan);
  border-radius: 12px;
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  cursor: pointer;
  min-width: 250px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.menu-item:hover {
  background: var(--accent-cyan);
  color: var(--primary-dark);
  transform: scale(1.1) rotate(-1deg);
  box-shadow: 0 0 25px rgba(0,240,255,0.6);
  border-color: var(--accent-yellow);
}

/* === SECTION STYLING === */
section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  font-weight: 900;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* === CARD STYLING === */
.card {
  background: linear-gradient(135deg, rgba(26,35,50,0.8), rgba(42,55,75,0.8));
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0,240,255,0.3);
  transform: translateY(-5px);
}

/* === BUTTONS === */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-yellow));
  color: var(--primary-dark);
  box-shadow: 0 4px 15px rgba(0,240,255,0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0,240,255,0.5);
  transform: scale(1.05);
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--accent-yellow);
  color: var(--accent-yellow);
}

.btn-secondary:hover {
  background: var(--accent-yellow);
  color: var(--primary-dark);
  box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
  }

  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    right: -100%;
  }

  .title {
    font-size: 2.5rem;
  }

  .menu {
    gap: 0.8rem;
  }

  .menu-item {
    min-width: 80%;
    padding: 0.8rem 1.5rem;
  }
}

/* === ANIMAȚII EXISTENTE === */
@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes fadeSlide {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
/* === STATS & ANALYTICS SECTION === */
.stats-section {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, rgba(10,14,39,0.8) 0%, rgba(10,14,39,0.95) 100%);
  position: relative;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00f0ff, transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,240,255,0.1);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  border-top: 3px solid;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(0,240,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.stat-card:hover {
  border-color: currentColor;
  transform: translateY(-5px);
  background: rgba(255,255,255,0.05);
}

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

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-family: 'Courier New', monospace;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

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

.charts-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.chart-wrapper,
.growth-wrapper {
  background: rgba(10,14,39,0.6);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.chart-wrapper h3,
.growth-wrapper h3 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
}

canvas {
  display: block;
  max-width: 100%;
}

@media (max-width: 768px) {
  .charts-container {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1.5rem 1rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-icon {
    font-size: 2rem;
  }
}