/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;
  --border-primary: #333333;
  --border-secondary: #404040;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --shadow-light: rgba(255, 255, 255, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.3);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f9f9f9;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #888888;
  --border-primary: #e5e5e5;
  --border-secondary: #d1d5db;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.2);
}

/* ===== BASE STYLES ===== */
body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Lexend', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100%;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-top: 60px;
  /* Account for fixed navbar */
}

html {
  height: 100%;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-container {
  width: 100%;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.logo-link {
  font-family: 'Lexend', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

/* Logo image inside navbar */
.logo-image {
  height: 24px;
  display: block;
}

/* Inline logo SVG sizing and theming */
.logo-svg {
  height: 24px;
  display: block;
  color: var(--text-primary);
}

.logo-link:hover {
  color: var(--accent-color);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.support-btn {
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  position: relative;
}

.support-btn:hover {
  background: var(--bg-primary);
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.theme-toggle-btn {
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
}

.theme-toggle-btn:hover {
  background: var(--bg-primary);
  border-color: var(--border-secondary);
  color: var(--text-primary);
  transform: scale(1.05);
}

.theme-toggle-btn svg {
  transition: all 0.3s ease;
}

/* Icon visibility based on theme */
[data-theme="dark"] #moonIcon {
  display: none;
}

[data-theme="dark"] #sunIcon {
  display: block;
}

[data-theme="light"] #moonIcon {
  display: block;
}

[data-theme="light"] #sunIcon {
  display: none;
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-primary);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(80vh - 120px);
  overflow-y: auto;
}

.support-description {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.support-links {
  display: grid;
  gap: 1rem;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

.support-link:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-1px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

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

/* ===== MESSAGE STYLES ===== */
.message {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 20px var(--shadow-dark);
  z-index: 1500;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 300px;
  font-size: 0.9rem;
  font-weight: 500;
}

.message.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== FOOTER STYLES ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  margin-top: 4rem;
}

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

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding: 3rem 0 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

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

.footer-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  letter-spacing: -0.01em;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  line-height: 1.5;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border-primary);
  padding: 1.5rem 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin: 0;
}

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.privacy-badge svg {
  width: 16px;
  height: 16px;
}

/* ===== GLOBAL BUTTON LINKS ===== */
/* Ensure anchor-styled buttons are not underlined */
.start-btn,
.import-btn,
.template-btn,
.help-btn {
  text-decoration: none;
}

/* No underline on hover for anchor-styled buttons */
.start-btn:hover,
.import-btn:hover,
.template-btn:hover,
.help-btn:hover {
  text-decoration: none;
}

/* ===== GLOBAL LINK STYLE ===== */
a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1rem;
  }

  .logo-link {
    font-size: 1.1rem;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .footer-container {
    padding: 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0 1.5rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
