/* ===== VARIABLES ===== */
:root {
  --primary-dark: #001220;
  --accent-green: #00c853;
  --accent-blue: #2962ff;
  --accent-purple: #aa00ff;
  --accent-orange: #ff6d00;
  --light-text: #ffffff;
  --dark-text: #333333;
  --gray-bg: #f5f7fa;
  --card-bg: rgba(255, 255, 255, 0.08);
  --transition: all 0.3s ease;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--primary-dark);
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-green), #00a046);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 200, 83, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-green);
  border: 2px solid var(--accent-green);
}

.btn-secondary:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-3px);
}

/* ===== BACKGROUND ANIMATION ===== */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--primary-dark);
  overflow: hidden;
}

.bg-animation::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, transparent 20%, var(--primary-dark) 70%),
              repeating-conic-gradient(from 0deg, rgba(0, 200, 83, 0.05) 0deg 10deg, transparent 10deg 20deg),
              repeating-linear-gradient(45deg, rgba(41, 98, 255, 0.03) 0px 1px, transparent 1px 10px);
  animation: rotate 100s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* ===== NAVIGATION ===== */
.navbar {
  background: rgba(0, 18, 32, 0.8);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


.hisa-image-container {
    width: 800px;
    height: 800px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 4rem auto;
    padding: 0;
}

/* Stretched image container for SDG */
.hisa-image-container.stretched-image {
    width: 100%;
    max-width: 1200px;
    height: 500px;
    margin: 2rem auto;
}

.hisa-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* or use 'contain' if you want full image */
  display: block;
}


.hisa-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

/* Stretched SDG image styles */
.hisa-logo.stretched-sdg {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-placeholder {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 200, 83, 0.15);
  overflow: hidden;
}

.hisa-nav-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  background: linear-gradient(to right, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: white;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-green);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: var(--accent-green, #27ae60);
  border-radius: 2px;
  transition: 0.3s;
}

/* Dropdown */
.projects-link, .whitepapers-link, .apps-link {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

.dropdown-arrow {
  margin-left: 6px;
  font-size: 0.8em;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-radius: 8px;
  margin-top: 8px;
  min-width: 160px;
  z-index: 1002;
  flex-direction: column;
}

.dropdown-menu.show { display: flex; }

.dropdown-menu a {
  padding: 10px 16px;
  color: #222;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: #f0f0f0;
}

/* ===== HERO SECTION ===== */
.hero-section {
  padding: 120px 0 80px;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 90%;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin: 2.5rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== PILLARS SECTION ===== */
.pillars-section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--accent-green);
  border-radius: 2px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.pillar-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.pillar-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 200, 83, 0.3);
}

.pillar-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-symbol {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  background: rgba(0, 200, 83, 0.1);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.pillar-symbol:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 200, 83, 0.3);
}

.pillar-emoji {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-green);
}

.pillar-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.token-symbol {
  background: rgba(0, 200, 83, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.pillar-activity {
  opacity: 0.8;
}

/* ===== TOKEN SECTION ===== */
.token-section {
  padding: 5rem 0;
}

.token-dashboard {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.token-logo-container {
    margin-top: 2rem;
    text-align: center;
}

.token-logo {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.token-logo-wrapper {
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.token-visual-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.token-info {
  flex: 1;
}

.token-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.token-supply {
  margin: 1.5rem 0;
}

.supply-number {
  font-size: 2rem;
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-green);
  display: block;
}

.supply-label {
  opacity: 0.7;
  font-size: 0.9rem;
}

.token-utilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.utility-item {
  background: rgba(0, 200, 83, 0.1);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.token-visualization {
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

/* ===== AI SECTION ===== */
.ai-section {
  padding: 5rem 0;
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.ai-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.core-agent {
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(41, 98, 255, 0.1));
}

.ai-capabilities {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.capability {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.ai-agents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.agent-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.agent-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 200, 83, 0.3);
}

/* ===== PROJECTS PAGE ===== */
.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

.page-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--accent-green);
  border-radius: 2px;
}

.project-section {
  margin-bottom: 5rem;
}

.simulator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.simulator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 500;
}

.control-group input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
}

.simulator-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-card {
  background: rgba(0, 200, 83, 0.1);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
}

.reward-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  color: var(--accent-green);
  margin: 0.5rem 0;
}

.apy-rate {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  color: var(--accent-blue);
  margin: 0.5rem 0;
}

.sdg-dashboard {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.sdg-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.metric-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  margin: 0.5rem 0;
  color: var(--accent-green);
}

.metric-trend {
  color: var(--accent-green);
  font-size: 0.9rem;
  font-weight: 500;
}

.ecosystem-map {
  height: 500px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ===== WHITEPAPERS PAGE ===== */
.whitepapers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.whitepaper-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.whitepaper-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.paper-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.paper-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.btn-download {
  background: transparent;
  color: var(--accent-green);
  border: 2px solid var(--accent-green);
  width: 100%;
  margin-top: 1rem;
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 1rem;
}

.btn-download:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-3px);
}

