/* 기본 설정 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f6f8;
    color: #222;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 공통 컨테이너 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 버튼 */
.btn {
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-primary {
    background-color: #e53935;
    color: #fff;
}

    .btn-primary:hover {
        background-color: #c62828;
    }

.btn-outline {
    background-color: transparent;
    border: 1px solid #ccc;
    color: #333;
}

    .btn-outline:hover {
        border-color: #999;
        background-color: #f3f3f3;
    }

/* 링크 */
a {
    color: inherit;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* 카드 공통 */
.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    margin-bottom: 16px;
}

/* 헤더 */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e4e7ec;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
}

/* 로고 */
.logo a {
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.logo span {
    color: #e53935;
}

/* 메인 내비게이션 */
.main-nav {
    margin-left: 40px;
    flex: 1;
}

    .main-nav ul {
        list-style: none;
        display: flex;
        gap: 18px;
    }

    .main-nav a {
        font-size: 15px;
        padding-bottom: 4px;
        border-bottom: 2px solid transparent;
    }

        .main-nav a.active,
        .main-nav a:hover {
            border-bottom-color: #e53935;
            color: #e53935;
            text-decoration: none;
        }

/* 헤더 오른쪽 */
.header-actions {
    display: flex;
    gap: 8px;
}

/* 모바일 햄버거 버튼 */
.nav-toggle {
    display: none;
    margin-left: 12px;
    background: none;
    border: none;
    cursor: pointer;
}

    .nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background-color: #333;
        margin-bottom: 4px;
    }

/* 메인 레이아웃 */
.site-main {
    padding: 20px 0 32px;
    flex: 1 0 auto;
}

