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

/* Ensure html and body take full height and use Flexbox */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Slightly transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Enhanced Cool Spinner */
.cool-spinner {
  width: 80px;
  height: 80px;
  border: 12px solid #f3f3f3; /* Light grey */
  border-top: 12px solid #bfa0e2; /* Purple */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
}

.cool-spinner::before,
.cool-spinner::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 6px solid transparent;
  border-top-color: #bfa0e2;
  border-radius: 50%;
  animation: spin-reverse 2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  to { transform: rotate(-360deg); }
}

/* Body Styling */
body {
  font-family: 'Share Tech Mono', monospace;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(120, 60, 200, 0.28), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(0, 170, 190, 0.18), transparent 55%),
    #07060d;
  background-attachment: fixed;
  color: #fff;
  overflow-x: hidden;
  flex: 1; /* Allows main content to grow and push footer down */
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(191, 160, 226, 0.12);
  width: 100%;
  z-index: 1000;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5em;
  color: #bfa0e2;
  text-shadow: 0 0 10px rgba(191,160,226,0.7);
}

.nav {
  display: flex;
  align-items: center;
}

/* Social Icons */
.icon-btn {
  margin-right: 15px;
  transition: transform 0.3s, opacity 0.3s;
}

.social-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s, opacity 0.3s;
}

.social-icon:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* How It Works Button */
.btn {
  padding: 8px 16px;
  background: #bfa0e2;
  border: none;
  border-radius: 4px;
  color: #000;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  transition: background 0.3s, transform 0.3s;
}

.btn:hover {
  background: #fff;
  transform: scale(1.05);
}

/* Main Content */
.main-content {
  flex: 1; /* Allows the main content to grow and push footer down */
}

/* Tabs Section */
.tabs-section {
  padding: 50px 20px;
  background: transparent;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.tab {
  padding: 10px 30px;
  margin: 0 10px;
  background: rgba(30, 26, 44, 0.7);
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  transition: background 0.3s, transform 0.3s;
}

.tab.active {
  background: #bfa0e2;
  color: #000;
  transform: scale(1.1);
}

.tab:hover:not(.active) {
  background: #333;
}

/* Tab Content */
.tab-content-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.tab-content {
  display: none;
  width: 100%;
  max-width: 1200px;
}

.tab-content.active {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 40px;
  animation: fadeIn 1s ease-in-out;
}

.widget {
  background: rgba(22, 18, 34, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(191, 160, 226, 0.2);
  border-radius: 10px;
  padding: 20px;
  width: 300px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.widget:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 20px #bfa0e2;
}

.compound-gif {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.widget-info {
  margin-top: 15px;
}

.widget-info h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5em;
  color: #bfa0e2;
  margin-bottom: 5px;
}

.ticker {
  font-size: 1.2em;
  color: #fff;
  margin-bottom: 10px;
}

/* Process Logos */
.process-logos {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  margin-top: 8px;
}

.process-logos img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s;
}

.process-logos img:hover {
  transform: scale(1.1);
}

/* Modal Styling */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.8);
  animation: fadeInModal 0.5s;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #1e1e1e;
  margin: 5% auto;
  padding: 20px;
  border: 2px solid #333;
  width: 90%;
  max-width: 800px;
  border-radius: 10px;
  position: relative;
}

.close-button {
  color: #fff;
  float: right;
  font-size: 1.5em;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
}

.close-button:hover {
  color: #bfa0e2;
}

.modal-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

/* Add Inner Shadow and Increase Size to Modal Banner */
.modal-banner {
    width: 250px; /* Increased size from 150px to 250px */
    height: auto;
    border-radius: 5px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6); /* Added inner shadow */
  }
  
  /* Responsive Adjustment for Smaller Screens */
  @media (max-width: 800px) {
    .modal-banner {
      width: 180px; /* Increased from 100px to 180px */
    }
  }
  

.modal-text {
  flex: 1;
}

.modal-text h2 {
  margin-bottom: 15px;
  color: #bfa0e2;
}

.modal-text p {
  margin-bottom: 10px;
  line-height: 1.6em;
}

.modal-text ol {
  margin-left: 20px;
}

.modal-text ol li {
  margin-bottom: 5px;
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  text-align: center;
  font-size: 0.9em;
  color: #ccc;
  width: 100%;
}

/* Fade In Animation for Tab Content */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 800px) {
  .tabs-section {
    padding: 100px 10px 50px 10px; /* Adjusted padding for smaller screens */
  }

  .widget {
    width: 100%;
    max-width: 400px;
  }

  .process-logos img {
    width: 30px;
    height: 30px;
  }
  
  /* Adjusted Spinner Size for Smaller Screens */
  .cool-spinner {
    width: 60px;
    height: 60px;
  }

  .cool-spinner::before,
  .cool-spinner::after {
    width: 45px;
    height: 45px;
    margin: -22.5px 0 0 -22.5px;
  }

  /* Modal Styling for Smaller Screens */
  .modal-body {
    flex-direction: column;
    align-items: center;
  }

  .modal-text {
    text-align: center;
  }
}

/* Animated background canvas (bg.js) */
#lab-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
