/* ===== Base ===== */
body {
  background-color: #0d0d0d;
  color: #fff;
  font-family: 'Pretendard', sans-serif;
}

/* ===== Layout ===== */
.card {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
}

/* ===== Typography / Color ===== */
.accent {
  color: #00ffa3;
}

/* ===== Buttons ===== */
.btn-primary {
  background-color: #00ffa3;
  color: #000;
  font-weight: bold;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover {
  background-color: #00d98a;
}
.btn-secondary {
  background-color: transparent;
  color: #ccc;
  font-weight: 600;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.btn-secondary:hover {
  background-color: #2a2a2a;
  border-color: #666;
  color: #fff;
}

/* ===== Navigation / Tabs ===== */
.tab-active {
  border-bottom: 3px solid #00ffa3;
  color: #00ffa3;
}

/* ===== Form Controls ===== */
.filter-input {
  background: #262626;
  border: 1px solid #333;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  min-width: 60px;
  text-align: left;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.filter-input:focus {
  outline: none;
  border-color: #00ffa3;
  box-shadow: 0 0 0 2px rgba(0, 255, 163, 0.15);
}
select {
  padding-right: 30px !important;
  padding-left: 10px !important;
  text-indent: 2px;
  cursor: pointer;
  min-width: 70px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}
select option {
  background-color: #1a1a1a;
  color: #fff;
  padding: 10px;
}
#history-select {
  min-width: 240px;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
}

/* ===== Table ===== */
td,
th {
  padding: 12px 15px !important;
}

/* ===== Diff Indicators (증가=초록, 감소=빨강) ===== */
.diff-up {
  color: #10b981;
  font-size: 0.7rem;
}
.diff-down {
  color: #ef4444;
  font-size: 0.7rem;
}
.diff-new {
  color: #00ffa3;
  font-size: 0.7rem;
}

/* ===== Favorite Button ===== */
.favorite-btn {
  cursor: pointer;
  transition:
    transform 0.2s,
    color 0.2s;
  font-size: 1.2rem;
}
.favorite-btn:hover {
  transform: scale(1.2);
}
.favorite-btn.active {
  color: #00ffa3;
}
.favorite-btn.inactive {
  color: #444;
}
.favorite-btn.inactive:hover {
  color: #888;
}

/* ===== Dynamic Grid ===== */
.grid-dynamic {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== Custom Scrollbar (Global) ===== */
::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}
::-webkit-scrollbar-track {
  background: #0d0d0d;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #333 #0d0d0d;
}