.main-grid {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 16px;
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

    .section-header h2 {
        font-size: 17px;
        font-weight: 600;
    }

.link-more {
    font-size: 13px;
    color: #777;
}

/* LIVE 섹션 */
.live-section .live-content {
    display: grid;
    grid-template-columns: 1.35fr 1.3fr;
    gap: 16px;
}

.live-thumbnail {
    position: relative;
    border-radius: 8px;
    background: linear-gradient(135deg, #111827, #4b5563);
    height: 260px;
    overflow: hidden;
}

.live-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.live-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.live-info .live-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.live-meta {
    font-size: 13px;
    color: #777;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.live-desc {
    font-size: 14px;
    color: #444;
    margin-bottom: 8px;
}

.live-tags .tag {
    display: inline-block;
    font-size: 12px;
    background-color: #f3f4f6;
    color: #555;
    padding: 4px 8px;
    border-radius: 999px;
    margin-right: 4px;
}

/* LIVE 상태 뱃지 */
.badge-live {
    display: inline-block;
    font-size: 12px;
    color: #e53935;
    background-color: #ffebee;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #ffcdd2;
}

/* VOD 섹션 */
.vod-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.vod-card {
    background-color: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vod-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
}

.vod-duration {
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-size: 11px;
    background-color: rgba(0,0,0,.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.vod-body {
    padding: 8px 10px 10px;
}

.vod-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.vod-meta {
    font-size: 12px;
    color: #888;
}

/* 전략 리스트 */
.strategy-list {
    list-style: none;
}

    .strategy-list li + li {
        border-top: 1px solid #f0f0f0;
    }

    .strategy-list a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 0;
        font-size: 14px;
    }

.strategy-title {
    max-width: 75%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.strategy-meta {
    font-size: 12px;
    color: #999;
}

/* 오른쪽 사이드바 */
.main-right {
    display: flex;
    flex-direction: column;
}

/* 시장 지표 */
.market-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.market-item {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr;
    font-size: 13px;
    padding: 6px 0;
}

.market-name {
    font-weight: 500;
}

.market-value {
    text-align: right;
}

.market-change {
    text-align: right;
    font-weight: 500;
}

/* 등락 색상 */
.market-item.up .market-change {
    color: #e53935;
}

.market-item.down .market-change {
    color: #1565c0;
}

.market-item.flat .market-change {
    color: #555;
}

/* 공지사항 */
.notice-list {
    list-style: none;
    font-size: 13px;
}

    .notice-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px solid #f2f2f2;
    }

        .notice-list li:last-child {
            border-bottom: none;
        }

.notice-date {
    color: #999;
    margin-left: 12px;
}

/* 전문가 카드 */
.expert-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
}

.expert-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e53935, #ff7043);
}

.expert-name {
    font-size: 16px;
    font-weight: 600;
}

.expert-tagline {
    font-size: 13px;
    color: #e53935;
    margin-bottom: 6px;
}

.expert-desc {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.expert-actions .btn {
    margin-bottom: 6px;
}

/* 푸터 */
.site-footer {
    border-top: 1px solid #e4e7ec;
    background-color: #ffffff;
    padding: 16px 0;
    font-size: 12px;
    color: #777;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo {
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-copy {
    margin-bottom: 2px;
}

.footer-right .footer-links {
    list-style: none;
    display: flex;
    gap: 12px;
}


/* Hero Slider */
.hero-slider {
    width: 100%;
    margin-bottom: 24px;
}

.hero-wrapper {
    position: relative;
    width: 100%;
    height: 360px;
    border-radius: 12px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .7s ease;
}

    .hero-slide.active {
        opacity: 1;
    }

.hero-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 16px;
}

    .hero-controls button {
        background: rgba(0,0,0,.35);
        border: none;
        color: white;
        font-size: 24px;
        padding: 8px 12px;
        border-radius: 6px;
        cursor: pointer;
    }


/* 모바일 전용 메뉴: 기본은 숨김 (데스크톱) */
.mobile-auth {
    display: none;
}


/* 반응형 */

@media (max-width: 768px) {
    .header-inner {
        height: 56px;
        padding: 8px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 0;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .header-actions {
        display: none;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background-color: #fff;
        border-bottom: 1px solid #e4e7ec;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        margin-left: 0;
        display: none;
        z-index: 40;
    }

        .main-nav.open {
            display: block;
        }

        /* ① ul에서는 좌우 패딩 제거 */
        .main-nav ul {
            flex-direction: column;
            padding: 8px 0;
            gap: 0;
        }

        /* ② 각 li에 좌우 16px 패딩 주기 → 메뉴와 로그인 모두 동일 여백 */
        .main-nav li {
            padding: 6px 16px;
            border-bottom: 1px solid #f3f3f3;
        }

            .main-nav li:last-child {
                border-bottom: none;
            }

        .main-nav a {
            display: block;
            border-bottom: 0;
            padding-bottom: 0;
        }

            .main-nav a.active,
            .main-nav a:hover {
                border-bottom: 0;
                color: #e53935;
                text-decoration: none;
            }

    /* ③ 모바일 로그인/회원가입 영역 – 위/아래 여백만 추가 */
    .mobile-auth {
        display: block;
        padding-top: 12px;
        padding-bottom: 16px;
        background-color: #fff;
    }

        /* ④ 버튼은 li 안에서 100% → 좌우 16px 여백 유지된 상태로 꽉 차게 */
        .mobile-auth .btn {
            display: block;
            width: 100%;
            margin: 0 auto;
            text-align: center;
            font-size: 14px;
            padding: 10px 0;
            border-radius: 6px;
        }

    /* VOD 카드 1열 */
    .vod-grid {
        grid-template-columns: 1fr;
    }
}


/* 태블릿/모바일에서는 메인 레이아웃을 1열로 */
@media (max-width: 960px) {
    .main-grid {
        grid-template-columns: 1fr; /* 왼쪽+오른쪽을 한 줄로 쌓기 */
    }

    /* 라이브 섹션 내부도 1열로 */
    .live-section .live-content {
        grid-template-columns: 1fr;
    }

    /* 오른쪽 사이드바는 위/아래 여백만 */
    .main-right {
        margin-top: 16px;
    }
}

/* =====================================
   공통 Validation (ASP.NET/MVC 스타일)
   ===================================== */
.text-danger {
    color: #c62828;
}

.field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #c62828;
}

    .field-validation-error span {
        color: inherit;
    }

.input-validation-error,
input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
    border-color: #e53935;
    background: #fff5f5;
}

/* ===== 페이징 ===== */
.pagination {
    margin-top: 12px;
    text-align: center;
}

.page-btn {
    border: 1px solid #ddd;
    background-color: #fff;
    font-size: 13px;
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
}

    .page-btn.is-active {
        border-color: #e53935;
        background-color: #e53935;
        color: #fff;
    }
/* 플로팅 배너 */
.popup_floating {
    position: fixed;
    top: 270px;
    right: 50%;
    margin-right: -800px;
    z-index: 500;
    width: 283px;
    height: 256px;
}

.btn_close_popup {
    position: absolute;
    top: 5px;
    right: 5px;
}

    .btn_close_popup img {
        width: 30px;
        height: 30px;
    }

.btn_close_today_popup {
    position: absolute;
    bottom: -15px;
    display: block;
    width: 100%;
    text-align: right;
    color: #000;
    box-sizing: border-box;
    width: 100%;
    font-size: 12px;
    font-weight: bold;
}
