
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #e8f0fe;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: center;
  color: #0d1a33;
}

.container {
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(13, 26, 51, 0.15);
  max-width: 720px;
  width: 100%;
  text-align: center;
}


h1 {
  margin-bottom: 30px;
  font-weight: 700;
  font-size: 2rem;
  color: #0d1a33;
}

h2 {
  margin-top: 40px;
  color: #0d1a33;
  font-weight: 700;
  font-size: 1.5rem;
  text-align: left;
}


.converter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

input[type="number"],
select {
  font-size: 1.2rem;
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid #4a90e2;
  min-width: 110px;
  transition: border-color 0.3s ease;
  color: #0d1a33;
  background-color: #f5f9ff;
}

input[type="number"]:focus,
select:focus,
.search-input:focus {
  border-color: #0b64c7;
  outline: none;
  background-color: #e6f0ff;
}

.converter span {
  font-size: 1.8rem;
  color: #4a90e2;
  user-select: none;
}

.result {
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 30px;
  color: #0d1a33;
  min-height: 1.5em;
}


canvas#rateChart {
  width: 100% !important;
  height: auto !important;
  max-height: 300px;
  margin-bottom: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.25);
}


.search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #4a90e2;
  margin: 10px 0 15px 0;
  color: #0d1a33;
  background-color: #f5f9ff;
}

.rates-table-container {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: auto;
  border: 2px solid #4a90e2;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}


table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.1rem;
  color: #0d1a33;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #d6e3fc;
  white-space: nowrap;
}

th {
  background-color: #4a90e2;
  color: white;
  position: sticky;
  top: 0;
  z-index: 2;
}

tr:hover {
  background-color: #e6f0ff;
  cursor: default;
}

@media (max-width: 600px) {
  .converter {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  input[type="number"],
  select {
    width: 100%;
    min-width: auto;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .result {
    font-size: 1.1rem;
  }

  .search-input {
    font-size: 0.95rem;
  }
}

@media (max-width: 400px) {
  table,
  th,
  td {
    font-size: 0.9rem;
  }
}