.documentation-section {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.doc-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.doc-item:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-5px);
}

.doc-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.doc-link:hover {
  transform: translateX(5px);
}

/* ===== APPS PAGE ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.app-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  position: relative;
}

.app-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.app-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(41, 98, 255, 0.1));
}

.app-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.feature {
  background: rgba(0, 200, 83, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.app-status {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.available {
  background: rgba(0, 200, 83, 0.2);
  color: var(--accent-green);
}

.beta {
  background: rgba(170, 0, 255, 0.2);
  color: var(--accent-purple);
}

.coming {
  background: rgba(255, 109, 0, 0.2);
  color: var(--accent-orange);
}

.development {
  background: rgba(41, 98, 255, 0.2);
  color: var(--accent-blue);
}

.download-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-launch, .btn-notify, .btn-contact {
  width: 100%;
  margin-top: 1rem;
}

.integration-section {
  margin-top: 5rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.partner-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.partner-card:hover {
  background: rgba(0, 200, 83, 0.1);
  transform: translateY(-5px);
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(0, 18, 32, 0.9);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-green);
}

.footer-section a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 0.8rem;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .hero-title { font-size: 3rem; }
  .token-dashboard { flex-direction: column; }
  .ai-grid { grid-template-columns: 1fr; }
  

}

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 10px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 16px;
    z-index: 1000;
    min-width: 180px;
    animation: fadeIn 0.3s;
  }
  .nav-menu.open { display: flex; }
  .nav-link, .projects-link, .whitepapers-link, .apps-link { margin: 12px 0; }
  .projects-link, .whitepapers-link, .apps-link { width: 100%; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: none;
    margin-top: 0;
    min-width: 0;
    border-radius: 0;
    padding-left: 16px;
  }
  .dropdown-menu a { padding-left: 0; }
}

@media (min-width: 901px) {
  .nav-menu {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }
  .nav-link, .projects-link, .whitepapers-link, .apps-link { margin: 0 16px; }
  .dropdown-menu {
    position: absolute;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-radius: 8px;
    margin-top: 8px;
    min-width: 160px;
    z-index: 1002;
    flex-direction: column;
    display: none;
  }
  .projects-link:hover .dropdown-menu,
  .projects-link:focus .dropdown-menu,
  .whitepapers-link:hover .dropdown-menu,
  .whitepapers-link:focus .dropdown-menu,
  .apps-link:hover .dropdown-menu,
  .apps-link:focus .dropdown-menu,
  .dropdown-menu.show { display: flex; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: translateY(0);}
}

/* ===== MODAL STYLES ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--primary-dark);
  margin: 5% auto;
  padding: 0;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  color: white;
  padding: 1.5rem 2rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.close {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.close:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.modal-body {
  padding: 2rem;
  color: var(--light-text);
}

/* Whitepapers Modal Styles */
.whitepapers-grid-modal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.whitepaper-card-modal {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.whitepaper-card-modal:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* Ecosystem Modal Styles */
.ecosystem-overview {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.ecosystem-section h3 {
  color: var(--accent-green);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.ecosystem-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: var(--transition);
}

.ecosystem-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.ecosystem-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.ecosystem-item h4 {
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.ecosystem-item p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.ecosystem-link {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.ecosystem-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.apps-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.app-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-name {
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Modal Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-height: 80vh;
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-header h2 {
    font-size: 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .whitepapers-grid-modal,
  .ecosystem-grid {
    grid-template-columns: 1fr;
  }
  
  .apps-overview {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
