/* ==========================================================================
   Crypto Raviya - Bitcoin Education Platform
   Cyberpunk / Web3 Aesthetic
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #05050f;
  --bg-panel: rgba(10, 15, 30, 0.7);
  --cyan-glow: #00f3ff;
  --blue-glow: #0d47a1;
  --purple-glow: #8a2be2;
  --text-main: #e0e0e0;
  --text-muted: #8b9bb4;
  --border-neon: rgba(0, 243, 255, 0.3);
  --success: #00e676;
  --danger: #ff1744;
  
  /* Typography */
  --font-sinhala: 'Noto Sans Sinhala', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', Courier, monospace;
  
  /* Metrics */
  --sidebar-width: 280px;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sinhala);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
}

/* Cyber Background Elements */
.cyber-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: 
    linear-gradient(rgba(5, 5, 15, 0.9), rgba(5, 5, 15, 0.9)),
    url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M0 39.5h40M39.5 0v40" stroke="rgba(0, 243, 255, 0.05)" stroke-width="1"/></svg>');
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  z-index: -1;
}

.orb-1 { top: 10%; left: 10%; width: 300px; height: 300px; background: var(--cyan-glow); }
.orb-2 { bottom: 10%; right: 10%; width: 400px; height: 400px; background: var(--purple-glow); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.text-cyan { color: var(--cyan-glow); text-shadow: 0 0 10px rgba(0, 243, 255, 0.4); }
.text-purple { color: var(--purple-glow); }

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar / Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--border-neon);
  height: 100vh;
  position: fixed;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  z-index: 100;
  transition: transform 0.3s ease;
}

.brand {
  text-align: center;
  margin-bottom: 2rem;
}

.brand img {
  max-width: 150px;
  height: auto;
  margin-bottom: 0.5rem;
  border-radius: 8px;
}

.brand h2 {
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 5px var(--cyan-glow);
}

.search-box {
  margin-bottom: 1.5rem;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-neon);
  border-radius: var(--border-radius);
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-links li a {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.9rem;
}

.nav-links li a:hover, .nav-links li a.active {
  background: rgba(0, 243, 255, 0.1);
  color: var(--cyan-glow);
  border-left: 3px solid var(--cyan-glow);
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
}

/* Progress System */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-neon);
  border-radius: var(--border-radius);
  padding: 1rem 2rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(10px);
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 60%;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--cyan-glow);
  width: 0%;
  box-shadow: 0 0 10px var(--cyan-glow);
  transition: width 0.5s ease;
}

#progressText {
  color: #ffffff !important;
  font-weight: bold;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  max-width: 250px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #fff, var(--cyan-glow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--cyan-glow);
  border: 1px solid var(--cyan-glow);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.btn-primary {
  background: var(--cyan-glow);
  color: #000;
}
.btn-primary:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 20px var(--cyan-glow);
}

