/* ── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111127;
  --text-primary: #f0f0ff;
  --text-secondary: #a0a0c0;
  --accent-purple: #a78bfa;
  --accent-indigo: #6366f1;
  --accent-pink: #f472b6;
  --accent-cyan: #22d3ee;
  --gradient-main: linear-gradient(135deg, #a78bfa 0%, #6366f1 50%, #f472b6 100%);
  --gradient-glow: linear-gradient(90deg, #a78bfa, #6366f1, #f472b6, #22d3ee, #a78bfa);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ── Language Toggle ──────────────────────────────────── */
.lang-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out 1.2s both;
}

.lang-toggle:hover {
  color: var(--text-primary);
  border-color: var(--accent-purple);
  background: rgba(167, 139, 250, 0.12);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.15);
  transform: translateY(-2px);
}

.lang-toggle:active {
  transform: translateY(0);
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.4s ease;
}

.lang-toggle:hover .lang-flag {
  transform: rotate(20deg);
}

/* ── Particle Canvas ─────────────────────────────────── */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Floating Geometric Shapes ───────────────────────── */
.floating-shapes {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  filter: blur(60px);
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-purple);
  top: -100px;
  left: -100px;
  animation: floatShape 20s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-pink);
  top: 60%;
  right: -80px;
  animation: floatShape 25s ease-in-out infinite reverse;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: var(--accent-cyan);
  bottom: -60px;
  left: 30%;
  animation: floatShape 22s ease-in-out infinite 3s;
}

.shape-4 {
  width: 200px;
  height: 200px;
  background: var(--accent-indigo);
  top: 20%;
  right: 20%;
  animation: floatShape 18s ease-in-out infinite 5s;
}

.shape-5 {
  width: 350px;
  height: 350px;
  background: var(--accent-purple);
  bottom: 10%;
  left: -50px;
  animation: floatShape 28s ease-in-out infinite 2s;
}

.shape-6 {
  width: 180px;
  height: 180px;
  background: var(--accent-pink);
  top: 10%;
  left: 50%;
  animation: floatShape 15s ease-in-out infinite 7s;
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.05); }
}

/* ── Main Content ────────────────────────────────────── */
.main-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Gear / Cog Animation ────────────────────────────── */
.icon-container {
  position: relative;
  width: 160px;
  height: 130px;
  margin-bottom: 0.5rem;
}

.gear-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgba(167, 139, 250, 0.35));
}

/* Rotation is applied via JS inline styles on the <g> elements */

/* ── Title ───────────────────────────────────────────── */
.title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.1;
}

.title-line {
  display: block;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-line-1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  animation: slideInLeft 0.8s ease-out 0.2s both;
}

.title-line-2 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  animation: slideInRight 0.8s ease-out 0.4s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ── Progress Bar ────────────────────────────────────── */
.progress-wrapper {
  width: 100%;
  max-width: 360px;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-glow);
  background-size: 300% 100%;
  border-radius: 999px;
  animation: progressGrow 3s ease-out 1s forwards, shimmer 2s linear infinite;
}

.progress-glow {
  position: absolute;
  top: -4px;
  left: 0;
  width: 0%;
  height: 14px;
  background: var(--gradient-glow);
  background-size: 300% 100%;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.5;
  animation: progressGrow 3s ease-out 1s forwards, shimmer 2s linear infinite;
}

@keyframes progressGrow {
  to { width: 65%; }
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

.progress-text {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* ── Description ─────────────────────────────────────── */
.description {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  animation: fadeInUp 1s ease-out 0.8s both;
}

/* ── Loading Dots ────────────────────────────────────── */
.loading-dots {
  display: flex;
  gap: 8px;
  animation: fadeInUp 1s ease-out 1s both;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-purple);
  animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  background: var(--accent-indigo);
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  background: var(--accent-pink);
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1.25rem 2rem;
  background: linear-gradient(to top, rgba(10, 10, 26, 0.95), transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.footer-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.github-link:hover {
  color: var(--text-primary);
  border-color: var(--accent-purple);
  background: rgba(167, 139, 250, 0.1);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.15);
  transform: translateY(-2px);
}

.github-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.github-link:hover .github-icon {
  transform: rotate(360deg);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .icon-container {
    width: 120px;
    height: 100px;
  }

  .main-content {
    padding: 1.5rem;
    gap: 1.2rem;
  }

  .description br {
    display: none;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.75rem;
  }
}
