html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', sans-serif;
}
.search-container {
  position: relative;
  flex-grow: 1;
  max-width: 500px;
  margin-left: auto;
  z-index: 50;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
#search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
#search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.15);
  outline: none;
}
.search-icon {
  position: absolute;
  left: 0.75rem;
  color: #64748b;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}
#search-results-container {
  position: absolute;
  width: 100%;
  z-index: 45;
  top: calc(100% + 10px);
  border-radius: 0.75rem;
  background-color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  max-height: 350px;
  overflow-y: auto;
  display: none;
}
#search-results {
  list-style: none;
  padding: 0;
  margin: 0;
}
#search-results li {
  padding: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background-color 0.2s;
}
#search-results li:last-child {
  border-bottom: none;
}
#search-results li:hover {
  background-color: #f0f9ff;
}
#search-results li h4 {
  margin-bottom: 0.25rem;
}
#search-results li .formula {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #f8fafc;
  border-radius: 0.25rem;
}
.formula-card {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}
.formula-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background-color: white;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
  z-index: 30;
  padding-top: 80px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.sidebar.active {
  transform: translateX(0);
}
.sidebar-menu {
  padding: 1rem;
}
.sidebar-category {
  font-weight: 600;
  color: #2d3748;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #4b5563;
  text-decoration: none;
  border-radius: 0.5rem;
  margin: 0.25rem 0;
  transition: all 0.2s ease;
}
.sidebar-link:hover {
  background-color: #f0f9ff;
  color: #2563eb;
  transform: translateX(4px);
}
.sidebar-link.active {
  background-color: #3b82f6;
  color: white;
}
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  border-bottom: 1px solid #e2e8f0;
  z-index: 40;
  height: auto;
  min-height: 65px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.header-content {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title {
  font-size: 1.875rem;
  color: #1e293b;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.75rem;
  scroll-margin-top: 100px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, #3b82f6, #60a5fa);
  border-radius: 2px;
}
.green::after {
  background: #00a63e!important;
}
.formula {
  background-color: #f8fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 0.5rem 0;
  transition: all 0.2s ease;
}
.formula:hover {
  background-color: #f0f9ff;
  transform: scale(1.02);
}
@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    z-index: 50;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .content-wrapper {
    margin-left: 0;
  }
  .formula-card {
    margin-bottom: 1rem;
  }
  .sidebar-overlay {
    display: block;
  }
  .sidebar-overlay.active {
    opacity: 1;
  }
  body.sidebar-open {
    overflow: hidden;
  }
}
@media (max-width: 640px) {
  .search-container {
    padding: 0 0.5rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
}
.content-wrapper {
  margin-left: 0;
  min-height: 100vh;
  padding-top: 40px;
  transition: margin-left 0.3s ease;
}
main.container {
  padding-top: 1rem;
}
.container {
  width: 100%;

  padding: 0 1rem;
}
.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1rem;
}
@media (max-width: 1280px) {
  .formula-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1024px) {
  .formula-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
@media (max-width: 768px) {
  .formula-grid {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }
  .search-container {
    margin: 1rem auto;
  }
  .formula-card {
    margin-bottom: 1rem;
  }
}
@media (max-width: 640px) {
  .header-content {
    padding: 0.5rem;
  }
  .site-header h1 {
    font-size: 1.5rem;
  }
  .search-container {
    margin: 0.5rem auto;
  }
  #search-input {
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  }
  .formula-card {
    padding: 1rem;
  }
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
@media (max-width: 640px) {
  .px-4 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .py-8 {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 25;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}
.menu-toggle {
  display: block;
  padding: 0.5rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 25;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}
@media (max-width: 1024px) {
  .container {
    margin: 0 auto;
  }

  .content-wrapper {
    padding-top: 50px;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}
@media (max-width: 480px) {
  .sidebar {
    width: 85%;
    max-width: 300px;
  }
}
.formula-card {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.formula-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1rem;
}

@media (max-width: 1280px) {
  .formula-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .formula-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .formula-grid {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }

  .formula-card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .formula-card {
    padding: 1rem;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
  }

  .formula {
    overflow-x: auto;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .formula-grid {
    padding: 0.5rem;
    gap: 0.75rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
  }

  .container {
    width: 100%;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }
}

@media (max-width: 380px) {
  .formula-card {
    padding: 0.75rem;
  }

  .formula {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  border-bottom: 1px solid #e2e8f0;
  z-index: 40;
  height: auto;
  min-height: 65px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-content {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .header-content {
  }

  .search-container {
    order: 3;
    margin-top: 0.5rem;
    margin-left: 0;
    max-width: 100%;
    width: 100%;
  }

  .site-header {
    padding-bottom: 0.5rem;
  }

  #search-results-container {
    width: 100%;
    left: 0;
  }
}

@media (max-width: 640px) {
  .header-content {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  #search-input {
    padding: 0.4rem 0.75rem 0.4rem 2rem;
    font-size: 0.85rem;
  }

  .search-icon {
    left: 0.5rem;
    width: 0.85rem;
    height: 0.85rem;
  }

  #search-results li {
    padding: 0.65rem;
  }

  #search-results li .formula {
    padding: 0.3rem;
    font-size: 0.8rem;
  }
}

.content-wrapper {
  padding-top: 65px;
}

@media (max-width: 1024px) {
  .content-wrapper {
    padding-top: 110px;
  }
}

.highlight-target {
  animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
  0% {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
  }
}

.image-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.image-button:hover {
  background-color: #2563eb;
  transform: translateX(4px);
}

.image-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.image-container {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  margin: 1rem;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 1rem;
}

.overlay-image {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 2rem);
  height: auto;
  border-radius: 0.5rem;
}

.close-button {
  position: absolute;
  top: -1rem;
  right: -1rem;
  background-color: white;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.close-button:hover {
  background-color: #f3f4f6;
  transform: scale(1.1);
}

@media (max-width: 640px) {
  .image-container {
    max-width: 95%;
    margin: 0.5rem;
    padding: 0.5rem;
  }

  .close-button {
    top: -0.75rem;
    right: -0.75rem;
    width: 2rem;
    height: 2rem;
  }

  .close-button svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.interactive-circle-card {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
}

.unit-circle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  background-color: #f8fafc;
  border-radius: 1rem;
}

#unitCircle {
  max-width: 100%;
  height: auto;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.circle-controls {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.angle-display {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 500;
  color: #2563eb;
}

.trig-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #4b5563;
}

.trig-values div {
  background-color: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  min-height: 85px;
}

.trig-values span {
  font-weight: 500;
  color: #2563eb;
}

.angle-input-group {
  width: 100%;
  margin-bottom: 1rem;
}

.angle-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.25rem;
  transition: all 0.2s ease;
}

.angle-input-wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.angle-input {
  flex: 1;
  border: none;
  padding: 0.5rem;
  font-size: 1rem;
  width: 100px;
  outline: none;
  text-align: right;
  -moz-appearance: textfield;
}

.angle-input::-webkit-outer-spin-button,
.angle-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.angle-unit-select {
  border: none;
  background-color: transparent;
  padding: 0.5rem;
  font-size: 1rem;
  color: #4b5563;
  cursor: pointer;
  outline: none;
}

.angle-unit-select:focus {
  color: #3b82f6;
}

@media (max-width: 640px) {
  .angle-input-wrapper {
    max-width: 200px;
    margin: 0 auto;
  }
}

[id] {
  scroll-margin-top: 100px;
}
