/* CSS Reset and Base Styles */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-primary); font-size: 16px; line-height: 1.6; color: var(--dark); background: var(--background); min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }
a { color: var(--primary-color); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.hidden { display: none !important; }
.muted { color: var(--gray); }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: var(--radius-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* Loading States */
.loading { position: relative; }
.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-light);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.fa-spin { animation: spin 1s linear infinite; }

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

/* =====================================================
   FOOTER
   ===================================================== */
footer {
  background: #1e293b;
  color: #e2e8f0;
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: 1.5rem;
  }
}

/* CRITICAL: Ensure all modals are hidden by default */
#auth-modal,
#register-modal,
#profile-modal,
#waveplans-modal,
#project-modal,
#wave-detail-modal,
#upgrade-modal,
#combine-modal,
.modal {
  display: none;
}
