:root {
  --bg-color: #0d1117;
  --card-bg: #161b22;
  --text-color: #c9d1d9;
  --text-muted: #8b949e;
  --primary: #58a6ff;
  --success: #2ea043;
  --warning: #d29922;
  --border-color: #30363d;
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding: 2rem;
}

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

header {
  margin-bottom: 2rem;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-muted);
}

.latest-rates h2,
.charts h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.card h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card p {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.table-container {
  overflow-x: auto;
  margin-bottom: 3rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

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

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: var(--text-muted);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.charts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.chart-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  height: 400px;
  position: relative;
}

.pulse {
  animation: pulse-bg 2s infinite;
}

@keyframes pulse-bg {
  0% {
    background-color: var(--card-bg);
  }
  50% {
    background-color: #1c222b;
  }
  100% {
    background-color: var(--card-bg);
  }
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.time-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.time-presets button, .time-custom button {
    background: #21262d;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}
.time-presets button:hover, .time-custom button:hover {
    background: #30363d;
    border-color: #8b949e;
}
.time-presets button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.time-custom {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.time-custom label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.time-custom input[type="datetime-local"] {
    background: #0d1117;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    border-radius: 4px;
    font-family: inherit;
    color-scheme: dark;
}
