:root {
  --bg: #f5f5f5;
  --text: #222;
  --card: #ffffff;
  --swap-bg: #a0c4ff; /* light blue */
}

.dark-mode {
  --bg: #1a1a1a;
  --text: #f5f5f5;
  --card: #2a2a2a;
  --swap-bg: #4361ee; /* deep blue */
}


body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  background: var(--card);
  padding: 2rem;
  border-radius: 15px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 1.5rem;
}

#toggle-dark {
  background-color: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

#toggle-dark:focus {
  outline: none;
  box-shadow: none;
}

#toggle-dark:hover {
  transform: scale(1.15);
  color: #007bff;
}


label {
  display: block;
  margin-bottom: 0.4rem;
}

input, select {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: var(--bg);
  color: var(--text);
}

.input-group {
  margin-bottom: 1rem;
}

.currency-selectors {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1rem;
}

.currency {
  flex: 1;
}

.select-container {
  position: relative;
  display: flex;
  align-items: center;
}

.select-container img {
  width: 28px;
  height: 20px;
  margin-right: 8px;
  object-fit: cover;
  border-radius: 4px;
}

.swap-btn button {
  padding: 0.3rem 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  background: var(--swap-bg);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 1.5rem;
}


.swap-btn button:hover {
  background-color: #4b6cb7; /* fallback hover color */
  transform: scale(1.05);
}

.convert-btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  background: #007bffc2;
  border: none;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.convert-btn:hover {
  background: #0056b3;
}

.result-box {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  text-align: center;
}

@media (max-width: 500px) {
  .container {
    width: 90%;
    padding: 1rem;
  }

  .swap-btn {
    margin: 1rem 0;
  }
}
button:hover {
  opacity: 1;
  transform: scale(1);
}
