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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

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

/* 헤더 스타일 */
.header {
  text-align: center;
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #2d3748;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 20px;
}

.update-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.last-updated {
  font-size: 0.9rem;
  color: #718096;
}

.refresh-btn {
  background: #4299e1;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  background: #3182ce;
  transform: translateY(-1px);
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.refresh-btn.loading .fa-sync-alt {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 정보 카드 */
.info-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-card h2 {
  color: #2d3748;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.info-card p {
  color: #4a5568;
  line-height: 1.6;
}

/* 거래소 컨테이너 */
.exchange-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.exchange-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.exchange-card:hover {
  transform: translateY(-2px);
}

.exchange-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.exchange-name {
  font-size: 1.5rem;
  font-weight: bold;
}

.country-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* 테이블 스타일 */
.coin-table {
  width: 100%;
  border-collapse: collapse;
}

.coin-table thead {
  background: #f7fafc;
}

.coin-table th {
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
  border-bottom: 2px solid #e2e8f0;
}

.coin-table th.text-right {
  text-align: right;
}

.coin-table th.text-center {
  text-align: center;
}

.coin-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.coin-table tr:hover {
  background: #f7fafc;
}

.coin-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coin-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.coin-details h4 {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 2px;
}

.coin-details span {
  font-size: 0.8rem;
  color: #718096;
}

.price {
  font-family: "Courier New", monospace;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: right;
}

.korean-price {
  color: #2d3748;
}

.global-price {
  color: #4a5568;
}

.premium-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.8rem;
  text-align: center;
}

.premium-high {
  background: #fed7d7;
  color: #c53030;
}

.premium-medium {
  background: #feebc8;
  color: #dd6b20;
}

.premium-low {
  background: #f0fff4;
  color: #38a169;
}

.change {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-weight: 600;
}

.change.positive {
  color: #38a169;
}

.change.negative {
  color: #e53e3e;
}

.volume {
  text-align: right;
  color: #4a5568;
}

/* 푸터 */
.footer {
  margin-top: 50px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer p {
  margin-bottom: 8px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .title {
    font-size: 2rem;
  }

  .update-info {
    flex-direction: column;
    gap: 10px;
  }

  .coin-table {
    font-size: 0.8rem;
  }

  .coin-table th,
  .coin-table td {
    padding: 10px 8px;
  }

  .coin-info {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .exchange-header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .coin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .coin-table thead,
  .coin-table tbody,
  .coin-table th,
  .coin-table td,
  .coin-table tr {
    display: block;
  }

  .coin-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .coin-table tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
  }

  .coin-table td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }

  .coin-table td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 6px;
    width: 45%;
    text-align: left;
    font-weight: bold;
  }
}
