:root {
  --background-color: #f8f9fa;
  --text-color: #212529;
  --header-border-color: #dee2e6;
  --card-background-color: #ffffff;
  --card-shadow-color: rgba(0, 0, 0, 0.05);
  --button-background-color: #007bff;
  --button-text-color: #ffffff;
  --button-hover-background-color: #0056b3;
  --skeleton-bg: #e0e0e0;
  --skeleton-shimmer: rgba(255, 255, 255, 0.6);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  overflow: hidden;
}

#header {
  padding: 1rem 5%;
}

#header h1 {
  font-size: 4rem;
  font-weight: 600;
  font-family: "EB Garamond", serif;
}

.header-content-title {
  display: flex;
  align-items: center;
  gap: 19px;
}

#header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#header .header-content img {
  width: 70px;
  height: 70px;
}

#header .header-content .controls img {
  width: 40px;
  height: 40px;
}
.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#main {
  padding: 2rem 0;
}

.price-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.price-card {
  background: var(--card-background-color);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px var(--card-shadow-color);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.price-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
}

.price-card img {
  width: 48px;
  height: 48px;
  margin-right: 1.5rem;
  border-radius: 50%;
}

.price-card div {
  display: flex;
  flex-direction: column;
}

.price-card strong {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.price-card p {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 300;
  color: #28a745;
}

#currency-select {
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid var(--header-border-color);
  background-color: var(--card-background-color);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease-in-out;
}

#currency-select:focus {
  outline: none;
  border-color: var(--button-background-color);
}

button {
  background-color: var(--button-background-color);
  color: var(--button-text-color);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button:hover {
  background-color: var(--button-hover-background-color);
}

button:active {
  transform: translateY(1px);
}

.skeleton-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.skeleton-card {
  height: 100px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    var(--skeleton-bg) 25%,
    var(--skeleton-shimmer) 50%,
    var(--skeleton-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: grid;
}

.htmx-request .price-list {
  display: none;
}

@media (max-width: 768px) {
  #header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .controls {
    justify-content: center;
  }

  .price-list,
  .skeleton-list {
    grid-template-columns: 1fr;
  }

  .container {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .price-card {
    padding: 1rem;
  }

  .price-card img {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
  }

  .price-card strong {
    font-size: 1rem;
  }

  .price-card p {
    font-size: 1.1rem;
  }
}

.error {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 1rem;
  border-radius: 5px;
  text-align: center;
  margin: 1rem 0;
}

.loading {
  color: #004085;
  background-color: #cce5ff;
  border: 1px solid #b8daff;
  padding: 1rem;
  border-radius: 5px;
  text-align: center;
  margin: 1rem 0;
}

.feedback-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.feedback-overlay.active {
  display: flex;
}

.feedback-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  animation: slideIn 0.3s ease-out;
}

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

.feedback-content h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: #212529;
}

.feedback-content p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
