:root {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --primary-color: #818cf8;
  --accent-color: #34d399;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 1rem;
}

.background-decor {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(129, 140, 248, 0.15) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  top: -10%;
  right: -10%;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 800px;
  padding: 1rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
}

header h1 span {
  color: var(--accent-color);
  font-size: 1rem;
  text-transform: uppercase;
  border: 1px solid var(--accent-color);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 10px;
}

header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.price-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.4s;
}

.price-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
}

.card-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.badge {
  background: rgba(129, 140, 248, 0.2);
  color: var(--primary-color);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
}

.pulse-indicator {
  width: 10px;
  height: 10px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 1.6s infinite;
}

.price-display {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -2px;
  word-wrap: break-word;
}

.currency {
  color: var(--text-muted);
  font-size: 2rem;
  margin-right: 5px;
}

.update-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.btn-refresh {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(129, 140, 248, 0.4);
}

.btn-refresh:hover {
  background: #6366f1;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(129, 140, 248, 0.6);
}

.btn-refresh:active {
  transform: scale(0.98);
}

.chart-section {
  margin-bottom: 2.5rem;
}

.chart-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.chart-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 100%;
  height: 300px;
}

.history-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.table-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow-x: auto;
  backdrop-filter: blur(8px);
  max-height: 450px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 500px;
}

th,
td {
  padding: 1rem 1.5rem;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--card-border);
}

td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
}

tr {
  transition: background-color 0.2s;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--primary-color);
}

.table-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.table-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.table-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
  width: 100%;
  max-width: 800px;
  z-index: 1;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

#social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

#social-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  display: inline-block;
}

#social-links a:hover {
  transform: translateY(-3px);
}

#social-links a[title="GitHub"]:hover {
  color: #f0f6fc;
}

#social-links a[title="LinkedIn"]:hover {
  color: #0a66c2;
}

#social-links a[title="Instagram"]:hover {
  color: #e1306c;
}

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

  header h1 span {
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 5px;
    margin-left: 0;
  }

  .price-card {
    padding: 1.5rem;
    border-radius: 18px;
  }

  .price-display {
    font-size: 2.5rem;
  }

  .currency {
    font-size: 1.5rem;
  }

  th,
  td {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(52, 211, 153, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}
