* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: #0f172a;
  color: #e0e0e0;
  margin: 0;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
}

.header h1 {
  margin: 0;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
}

.subtitle {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-top: 8px;
}

.card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 24px;
  border-radius: 12px;
  margin: 20px 0;
  border: 1px solid #334155;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card h2 {
  color: #fff;
  margin-top: 0;
  font-size: 1.3rem;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #3b82f6;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
  margin-right: 10px;
  margin-top: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: #334155;
  color: #cbd5e1;
}

.btn-secondary:hover {
  background: #475569;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.result-item {
  background: #1a2332;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
  display: flex;
  flex-direction: column;
}

.result-label {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 5px;
}

.result-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #60a5fa;
}

.result-value.highlight {
  color: #22c55e;
  font-size: 1.6rem;
}

.rates-table {
  overflow-x: auto;
  margin-top: 15px;
}

.rates-table table {
  width: 100%;
  border-collapse: collapse;
}

.rates-table th {
  background: #1a2332;
  color: #fff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #334155;
}

.rates-table td {
  padding: 12px;
  border-bottom: 1px solid #334155;
  color: #cbd5e1;
}

.rates-table tr:hover {
  background: #1a2332;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.history-item {
  background: #1a2332;
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
  font-size: 0.9rem;
}

.empty {
  color: #64748b;
  text-align: center;
  padding: 20px;
}

.ad-space {
  margin: 30px 0;
  padding: 20px;
  background: #1a2332;
  border-radius: 12px;
  border: 1px dashed #334155;
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #64748b;
  border-top: 1px solid #334155;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }

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

  .btn-primary,
  .btn-secondary {
    width: 100%;
    margin-right: 0;
  }
}
