@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

body { 
    font-family: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif; 
    background-color: var(--bg-primary);
    color: var(--text-primary);
    background-image: 
        radial-gradient(ellipse at 30% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(124, 58, 237, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* 그라데이션 텍스트 효과 */
.gradient-text {
    background: linear-gradient(135deg, #5046e5 0%, #7c3aed 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 강조 텍스트 그라데이션 */
.theme-text-accent {
    color: var(--accent-primary);
}

/* 호버시 카드 상승 효과 */
.theme-card {
    transition: all 0.3s ease;
}

.theme-card:hover {
    box-shadow: var(--shadow-md);
}

/* 요약 카드 특별 스타일 */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

/* 테이블 행 호버 강조 */
.etf-row {
    transition: all 0.2s ease;
}

.etf-row:hover {
    background: linear-gradient(90deg, rgba(80, 70, 229, 0.04) 0%, rgba(124, 58, 237, 0.02) 100%) !important;
    transform: translateX(2px);
}

/* 인풋 포커스 효과 */
.theme-input:focus {
    box-shadow: 0 0 0 3px rgba(80, 70, 229, 0.15);
}

/* 테이블 고정 헤더 */
.table-fixed-header thead { 
    position: sticky; 
    top: 0; 
    z-index: 10; 
}

/* 정렬 표시 */
.sort-asc::after { content: ' ▲'; }
.sort-desc::after { content: ' ▼'; }

/* 아이콘 색상 */
.fill-yellow-400 { fill: var(--color-warning); }

/* 즐겨찾기 셀 - 애니메이션 추가 */
.favorite-cell svg { 
    stroke: var(--text-muted); 
    fill: none; 
    transition: all 0.25s ease; 
}
.favorite-cell:hover svg { 
    stroke: #f59e0b;
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}
.favorite-cell.is-favorite svg { 
    stroke: #f59e0b; 
    fill: #fbbf24; 
    filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.4));
}
.favorite-cell.is-favorite:hover svg {
    transform: scale(1.1);
}

/* 지수 티커 스크롤바 숨김 */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* TradingView 스타일 티커 테이프 - 현대적 */
#indexTicker {
    overflow: hidden;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edfc 50%, #f5f3ff 100%);
    border: 1px solid rgba(80, 70, 229, 0.1);
    border-radius: 12px;
}

.ticker-track {
    display: flex;
    animation: ticker-scroll 40s linear infinite;
    width: max-content;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 28px;
    border-right: 1px solid rgba(80, 70, 229, 0.08);
    white-space: nowrap;
    transition: all 0.2s ease;
    min-width: 140px;
    cursor: pointer;
    position: relative;
}

.ticker-item:hover {
    background: rgba(80, 70, 229, 0.06);
}

.ticker-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #5046e5, #7c3aed);
    transition: width 0.2s ease;
}

.ticker-item:hover::after {
    width: 60%;
}

.ticker-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.ticker-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticker-row2 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.ticker-icon {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
    letter-spacing: -0.5px;
}

.ticker-icon.badge-kr {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.ticker-icon.badge-us {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.ticker-icon.badge-fx {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}

.ticker-icon.badge-au {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.ticker-icon.badge-default {
    background: #6b7280;
    color: white;
}

.ticker-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.ticker-price {
    font-size: 15px;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    color: var(--text-primary);
}

.ticker-change {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
}

/* 상승/하락 색상 */
.ticker-up .ticker-price { color: var(--color-up); }
.ticker-up .ticker-change { color: var(--color-up-light); }

.ticker-down .ticker-price { color: var(--color-down); }
.ticker-down .ticker-change { color: var(--color-down-light); }

.ticker-flat .ticker-price { color: var(--text-secondary); }
.ticker-flat .ticker-change { color: var(--text-tertiary); }

/* 가격 변동 색상 유틸리티 - 생동감 있는 톤 */
.price-up { 
    color: #e11d48 !important; 
    text-shadow: 0 0 20px rgba(225, 29, 72, 0.15);
}
.price-down { 
    color: #0284c7 !important; 
    text-shadow: 0 0 20px rgba(2, 132, 199, 0.15);
}
.price-flat { 
    color: #64748b !important; 
}

/* 최근 검색어 드롭다운 */
#recentSearchDropdown {
    max-height: 120px;
    overflow: hidden;
}

#recentSearchList {
    max-height: 80px;
    overflow: hidden;
}

.recent-search-tag {
    max-width: calc(50% - 4px);
}

.recent-search-tag span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* 필터 버튼 스타일 */
.filter-btn {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 필터 버튼 활성화 상태 */
#filterMonthly.filter-btn-active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: #059669;
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

#filterCoveredCall.filter-btn-active {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    border-color: #7c3aed;
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

#filterOverseas.filter-btn-active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

#filterLeverage.filter-btn-active {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    border-color: #e11d48;
    color: white;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

#filterInverse.filter-btn-active {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    border-color: #0284c7;
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

#filterFavorite.filter-btn-active {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    border-color: #d97706;
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.filter-btn-active:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.filter-btn-active svg {
    stroke: white;
}
