* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  min-height: 100vh;
  color: white;
  background: linear-gradient(rgba(8, 15, 28, 0.82), rgba(8, 15, 28, 0.92)),
    url("https://images.unsplash.com/photo-1526304640581-d334cdbbf45e?q=80&w=1600&auto=format&fit=crop")
    center/cover no-repeat fixed;
}

body.light-mode {
  color: #0f172a;
  background: linear-gradient(rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.95)),
    url("https://images.unsplash.com/photo-1526304640581-d334cdbbf45e?q=80&w=1600&auto=format&fit=crop")
    center/cover no-repeat fixed;
}

.app {
  min-height: 100vh;
}

.hero {
  width: 90%;
  max-width: 1150px;
  margin: auto;
  padding: 40px 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 16px;
  color: #dbe4f0;
}

body.light-mode .hero p {
  color: #334155;
}

.theme-btn {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background-color: #d4af37;
  color: black;
  font-weight: bold;
  cursor: pointer;
}

body.light-mode .theme-btn {
  background-color: #2563eb;
  color: white;
}

.container {
  width: 90%;
  max-width: 1150px;
  margin: auto;
  padding-bottom: 30px;
}

.card,
.result-card,
.loading,
.error,
.last-updated,
.empty-state {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.light-mode .card,
body.light-mode .result-card,
body.light-mode .loading,
body.light-mode .error,
body.light-mode .last-updated,
body.light-mode .empty-state {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 24px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: bold;
}

input,
select {
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 15px;
}

body.light-mode input,
body.light-mode select {
  background-color: white;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

input::placeholder {
  color: #cbd5e1;
}

body.light-mode input::placeholder {
  color: #64748b;
}

input:focus,
select:focus {
  outline: none;
  border: 1px solid #d4af37;
}

body.light-mode input:focus,
body.light-mode select:focus {
  border: 1px solid #2563eb;
}

.currency-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

body.light-mode .currency-list {
  background-color: rgba(15, 23, 42, 0.04);
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

body.light-mode .currency-item {
  background-color: white;
  border: 1px solid #dbe2ea;
}

.currency-item:hover {
  background-color: rgba(212, 175, 55, 0.12);
}

.actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  padding: 13px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

#convertBtn {
  background-color: #d4af37;
  color: black;
}

#clearBtn,
.small-btn {
  background-color: rgba(255, 255, 255, 0.12);
  color: white;
}

body.light-mode #convertBtn {
  background-color: #2563eb;
  color: white;
}

body.light-mode #clearBtn,
body.light-mode .small-btn {
  background-color: #e2e8f0;
  color: #0f172a;
}

.status-area {
  margin-top: 18px;
}

.loading,
.error,
.last-updated {
  padding: 14px 18px;
  margin-top: 12px;
}

.loading {
  color: #93c5fd;
}

.error {
  color: #fecaca;
}

body.light-mode .error {
  color: #b91c1c;
}

.last-updated {
  color: #e2e8f0;
}

body.light-mode .last-updated {
  color: #334155;
}

.hidden {
  display: none;
}

.results {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.result-card {
  padding: 20px;
}

.result-card h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.code {
  color: #cbd5e1;
  margin-bottom: 10px;
}

body.light-mode .code {
  color: #475569;
}

.value {
  font-size: 28px;
  font-weight: bold;
  color: #f5d76e;
  margin-bottom: 12px;
}

body.light-mode .value {
  color: #2563eb;
}

.note {
  margin-top: 8px;
  font-size: 13px;
  color: #cbd5e1;
}

body.light-mode .note {
  color: #475569;
}

.sparkline {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 60px;
  margin-top: 12px;
}

.spark-bar {
  flex: 1;
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, #d4af37, #60a5fa);
}

body.light-mode .spark-bar {
  background: linear-gradient(to top, #2563eb, #93c5fd);
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.favorite-btn.active {
  background-color: #facc15;
  color: black;
}

.details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  line-height: 1.5;
  color: #dbe4f0;
}

body.light-mode .details {
  border-top: 1px solid #cbd5e1;
  color: #334155;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: #e2e8f0;
}

body.light-mode .empty-state {
  color: #334155;
}

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

  .currency-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 30px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .results {
    grid-template-columns: 1fr;
  }

  .currency-list {
    grid-template-columns: 1fr;
  }

  .theme-btn {
    width: 100%;
  }
}