/* Base Reset */
body {
  font-family: Arial;
  margin: 0;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  transition: 0.3s;
}

.app {
  text-align: center;
  padding: 20px;
}

h1 {
  color: white;
}

/* Base Currency Label */
#base-label {
  color: white;
  font-weight: bold;
  margin: 10px;
}

/* Converter Card */
.card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin: 20px auto;
  width: 320px;
  max-width: 95%;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  animation: fadeIn 0.5s ease;
}

/* Inputs */
input, select, button {
  padding: 10px;
  margin: 8px;
  width: 90%;
  border-radius: 8px;
  border: none;
  font-size: 14px;
}

/* Buttons */
button {
  background: #4facfe;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #007bff;
  transform: scale(1.05);
}

/* Row */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.row select {
  width: 45%;
}

/* Controls */
.controls {
  margin: 20px;
}

.controls input,
.controls select {
  width: 200px;
  max-width: 90%;
}

/* Currency Grid */
#container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* desktop default */
  gap: 15px;
  padding: 10px;
}

/* Currency Card */
.currency-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  min-height: 120px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
  transition: 0.3s;
}

.currency-card:hover {
  transform: translateY(-5px);
}

/* Dark Mode */
.dark {
  background: #1e1e1e;
  color: white;
}

.dark .card,
.dark .currency-card {
  background: #333;
  color: white;
}

/* Animation */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}


/* MOBILE  */
@media (max-width: 600px) {

  h1 {
    font-size: 22px;
  }

  .card {
    width: 95%;
    padding: 15px;
  }

  input, select, button {
    width: 100%;
  }

  .row {
    flex-direction: column;
  }

  .row select {
    width: 100%;
  }

  .controls input,
  .controls select {
    width: 100%;
  }

  #container {
    grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
  }
}


/* TABLET */
@media (min-width: 601px) and (max-width: 900px) {

  #container {
    grid-template-columns: repeat(3, 1fr); /* 3 cards */
  }

  .card {
    width: 80%;
  }
}


/* DESKTOP */
@media (min-width: 901px) {

  #container {
    grid-template-columns: repeat(5, 1fr); /* 5 cards */
  }

  .card {
    width: 350px;
  }
}