/* Topic Cards */
.topic-section {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.topic-section:hover {
  border-color: var(--border-neon);
  transform: translateY(-2px);
}

.topic-number {
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 8rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
}

.topic-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.badge {
  background: rgba(0, 243, 255, 0.1);
  color: var(--cyan-glow);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  border: 1px solid var(--border-neon);
}

.topic-content {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.topic-content p {
  margin-bottom: 1rem;
}
.topic-content ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.topic-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-complete {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-color: var(--text-muted);
  color: var(--text-muted);
}
.btn-complete.completed {
  border-color: var(--success);
  color: var(--success);
  background: rgba(0, 230, 118, 0.1);
}

/* Interactive Demos / Visualizers */
.demo-box {
  background: rgba(10, 15, 30, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-neon);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  position: relative;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
  overflow: hidden;
}

.demo-box:hover {
  box-shadow: 0 0 20px var(--border-neon);
  transform: translateY(-2px);
}

.demo-box p, .demo-box li, .demo-box ol, .demo-box span:not(.code-key):not(.code-value):not(.code-hash) {
  font-family: var(--font-sinhala);
  white-space: normal;
}

.demo-header {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  border-bottom: 1px dashed #333;
  padding-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.code-line {
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.code-key { color: #ff79c6; }
.code-value { color: #f1fa8c; }
.code-hash { color: #50fa7b; font-size: 0.9em;}

/* PoW Simulator */
.pow-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.hash-output-container {
  background: rgba(255,255,255,0.05);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 4px;
}
.hash-success {
  color: var(--success);
  text-shadow: 0 0 5px var(--success);
}
.hash-error {
  color: var(--danger);
}

/* Blockchain Simulator */
.blockchain-demo {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}
.block-card {
  background: rgba(10, 15, 30, 0.9);
  border: 2px solid var(--border-neon);
  border-radius: 8px;
  padding: 1rem;
  width: 100%;
  max-width: 500px;
  transition: all 0.3s ease;
  overflow-x: auto;
  white-space: nowrap;
}
.block-card::-webkit-scrollbar {
  height: 6px;
}
.block-card::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}
.block-card::-webkit-scrollbar-thumb {
  background: var(--cyan-glow);
  border-radius: 4px;
}
.block-card.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.3);
}
.block-card input {
  background: rgba(0,0,0,0.5);
  border: 1px solid #333;
  color: #fff;
  padding: 0.5rem;
  width: 100%;
  margin: 0.5rem 0;
  font-family: var(--font-mono);
}

.chain-link {
  color: var(--cyan-glow);
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; text-shadow: 0 0 10px var(--cyan-glow); }
  100% { opacity: 0.5; }
}

/* Footer / Dashboard */
.learning-dashboard {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-neon);
  margin-top: 4rem;
}

.dashboard-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.stat-box h3 {
  font-size: 3rem;
  color: var(--cyan-glow);
  margin-bottom: 0.5rem;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  border-top: 1px solid #222;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--cyan-glow);
  color: #000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 1000;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: translateY(-5px);
}

/* Mobile Elements & Overlay */
.mobile-menu-btn {
  display: none;
}

.sidebar-mobile-header {
  display: none;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-glow);
}

/* Responsive: Mobile & Tablet */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: 310px;
    max-width: 85vw;
    background: rgba(8, 12, 24, 0.98);
    backdrop-filter: blur(25px);
    border-right: 1px solid var(--border-neon);
    box-shadow: none;
    z-index: 9999;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 243, 255, 0.25);
  }

  .sidebar-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  }

  .sidebar-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--cyan-glow);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .sidebar-close-btn:hover {
    background: rgba(255, 23, 68, 0.25);
    border-color: var(--danger);
    color: var(--danger);
    transform: rotate(90deg);
  }

  .main-content {
    margin-left: 0;
    padding: 1.25rem;
    padding-top: 1.25rem;
    width: 100%;
    max-width: 100vw;
  }

  /* Sleek Floating Capsule Mobile Toggle Button */
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: 24px;
    left: 20px;
    z-index: 9990;
    background: rgba(10, 15, 30, 0.94);
    border: 1px solid var(--cyan-glow);
    color: #fff;
    padding: 11px 18px;
    border-radius: 30px;
    font-family: var(--font-sinhala);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 25px rgba(0, 243, 255, 0.35);
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-menu-btn i {
    color: var(--cyan-glow);
    font-size: 1.1rem;
  }

  .mobile-menu-btn:hover, .mobile-menu-btn:active {
    background: rgba(0, 243, 255, 0.2);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 243, 255, 0.5);
  }

  .top-bar {
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
  }

  .progress-info {
    width: 100%;
  }

  .progress-stats {
    width: 100%;
    justify-content: space-between;
  }

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

  .dashboard-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background: var(--border-neon);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--bg-dark);
  border: 4px solid var(--cyan-glow);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.left {
  left: 0;
}

.right {
  left: 50%;
}

.right::after {
  left: -10px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: rgba(0,0,0,0.5);
  position: relative;
  border-radius: 6px;
  border: 1px solid var(--border-neon);
}

@media screen and (max-width: 600px) {
  .timeline::after {
  left: 31px;
  }
  
  .timeline-item {
  width: 100%;
  padding-left: 70px;
  padding-right: 25px;
  }
  
  .timeline-item::after {
  left: 21px;
  }
  
  .right {
  left: 0%;
  }
}

/* Utility Classes */
.d-none { display: none !important; }

