/* Home Page Styles - Slate 기반 플랫 디자인 */

/******************************************************************************************************
** Index Start
*******************************************************************************************************/
.indexWrapper {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

/* 공통 카드 스타일 */
.index {
    display: flex;
    flex-direction: column;
    padding: 0.875rem 1rem;
    color: var(--color-text);
    line-height: 1.4;
    background: var(--color-bg-secondary, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease;
}

.index:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 데스크톱 (768px 이상) */
@media all and (min-width: 768px) {
    .index {
        flex: 1;
        min-width: 0;
    }
}

/* 모바일 (767px 이하) */
@media all and (max-width: 767px) {
    .indexWrapper {
        padding: 0.75rem 0;
        gap: 0.5rem;
    }

    .index {
        flex: 1;
        padding: 0.625rem 0.75rem;
    }

    /* 옵션 카드 숨김 */
    .hide-700-and-down {
        display: none !important;
    }
}

/* 타이틀 행 */
.index > div:first-child {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-secondary, #64748b);
    padding-bottom: 0.375rem;
    margin-bottom: 0.375rem;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

/* 데이터 행 */
.index .dis-flex {
    padding: 0.1875rem 0;
}

.index span {
    font-size: 0.75rem;
    font-weight: 500;
}

.index .market {
    font-family: 'SF Mono', Consolas, Monaco, monospace;
    font-size: 0.75rem;
    color: inherit;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

.index .putcall {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.1875rem 0;
}

/* 상승/하락 색상 */
.index .up, .up {
    color: #dc2626;
}

.index .down, .down {
    color: #475569;
}


/******************************************************************************************************
** Index End
*******************************************************************************************************/


/******************************************************************************************************
** Fear And Greed Start - Slate 기반
*******************************************************************************************************/
.fearandgreed {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.fearandgreed h1 {
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--color-text);
}

/* Fear/Greed 색상 - 파란색 대신 Slate 계열 사용 */
.fearandgreed .extremefear {
    background: rgba(71, 85, 105, 0.7);     /* slate-600 기반 */
    border: 1px solid var(--slate-600);
    border-radius: 4px;
    color: white;
}
.fearandgreed .fear {
    background: rgba(100, 116, 139, 0.4);   /* slate-500 기반 */
    border: 1px solid var(--slate-500);
    border-radius: 4px;
}
.fearandgreed .neutral, .fearandgreed .unknown {
    background: rgba(148, 163, 184, 0.2);   /* slate-400 기반 */
    border: 1px solid var(--slate-400);
    border-radius: 4px;
}
.fearandgreed .greed {
    background: rgba(239, 68, 68, 0.2);     /* 차분한 레드 기반 */
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 4px;
}
.fearandgreed .extremegreed {
    background: rgba(220, 38, 38, 0.4);     /* 진한 레드 기반 */
    border: 1px solid rgba(220, 38, 38, 0.7);
    border-radius: 4px;
}

@media all and (min-width: 700px) {
    .fearandgreed .container { flex-direction: row; }
    .fearandgreed .gaugeItem { width: 50%; padding: 16px 0; }
}
@media all and (max-width: 699px) {
    .fearandgreed .container {
        flex-direction: column;
        align-items: center;
    }
    .fearandgreed .gaugeItem {
        width: 100%;
        padding: 8px 0;
    }
}

/* D3 Gauge Container */
.fearandgreed .gaugeItem:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
}

#KFearAndGreedGaugeContainer {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

#KFearAndGreedGaugeContainer svg {
    width: 100%;
    height: auto;
    display: block;
}
/******************************************************************************************************
** Fear And Greed End
*******************************************************************************************************/


/******************************************************************************************************
** Latest News Start
*******************************************************************************************************/
.latestNewsWrapper {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

@media all and (min-width: 700px) {
    .latestNewsWrapper {
        display: flex;
        flex-direction: column;
        color: var(--color-text);
    }
    .latestNewsWrapper h1 {
        font-size: 20px;
        font-weight: 700;
    }
    .latestNewsWrapper .category {
        font-size: 14px;
        padding: 8px 0;
        color: var(--color-text-secondary);
    }
    .latestNewsWrapper .content {
        flex: 1;
        font-size: 14px;
        padding: 0 24px 8px 24px;
    }
    .latestNewsWrapper .title {
        display: flex;
        flex-direction: row;
    }
    .latestNewsWrapper .title h2 {
        font-size: 15px;
        font-weight: 600;
    }
    .latestNewsWrapper .body {
        font-size: 14px;
        margin: 4px 0 16px;
        color: var(--color-text-secondary);
    }
    .news-additional-info {
        font-size: 12px;
        color: var(--color-text-muted);
    }
}

@media all and (max-width: 699px) {
    .latestNewsWrapper {
        display: flex;
        flex-direction: column;
        color: var(--color-text);
    }
    .latestNewsWrapper h1 {
        font-size: 16px;
        font-weight: 700;
    }
    .latestNewsWrapper .category {
        font-size: 13px;
        padding: 4px 0;
        color: var(--color-text-secondary);
    }
    .latestNewsWrapper .content {
        font-size: 12px;
        padding: 0 16px 4px 16px;
    }
    .latestNewsWrapper .title {
        display: flex;
        flex-direction: column;
    }
    .latestNewsWrapper .title h2 {
        font-size: 14px;
        font-weight: 600;
    }
    .latestNewsWrapper .body {
        font-size: 12px;
        margin: 4px 0 16px;
        color: var(--color-text-secondary);
    }
    .news-additional-info {
        font-size: 10px;
        color: var(--color-text-muted);
    }
}

.latestNews-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
}

.latestNews-details {
    margin-left: 20px;
    padding-left: 8px;
    padding-top: 8px;
    border-left: 2px solid var(--color-border);
    display: none;
}

.latestNews-summary {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
    border-radius: 4px;
    transition: background var(--transition);
}

.latestNews-summary:hover {
    background-color: var(--color-bg-secondary);
}

.summary-text {
    flex: 1;
}

.related-count {
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -1px;
    font-size: 10px;
    border-radius: 50%;
    margin-left: 10px;
    color: var(--color-text-muted);
}

/******************************************************************************************************
** Latest News End
*******************************************************************************************************/


/******************************************************************************************************
** Welcome Section
*******************************************************************************************************/
.welcome-section {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.welcome-card {
    text-align: center;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.welcome-subtitle {
    color: var(--color-text-secondary);
}

/******************************************************************************************************
** Utility Classes
*******************************************************************************************************/
.dis-flex { display: flex; }
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-align-btw { justify-content: space-between; }
.flex-align-center { align-items: center; }
.text-start { text-align: start; }
.text-end { text-align: end; }
.text-center { text-align: center; }
.align-middle { vertical-align: middle; }
.my-auto { margin-top: auto; margin-bottom: auto; }
.fs-10px { font-size: 10px; }
.fs-12px { font-size: 12px; }
.fw-800 { font-weight: 800; }
.w-24px { width: 24px; }
.w-40px { width: 40px; }
.h-24px { height: 24px; }
.pr-8px { padding-right: 8px; }
.pl-8px { padding-left: 8px; }
.pt-16px { padding-top: 16px; }
.grayFont { color: var(--color-text-secondary); }

/* Color Utilities - Slate 기반 */
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.bg-slate-50 { background-color: var(--slate-50); }
.bg-slate-100 { background-color: var(--slate-100); }

/******************************************************************************************************
** 모바일 반응형
*******************************************************************************************************/
@media (max-width: 767px) {
    .indexWrapper {
        padding: 0.75rem 0;
    }

    .fearandgreed {
        padding: 0.75rem 0;
    }

    .latestNewsWrapper {
        padding: 0.75rem 0;
    }

    .welcome-section {
        padding: 2rem 0;
    }
}