/* 컴포넌트별 특별 스타일 */

/* Sticky Info Bar - Ultra Thin Design */
.sticky-info-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.95) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sticky-info-container {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
  font-weight: 500;
}

.sticky-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sticky-label {
  opacity: 0.9;
  font-size: 10px;
}

.sticky-value {
  font-weight: 700;
  font-size: 12px;
  color: #fbbf24;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sticky-unit {
  font-size: 10px;
  opacity: 0.8;
}

.sticky-info-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  line-height: 1;
}

/* Dominance styles */
.dominance-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dominance-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dominance-value {
  font-size: 11px;
  font-weight: 700;
  color: #fde047;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dominance-unit {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 1px;
}

/* Body padding adjustment for sticky header */
body {
  padding-top: 28px;
}

/* Light theme adjustments for sticky bar */
.light-theme .sticky-info-bar {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.98) 0%, rgba(139, 92, 246, 0.98) 100%);
}

/* 프리미엄 표시 색상 */
.premium-high {
  color: #ef4444 !important;
  font-weight: 700;
}

.premium-medium {
  color: #f59e0b !important;
  font-weight: 600;
}

.premium-low {
  color: #10b981 !important;
  font-weight: 500;
}

.premium-negative {
  color: #6b7280 !important;
}

/* 상태 배지 */
.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.status-online {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-offline {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-loading {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* 툴팁 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* 알림 메시지 */
.alert {
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.alert-warning {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

/* 프로그레스 바 */
.progress-bar {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0891b2, #8b5cf6);
  border-radius: 10px;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

/* 스피너 */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top: 3px solid #8b5cf6;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

/* 카드 hover 효과 */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

/* 펄스 애니메이션 */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* 슬라이드 애니메이션 */
@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 40px;
  opacity: 0.6;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 1.1rem;
}

/* 가격 변화 표시 */
.price-up {
  color: #10b981;
}

.price-up::before {
  content: "▲ ";
  font-size: 0.8em;
}

.price-down {
  color: #ef4444;
}

.price-down::before {
  content: "▼ ";
  font-size: 0.8em;
}

.price-same {
  color: #6b7280;
}

.price-same::before {
  content: "─ ";
  font-size: 0.8em;
}

/* 반짝이는 효과 */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 작은 화면용 테이블 스크롤 */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  min-width: 600px;
}

/* 플로팅 액션 버튼 */
.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0891b2, #8b5cf6);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
  z-index: 1000;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.fab:active {
  transform: scale(0.95);
}

/* 거래소 필터 섹션 */
.exchange-filter-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.filter-description {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.exchange-filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-radio-label {
    position: relative;
    cursor: pointer;
}

.filter-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.filter-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-radio-label:hover .filter-button {
    background: var(--surface-lighter);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-radio-label input[type="radio"]:checked + .filter-button {
    background: linear-gradient(135deg, #0891b2 0%, #8b5cf6 100%);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

/* 필터 정보 표시 */
.filter-info {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.05);
    border-left: 3px solid #8b5cf6;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 코인 정보 표시 스타일 */
.coin-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coin-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px;
    object-fit: contain;
}

.coin-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.coin-kr-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.coin-ticker {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

/* 차트 보기 버튼 및 관련 스타일 */
.coin-info-with-chart {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-toggle-btn {
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: #8b5cf6;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
}

/* 테이블 row에 호버했을 때 차트 버튼 표시 */
tr:hover .chart-toggle-btn {
    opacity: 1;
    transform: translateX(0);
}

.chart-toggle-btn:hover {
    background: linear-gradient(135deg, #0891b2, #8b5cf6);
    border-color: #8b5cf6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.chart-toggle-btn:active {
    transform: translateY(0);
}

/* 차트 컨테이너 */
.chart-container-row {
    background: var(--surface);
    animation: slideDown 0.3s ease;
}

.chart-cell {
    padding: 0 !important;
}

.chart-wrapper {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    border-top: 1px solid var(--border);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.exchange-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exchange-btn {
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exchange-btn:hover {
    background: var(--surface-lighter);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.exchange-btn.active {
    background: linear-gradient(135deg, #0891b2, #8b5cf6);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.chart-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-close-btn:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

/* TradingView 위젯 컨테이너 */
.tradingview-widget-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
}

.tradingview-widget-container > div {
    width: 100% !important;
    height: 100% !important;
}

/* 차트 로딩/에러 상태 */
.chart-loading, .chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.chart-error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 거래소 아이콘 스타일 */
.exchange-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    display: inline-block;
}

.exchange-icon-filter {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 3px;
    display: inline-block;
}

/* 테이블 헤더의 거래소 아이콘 */
th .exchange-icon {
    margin-right: 6px;
}

/* 필터 버튼의 거래소 아이콘 */
.filter-button .exchange-icon-filter {
    vertical-align: text-bottom;
}

/* 제휴 파트너 배너 스타일 */
.partner-banners {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.partner-banner-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.partner-banner-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.partner-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 배너 이미지 동일한 처리 - 둘 다 같은 크기 */

/* 반응형 디자인 */
@media (max-width: 768px) {
    .partner-banners {
        gap: 10px;
        margin-bottom: 15px;
    }
}