body {
  background-color: #111;
  color: #fff;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 20px;
}

h1, h2, h3 {
  text-align: center;
  margin: 10px 0;
}

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

header label {
  display: inline-block;
  margin: 10px;
  color: #ccc;
}

input[type="number"] {
  padding: 5px;
  margin-left: 5px;
  border-radius: 5px;
  border: 1px solid #333;
  background: #222;
  color: #fff;
  width: 80px;
}

.card-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 15px;
  width: 270px;
  text-align: center;
  box-shadow: 0 0 8px #000;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.03);
}

.coin-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 10px auto;
  display: block;
}

/* AI Sentiment Styling */
.ai-sentiment {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 10px 0;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Market Cap Tier Styling */
.market-tier {
  background: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: bold;
  margin: 5px 0;
  display: inline-block;
}

/* Badge Styles for Buzz Score */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 13px;
}

.badge-green {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(56, 239, 125, 0.4);
}

.badge-blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(79, 172, 254, 0.4);
}

.badge-yellow {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(240, 147, 251, 0.4);
}

.badge-gray {
  background: #444;
  color: #aaa;
}

/* Positive/Negative Price Changes */
.positive {
  color: #38ef7d;
  font-weight: bold;
}

.negative {
  color: #f5576c;
  font-weight: bold;
}

/* AltRank Styling */
.alt-rank {
  color: #ffd700;
  font-weight: bold;
  font-size: 12px;
}

a {
  color: #00e0ff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Modal styling */
.modal {
  display: flex;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #222;
  padding: 20px;
  border-radius: 10px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 20px #000;
  position: relative;
  color: #fff;
}

.modal-content p {
  margin: 8px 0;
}

#modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-chart {
  margin-top: 20px;
  border-radius: 5px;
  background: #111;
  max-height: 300px;
  height: 300px !important;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  margin-top: 20px;
}

#line-btn, #candle-btn {
  margin: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background-color: #333;
  color: #fff;
  cursor: pointer;
}

#line-btn:hover, #candle-btn:hover {
  background-color: #555;
}

.hidden {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  padding: 8px;
  text-align: center;
  border: 1px solid #444;
}

th {
  background-color: #222;
  font-weight: bold;
}

/* SVG Icon Styles */
.icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.icon-lg {
  width: 18px;
  height: 18px;
}

h1 .icon-lg {
  width: 24px;
  height: 24px;
}

h2 .icon-lg {
  width: 22px;
  height: 22px;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  header h1 {
    font-size: 24px;
    padding: 15px;
  }

  header label {
    display: block;
    margin: 10px auto;
    width: 90%;
  }

  header input[type="number"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
  }

  .card-row {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 10px;
  }

  .card {
    padding: 15px;
  }

  .card h2 {
    font-size: 16px;
  }

  .card h3 {
    font-size: 18px;
  }

  .coin-logo {
    width: 50px;
    height: 50px;
  }

  .modal-content {
    width: 95%;
    max-width: 95%;
    padding: 15px;
    margin: 20px auto;
  }

  #modal-chart {
    width: 100%;
    height: 200px !important;
    max-height: 200px;
  }

  .user-bar {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }

  .user-actions {
    width: 100%;
    justify-content: center;
  }

  .preview-banner {
    font-size: 14px;
    padding: 12px;
  }

  .preview-banner a {
    display: block;
    margin: 8px auto;
    width: 80%;
    text-align: center;
  }

  table {
    font-size: 12px;
  }

  table th,
  table td {
    padding: 8px 4px;
  }

  section h2 {
    font-size: 20px;
  }

  .icon {
    width: 14px;
    height: 14px;
  }

  .icon-lg {
    width: 18px;
    height: 18px;
  }

  .faq-section details {
    padding: 12px;
  }

  .faq-section summary {
    font-size: 16px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  header h1 {
    font-size: 20px;
  }

  .card h3 {
    font-size: 16px;
  }

  .card p {
    font-size: 13px;
  }

  .badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  table {
    font-size: 11px;
  }

  .btn-link {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .card {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
  }

  .btn-link,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  input[type="number"] {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}
