@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;600&family=Lilita+One&family=Righteous&display=swap");

:root {
  --bg-color: #e0e0e0;
  --shadow-light: #ffffff;
  --shadow-dark: #bebebe;
  --primary-color: #007bff;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --font-main: "Outfit", sans-serif;
  --font-heading: "Lilita One", cursive;
  --font-subheading: "Righteous", cursive;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg-color);
  color: #333;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* Neumorphic container */
.neu {
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Navigation - same as original */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-color);
  padding: 1rem 2rem;
  font-family: var(--font-subheading);
  box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
}

.neu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-color);
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  margin-right: 1rem;
}

.neu-icon:hover {
  box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  transform: scale(1.05);
}

.hamburger {
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding-left: 0;
  margin: 0;
}

.nav-links li a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  cursor: pointer;
}

/* Archive Title */
#archive-title {
  max-width: 775px;
  /* Change from clamp(300px, 100%, 750px) to match other sections */
  margin: 20px auto;
  text-align: center;
  font-size: 1.8em;
  font-weight: 500;
  font-family: var(--font-heading);
  color: #007bff;
  padding: 15px 20px;
  box-sizing: border-box;
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  margin-bottom: 1.5rem;
}

/* Archive Controls */
.archive-controls {
  max-width: 775px;
  /* This should already be 800px, but make sure it matches */
  margin: 0 auto 2rem;
  padding: 1.5rem;
}

.search-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-container input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: none;
  border-radius: 25px;
  background: var(--bg-color);
  box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
  font-family: var(--font-main);
  font-size: 1rem;
  outline: none;
}

.search-container input::placeholder {
  color: #999;
}

.search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-btn {
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  background: var(--bg-color);
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  color: #666;
}

.filter-btn:hover,
.filter-btn.active {
  box-shadow: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  color: var(--primary-color);
  font-weight: bold;
}

/* Archive Container */
.archive-container {
  max-width: 800px;
  /* This should already be 800px, but make sure it matches */
  margin: 0 auto;
  padding: 0 1rem;
}

/* Archive Entry */
.archive-entry {
  margin-bottom: 2rem;
  border-radius: 12px;
  background: var(--bg-color);
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  overflow: hidden;
  transition: all 0.3s ease;
}

.archive-entry.collapsed {
  cursor: pointer;
}

.archive-entry.collapsed:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.archive-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.archive-info h3 {
  margin: 0 0 0.5rem 0;
  font-family: var(--font-subheading);
  color: var(--primary-color);
  font-size: 1.2rem;
}

.archive-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.level-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.level-badge.beginner {
  background: rgba(40, 167, 69, 0.2);
  color: var(--success-color);
}

.level-badge.advanced {
  background: rgba(255, 193, 7, 0.2);
  color: #856404;
}

.level-badge.business {
  background: rgba(0, 123, 255, 0.2);
  color: var(--primary-color);
}

.level-badge.proficient {
  background: rgba(220, 53, 69, 0.2);
  color: var(--danger-color);
}

.expand-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.archive-entry.expanded .expand-icon {
  transform: rotate(180deg);
}

.archive-content {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.archive-entry.expanded .archive-content {
  padding: 1.5rem;
  max-height: 2000px;
}

.archive-audio {
  margin-bottom: 1.5rem;
  text-align: center;
}

.archive-audio audio {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.archive-article {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  line-height: 1.6;
}

.archive-article h4 {
  font-family: var(--font-subheading);
  color: var(--primary-color);
  margin-top: 0;
}

.archive-questions {
  margin-top: 1rem;
}

.archive-question {
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.archive-question p {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.archive-question .options {
  margin-left: 1rem;
}

.archive-question .options div {
  margin-bottom: 0.25rem;
  color: #666;
}

.archive-question .options .correct-answer {
  color: #28a745 !important;
  font-weight: bold !important;
}

.archive-question .options div.correct-answer {
  color: #28a745 !important;
  font-weight: bold !important;
  background: rgba(40, 167, 69, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border-left: 3px solid #28a745;
}


/* No Results */
.no-results {
  text-align: center;
  margin: 2rem auto;
  max-width: 400px;
}

.no-results p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

.no-results i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

/* Footer */
.footer {
  max-width: 775px;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: #333;
}

.footer-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.footer-link:hover {
  color: var(--danger-color);
}

.footer-right {
  opacity: 0.7;
  color: #007bff;
  font-weight: 700;
}

/* Pagination Styles */
.pagination-container {
  max-width: 775px;
  margin: 2rem auto;
  padding: 1.5rem;
  text-align: center;
}

.pagination-info {
  margin-bottom: 1rem;
  color: #666;
  font-size: 0.9rem;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--bg-color);
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  color: #666;
  min-width: 40px;
}

.pagination-btn:hover:not(.disabled) {
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
  color: var(--primary-color);
}

.pagination-btn.active {
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
  color: var(--primary-color);
  font-weight: bold;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #999;
}

.pagination-btn.page-number {
  min-width: 40px;
  padding: 0.5rem 0.75rem;
}

.pagination-ellipsis {
  color: #666;
  padding: 0.5rem;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    background: var(--bg-color);
    padding: 1rem;
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    z-index: 10;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    margin-bottom: 1rem;
  }

  #archive-title {
    max-width: 800px;
    /* Keep consistent with desktop */
    width: 95%;
    /* Only apply width override on mobile */
    padding: 10px 15px;
  }

  .archive-controls {
    max-width: 800px;
    /* Keep consistent with desktop */
    width: 95%;
    /* Only apply width override on mobile */
    padding: 1rem;
  }

  .filter-buttons {
    justify-content: center;
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .archive-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .archive-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer {
    width: 95%;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 425px) {
  #archive-title {
    max-width: 800px;
    /* Keep consistent with desktop */
    width: 90%;
    /* Only apply width override on mobile */
  }

  .archive-controls {
    max-width: 800px;
    /* Keep consistent with desktop */
    width: 90%;
    /* Only apply width override on mobile */
  }

  .footer {
    width: 90%;
  }
}

/* Responsive pagination */
@media (max-width: 768px) {
  .pagination-container {
    width: 95%;
    padding: 1rem;
  }

  .pagination-controls {
    gap: 0.25rem;
  }

  .pagination-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    min-width: 35px;
  }

  .pagination-info {
    font-size: 0.8rem;
  }
}

@media (max-width: 425px) {
  .pagination-container {
    width: 90%;
  }

  .pagination-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
    min-width: 30px;
  }
}