/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background-color: #f8faff;
    color: #333;
    line-height: 1.6;
}

/* 네비게이션 */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2563eb;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
}

/* 히어로 섹션 */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.hero p {
    color: #64748b;
    font-size: 1.1rem;
}

/* 검색창 디자인 */
.search-container {
    max-width: 650px;
    margin: 2.5rem auto 0;
}

.search-box {
    display: flex;
    background: white;
    padding: 6px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
    border: 1px solid #e2e8f0;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
}

#search-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0 35px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

#search-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

#search-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.trending-tags {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.trending-tags span {
    margin: 0 6px;
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
}

.trending-tags span:hover {
    text-decoration: underline;
}

/* 차트 그리드 및 카드 */
.featured-section {
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-section h2 {
    margin-bottom: 2rem;
    color: #1e293b;
    font-size: 1.8rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.chart-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

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

.ai-badge {
    background: #f0f7ff;
    color: #2563eb;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 600;
}

.chart-stats {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
}

.change {
    font-weight: 600;
    font-size: 1rem;
}

.change.up { color: #ef4444; }
.change.down { color: #3b82f6; }

.ai-summary {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-style: italic;
}

.data-source {
    margin-top: 1.2rem;
    font-size: 0.75rem;
    color: #94a3b8;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.data-source span {
    color: #64748b;
    font-weight: 500;
}

.chart-container {
    height: 200px;
    position: relative;
}


/* 푸터 */
footer {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

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

/* 반응형 */
@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .search-box { border-radius: 15px; flex-direction: column; padding: 10px; }
    #search-btn { padding: 12px; margin-top: 8px; }
    .featured-grid { grid-template-columns: 1fr; }
}

/* 프리뷰 컨트롤 스타일 */
.preview-control {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.toggle-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 6px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #475569;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #e2e8f0;
}

.toggle-btn.preview-active {
    background: #10b981;
    color: white;
    border-color: #059669;
}

/* 환율 위젯 스타일 */
.exchange-widget {
    display: flex;
    gap: 15px;
    align-items: center;
    background: #f8fafc;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.rate-box span {
    color: #2563eb;
    margin-left: 3px;
}

.select-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.select-box select {
    background: transparent;
    border: none;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    outline: none;
    appearance: none;
    padding-right: 5px;
}

/* 국가 선택 드롭다운 */
.country-select {
    border: none;
    background: #ffffff;
    padding: 0 15px;
    font-weight: 600;
    color: #475569;
    border-right: 1px solid #e2e8f0;
    outline: none;
    cursor: pointer;
    border-radius: 50px 0 0 50px;
}

@media (max-width: 900px) {
    .exchange-widget { display: none; }
}