/* SPA Cyber Animation */
@keyframes cyber-fade-in {
  0% { opacity: 0; transform: translateY(10px) scale(0.98); filter: blur(4px); }
  50% { opacity: 1; transform: translateY(-2px) scale(1.01); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.active-section {
  animation: cyber-fade-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Quiz UI */
.quiz-btn {
  width: 100%;
  max-width: 500px;
  padding: 1rem;
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid var(--border-neon);
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 1.1rem;
}
.quiz-btn:hover {
  background: rgba(0, 243, 255, 0.2);
  transform: translateX(5px);
}
.quiz-btn.correct {
  background: rgba(0, 230, 118, 0.3);
  border-color: var(--success);
}
.quiz-btn.incorrect {
  background: rgba(255, 23, 68, 0.3);
  border-color: var(--danger);
}

/* Certificate Template (16:9 for PDF generation) */
/* We define it precisely for A4 Landscape or 16:9 ratio */
#certificateTemplate {
  position: absolute;
  top: -9999px; /* Hide offscreen */
  left: 0;
  background: #05050f;
  width: 1280px;
  height: 720px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* fallback clean font for PDF */
  padding: 0;
  box-sizing: border-box;
}

.cert-container {
  position: relative;
  width: 1180px;
  height: 620px;
  background: #0D1117;
  border: 4px solid #fff;
  padding: 50px;
  text-align: center;
  color: #fff;
  box-sizing: border-box;
}

.cert-border {
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 2px dashed rgba(255,255,255,0.3);
  pointer-events: none;
}

.cert-logo {
  max-width: 140px;
  margin-bottom: 10px;
}

.cert-title {
  font-size: 2.5rem;
  letter-spacing: 5px;
  margin: 10px 0;
  text-transform: uppercase;
}

.cert-subtitle {
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: #00F2FE !important;
  margin-bottom: 20px;
}

.cert-name {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  display: inline-block;
  padding: 0 40px 10px;
}

.cert-text {
  font-size: 1.2rem;
  color: #F8FAFC !important;
  margin-bottom: 15px;
}

.cert-score {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.cert-tier {
  font-size: 2.2rem;
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 15px;
}
.cert-tier.gold { color: #ffd700; text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.cert-tier.platinum { color: #e5e4e2; text-shadow: 0 0 20px rgba(229, 228, 226, 0.5); }
.cert-tier.silver { color: #c0c0c0; text-shadow: 0 0 20px rgba(192, 192, 192, 0.5); }

.cert-footer {
  position: absolute;
  bottom: 80px;
  left: 50px;
  right: 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 20px;
  color: #F59E0B !important;
}

.cert-footer span, .cert-footer div {
  color: #F59E0B !important;
}

/* WhatsApp Request Modal */
.whatsapp-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10500;
  backdrop-filter: blur(5px);
}

.whatsapp-modal-content {
  background: var(--bg-dark);
  border: 1px solid var(--border-neon);
  border-radius: var(--border-radius);
  padding: 30px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.whatsapp-modal-content h3 {
  color: var(--cyan-glow);
  margin-bottom: 20px;
}

.whatsapp-message-preview {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--text-muted);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 25px;
  text-align: left;
  font-family: monospace;
  color: #fff;
  white-space: pre-wrap;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  font-size: 1.2rem;
  padding: 12px 25px;
  border: none;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
  background: #128C7E;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(37, 211, 102, 0.6);
}

.btn-close-modal {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
  margin-top: 15px;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Hero Animations & Enhancements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 15px var(--cyan-glow);
  }

  50% {
    box-shadow: 0 0 35px var(--cyan-glow), 0 0 15px var(--purple-glow);
  }

  100% {
    box-shadow: 0 0 15px var(--cyan-glow);
  }
}

@keyframes floatLogo {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(2deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

#hero {
  animation: fadeInUp 1s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  animation: floatLogo 6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.4));
  margin-bottom: 20px;
}

.brand-badge {
  display: inline-block;
  padding: 6px 20px;
  background: rgba(138, 43, 226, 0.15);
  border: 1px solid var(--purple-glow);
  color: #fff;
  border-radius: 30px;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.2s backwards;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.hero h1 {
  animation: fadeInUp 1s ease-out 0.4s backwards;
  text-align: center;
}

.hero-description {
  animation: fadeInUp 1s ease-out 0.6s backwards;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.8;
  color: #a0aec0;
  font-size: 1.15rem;
  text-align: center;
}

.hero .btn-primary {
  animation: pulseGlow 3s infinite, fadeInUp 1s ease-out 0.8s backwards;
  transition: all 0.3s ease;
  font-size: 1.3rem;
  padding: 15px 40px;
  letter-spacing: 2px;
}

.hero .btn-primary:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 40px var(--cyan-glow);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 60px;
  width: 100%;
  max-width: 1000px;
  animation: fadeInUp 1s ease-out 1s backwards;
}

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 243, 255, 0.1);
  padding: 30px 25px;
  border-radius: 15px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-glow), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(0, 243, 255, 0.3);
  background: rgba(0, 243, 255, 0.05);
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--cyan-glow);
  text-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #fff;
  letter-spacing: 1px;
}

.feature-card p {
  font-size: 0.95rem;
  color: #8892b0;
  line-height: 1.6;
}

#progressText {
  color: #ffffff !important;
  font-weight: bold;
}

/* ==========================================================================
   Global Language Switcher Logic & UI (Sinhala / English)
   ========================================================================== */
body[data-lang="EN"] .lang-si {
  display: none !important;
}

body[data-lang="SI"] .lang-en {
  display: none !important;
}

/* Sleek Cyberpunk Language Toggle Switch */
.lang-toggle-btn {
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid var(--border-neon);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Orbitron', 'Noto Sans Sinhala', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
  user-select: none;
}

.lang-toggle-btn:hover {
  background: rgba(0, 243, 255, 0.15);
  border-color: var(--cyan-glow);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
  transform: translateY(-2px);
}

.lang-toggle-btn .lang-badge {
  padding: 3px 8px;
  border-radius: 12px;
  transition: all 0.25s ease;
  font-size: 0.8rem;
  opacity: 0.6;
}

.lang-toggle-btn .lang-badge.active {
  background: linear-gradient(135deg, var(--cyan-glow), #00b4d8);
  color: #05050f;
  font-weight: 700;
  opacity: 1;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

.lang-toggle-btn .lang-divider {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 300;
}

.modal-lang-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
  width: 100%;
}
