/* 모던한 다크/라이트 모드 디자인 - 성능 최적화 */
:root {
    /* 라이트 모드 */
    --bg-primary-light: #f5f7fb;
    --bg-secondary-light: #eef3f8;
    --bg-card-light: #ffffff;
    --text-primary-light: #111827;
    --text-secondary-light: #5b6472;
    --border-light: #d8e0ea;
    --accent-light: #2563eb;
    --success-light: #059669;
    --danger-light: #dc2626;
    --shadow-light: 0 14px 36px rgba(15, 23, 42, 0.08);

    /* 다크 모드 */
    --bg-primary-dark: #08111f;
    --bg-secondary-dark: #101d2e;
    --bg-card-dark: #142237;
    --text-primary-dark: #f3f7fb;
    --text-secondary-dark: #a8b3c2;
    --border-dark: #253650;
    --accent-dark: #38bdf8;
    --success-dark: #34d399;
    --danger-dark: #f87171;
    --shadow-dark: 0 22px 44px rgba(0, 0, 0, 0.28);

    --warning: #f59e0b;
    --cyan: #0891b2;
    --violet: #7c3aed;
    --surface-strong-light: #0f172a;
    --surface-strong-dark: #0b1423;
    --terminal-green: #4ade80;

    /* 기본값 (라이트 모드) */
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --bg-card: var(--bg-card-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border: var(--border-light);
    --accent: var(--accent-light);
    --success: var(--success-light);
    --danger: var(--danger-light);
    --shadow: var(--shadow-light);
    --primary-color: var(--accent);
    --card-bg: var(--bg-card);
    --bg-color: var(--bg-secondary);
    --border-color: var(--border);
    --text-color: var(--text-primary);
}

/* 다크 모드 클래스 */
[data-theme="dark"] {
    --bg-primary: var(--bg-primary-dark);
    --bg-secondary: var(--bg-secondary-dark);
    --bg-card: var(--bg-card-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --border: var(--border-dark);
    --accent: var(--accent-dark);
    --success: var(--success-dark);
    --danger: var(--danger-dark);
    --shadow: var(--shadow-dark);
}

/* 성능 최적화를 위한 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* GPU 가속을 위한 transform 최적화 */
.coin-item,
.menu-btn,
.modal-content {
    will-change: transform;
    transform: translateZ(0);
}

/* iOS Safari에서 전체 높이 설정 */
html {
    height: -webkit-fill-available;
    background: var(--bg-primary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(8, 145, 178, 0.04) 260px, var(--bg-primary) 620px);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 성능 최적화 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* iOS 안전 영역 설정 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* iOS Safari 전체 높이 설정 */
    min-height: -webkit-fill-available;
    /* 노치 영역 배경색 강제 설정 */
    background-color: var(--bg-primary) !important;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

[id^="aswift_"][id$="_host"],
iframe[id^="aswift_"] {
    max-width: 100vw !important;
}

[id^="aswift_"][id$="_host"] {
    overflow: hidden !important;
}

/* 노치 영역 배경색 강제 설정 */
@supports (padding: max(0px)) {
    body {
        padding-top: max(env(safe-area-inset-top), 0px);
        padding-bottom: max(env(safe-area-inset-bottom), 0px);
        padding-left: max(env(safe-area-inset-left), 0px);
        padding-right: max(env(safe-area-inset-right), 0px);
    }
}

/* iOS 상태바 배경색 강제 설정 */
@supports (-webkit-touch-callout: none) {
    body {
        background-color: var(--bg-primary) !important;
    }

    /* 상태바 영역 배경색 설정 */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: env(safe-area-inset-top);
        background-color: var(--bg-primary);
        z-index: 9999;
    }
}

.container {
    max-width: 1420px;
    margin: 0 auto;
    padding: 18px 24px 24px;
    min-height: 100vh;
    /* iOS 안전 영역 고려 */
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
}

/* 상단 내비게이션 */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 58px;
    margin-bottom: 18px;
    padding: 10px 4px;
    color: var(--text-primary);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
    color: var(--text-primary);
    text-decoration: none;
}

.brand-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #03101c;
    background: linear-gradient(135deg, #2ee59d, #38bdf8);
    border-radius: 8px;
    font-weight: 900;
}

.brand-mark strong {
    display: block;
    font-size: 1.12rem;
    line-height: 1;
}

.brand-mark small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.nav-links a {
    padding: 9px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 150px;
}

.nav-icon-btn,
.nav-currency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
}

.nav-icon-btn {
    width: 40px;
    font-size: 1.22rem;
}

.nav-currency {
    min-width: 72px;
    padding: 0 14px;
}

.nav-language-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    height: 40px;
    padding: 3px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.site-lang-btn {
    min-width: 38px;
    height: 32px;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 900;
}

.site-lang-btn.active {
    color: #03101c;
    background: linear-gradient(135deg, #2ee59d, #38bdf8);
}

.nav-links a[aria-current="page"] {
    color: var(--text-primary);
    background: rgba(56, 189, 248, 0.12);
}

/* 새 홈 대시보드 */
.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 34px;
    align-items: stretch;
    min-height: 480px;
    margin-bottom: 24px;
    padding: 42px;
    color: #ffffff;
    background:
        radial-gradient(circle at 73% 48%, rgba(147, 51, 234, 0.34), transparent 22%),
        radial-gradient(circle at 54% 72%, rgba(56, 189, 248, 0.18), transparent 26%),
        linear-gradient(135deg, rgba(3, 7, 18, 0.98), rgba(15, 23, 42, 0.95)),
        linear-gradient(90deg, rgba(37, 99, 235, 0.32), rgba(5, 150, 105, 0.24));
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 5px;
    background: linear-gradient(90deg, var(--success), var(--accent), var(--warning), var(--danger));
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
}

.hero-section .logo-container {
    justify-content: flex-start;
    width: 100%;
}

.hero-eyebrow,
.section-kicker {
    margin-bottom: 12px;
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-title {
    max-width: 720px;
    margin: 0;
    color: #ffffff;
    font-size: 4.2rem;
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: 0;
    text-align: left;
    word-break: keep-all;
    overflow-wrap: normal;
}

.hero-title:hover {
    color: #ffffff;
}

.hero-subtitle {
    max-width: 740px;
    margin: 22px 0 0;
    color: #dbe7f6;
    font-size: 1.08rem;
    line-height: 1.78;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.coin-category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.coin-category-strip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 32px;
    padding: 0 10px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 900;
}

.hero-action,
.mini-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(147, 197, 253, 0.32);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-action:hover,
.mini-link-button:hover {
    transform: translateY(-1px);
    border-color: rgba(74, 222, 128, 0.8);
    background: rgba(15, 23, 42, 0.92);
}

.hero-action.primary {
    color: #04111f;
    background: linear-gradient(135deg, #4ade80, #38bdf8);
    border-color: transparent;
}

.market-terminal {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 396px;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(8, 17, 31, 0.72), rgba(8, 13, 26, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    overflow: hidden;
}

.market-terminal > *:not(.coin-orbit) {
    position: relative;
    z-index: 2;
}

.coin-orbit {
    position: absolute;
    inset: 42px 22px auto auto;
    width: min(62%, 330px);
    aspect-ratio: 1;
    opacity: 0.9;
    pointer-events: none;
}

.orbit-grid {
    position: absolute;
    inset: 18%;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 50%;
    box-shadow:
        0 0 0 28px rgba(56, 189, 248, 0.05),
        0 0 0 58px rgba(147, 51, 234, 0.05),
        0 0 48px rgba(168, 85, 247, 0.45);
}

.coin-core {
    position: absolute;
    inset: 50% auto auto 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    color: #ffcf72;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 236, 179, 0.34), rgba(245, 158, 11, 0.2) 38%, rgba(20, 13, 5, 0.88) 70%),
        linear-gradient(135deg, #f59e0b, #7c2d12);
    border: 2px solid rgba(251, 191, 36, 0.78);
    border-radius: 50%;
    box-shadow: 0 0 42px rgba(245, 158, 11, 0.42);
    font-size: 3.8rem;
    font-weight: 900;
    transform: translate(-50%, -50%);
}

.orbit-coin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 38px;
    padding: 0 10px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(125, 211, 252, 0.32);
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
    font-size: 0.72rem;
    font-weight: 900;
}

.orbit-coin-eth {
    top: 4%;
    left: 22%;
}

.orbit-coin-sol {
    top: 34%;
    left: 0;
}

.orbit-coin-doge {
    right: 0;
    top: 35%;
}

.orbit-coin-pepe {
    bottom: 12%;
    left: 18%;
}

.terminal-header,
.terminal-tape,
.section-title-row {
    display: flex;
    align-items: center;
}

.terminal-header {
    justify-content: space-between;
    gap: 12px;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 800;
}

.live-dot {
    width: 9px;
    height: 9px;
    background: var(--terminal-green);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.16);
}

.terminal-featured {
    display: grid;
    gap: 8px;
    padding: 188px 0 24px;
}

.terminal-label {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
}

#hero-focus-symbol {
    display: block;
    max-width: 100%;
    color: #ffffff;
    font-size: 3.6rem;
    line-height: 0.92;
    font-weight: 900;
    overflow-wrap: anywhere;
}

#hero-focus-meta {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.terminal-bars {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: end;
    gap: 8px;
    height: 104px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
}

.terminal-bars span {
    display: block;
    min-height: 16px;
    background: linear-gradient(180deg, #38bdf8, #4ade80);
    border-radius: 4px 4px 0 0;
}

.terminal-tape {
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.terminal-tape span {
    padding: 7px 10px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.terminal-tape span.positive {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.18);
    border-color: rgba(74, 222, 128, 0.24);
}

.terminal-tape span.negative {
    color: #fecaca;
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(248, 113, 113, 0.24);
}

.ticker-ribbon {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 1px;
    margin: -6px 0 18px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.ticker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    background: rgba(15, 23, 42, 0.58);
}

.ticker-item strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.ticker-item span {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 서브페이지 공통 셸 */
body.subpage {
    background:
        radial-gradient(circle at 78% 4%, rgba(124, 58, 237, 0.16), transparent 26%),
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.1), transparent 24%),
        var(--bg-primary);
}

body.subpage .container {
    max-width: 1180px;
    padding-top: 16px;
}

body.subpage .theme-toggle,
body.subpage .navbar,
body.subpage .nav-container {
    display: none !important;
}

body.subpage .site-nav {
    margin-bottom: 24px;
}

body.subpage .subpage-hero,
body.subpage .header,
body.subpage .analysis-header,
body.subpage .guide-header,
body.subpage .trading-header,
body.subpage .safety-header,
body.subpage .faq-header,
body.subpage .contact-header,
body.subpage .error-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 26px;
    padding: 34px !important;
    color: #ffffff !important;
    text-align: left !important;
    background:
        radial-gradient(circle at 82% 32%, rgba(34, 211, 238, 0.16), transparent 24%),
        radial-gradient(circle at 92% 74%, rgba(168, 85, 247, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(3, 7, 18, 0.98), rgba(15, 23, 42, 0.94)) !important;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 8px !important;
    box-shadow: var(--shadow);
}

body.subpage .subpage-hero::after,
body.subpage .header::after,
body.subpage .analysis-header::after,
body.subpage .guide-header::after,
body.subpage .trading-header::after,
body.subpage .safety-header::after,
body.subpage .faq-header::after,
body.subpage .contact-header::after,
body.subpage .error-container::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, #2ee59d, #38bdf8, #a855f7, #f59e0b);
}

body.subpage .subpage-kicker {
    margin: 0 0 10px;
    color: #7dd3fc;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

body.subpage .subpage-summary {
    max-width: 720px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.7;
}

body.subpage .header h1,
body.subpage .analysis-title,
body.subpage .guide-title,
body.subpage .trading-title,
body.subpage .safety-title,
body.subpage .faq-title,
body.subpage .contact-title,
body.subpage .error-title {
    color: #ffffff !important;
    font-size: 3.45rem !important;
    line-height: 1.08;
    letter-spacing: 0;
}

body.subpage .header p,
body.subpage .analysis-subtitle,
body.subpage .guide-subtitle,
body.subpage .trading-subtitle,
body.subpage .safety-subtitle,
body.subpage .faq-subtitle,
body.subpage .contact-subtitle {
    color: #cbd5e1 !important;
}

body.subpage .analysis-container,
body.subpage .guide-container,
body.subpage .trading-container,
body.subpage .safety-container,
body.subpage .faq-container,
body.subpage .contact-container,
body.subpage .about-content {
    max-width: none !important;
    padding: 0 !important;
}

body.subpage .about-section,
body.subpage .method-section,
body.subpage .content-section,
body.subpage .trading-section,
body.subpage .safety-section,
body.subpage .faq-section,
body.subpage .contact-content,
body.subpage .contact-card,
body.subpage .progress-bar,
body.subpage .emergency-section {
    background:
        linear-gradient(180deg, rgba(20, 34, 55, 0.94), rgba(10, 18, 32, 0.88)) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow);
}

body.subpage .feature-item,
body.subpage .tech-item,
body.subpage .technique-card,
body.subpage .concept-card,
body.subpage .order-card,
body.subpage .risk-item,
body.subpage .security-item,
body.subpage .faq-item,
body.subpage .contact-method {
    background: rgba(15, 23, 42, 0.58) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
}

body.subpage .btn-primary,
body.subpage .tab-btn.active,
body.subpage .filter-btn.active {
    background: linear-gradient(135deg, #2ee59d, #38bdf8) !important;
    color: #03101c !important;
    border-color: transparent !important;
}

body.subpage .method-tabs {
    display: flex !important;
    gap: 8px !important;
    margin: 24px 0 18px !important;
    padding: 6px !important;
    background: rgba(15, 23, 42, 0.72) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
}

body.subpage .tab-btn {
    min-height: 42px !important;
    padding: 0 16px !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
}

body.subpage .tab-btn.active {
    box-shadow: 0 10px 22px rgba(56, 189, 248, 0.18);
}

body.subpage .section-header {
    align-items: flex-start !important;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.subpage .section-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #03101c !important;
    background: linear-gradient(135deg, #2ee59d, #38bdf8) !important;
    border-radius: 8px;
    -webkit-text-fill-color: initial !important;
}

body.subpage .section-title {
    color: var(--text-primary) !important;
}

body.subpage .warning-box,
body.subpage .practical-example,
body.subpage .tools-section {
    color: var(--text-primary) !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(8, 17, 31, 0.92)) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
}

body.subpage .tool-item {
    background: rgba(15, 23, 42, 0.64) !important;
    border: 1px solid var(--border) !important;
}

.analysis-dashboard {
    display: grid;
    gap: 16px;
    margin: 0 0 24px;
}

.analysis-dashboard-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 16px;
}

.analysis-panel,
.analysis-signal-card {
    background:
        linear-gradient(180deg, rgba(20, 34, 55, 0.94), rgba(10, 18, 32, 0.88));
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.analysis-panel {
    padding: 22px;
}

.analysis-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.analysis-panel-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.32rem;
    line-height: 1.25;
}

.analysis-range-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.analysis-range-tabs button {
    min-width: 42px;
    height: 32px;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 900;
}

.analysis-range-tabs button.active {
    color: #03101c;
    background: linear-gradient(135deg, #2ee59d, #38bdf8);
}

.analysis-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.analysis-stat-card {
    display: grid;
    gap: 6px;
    min-height: 104px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
}

.analysis-stat-card span,
.analysis-chart-copy span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.analysis-stat-card strong {
    color: var(--text-primary);
    font-size: 1.34rem;
    line-height: 1.1;
}

.analysis-stat-card small {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.analysis-stat-card .positive,
.analysis-watch-row .positive,
.analysis-chart-copy em {
    color: var(--success);
}

.analysis-chart-card {
    display: grid;
    grid-template-columns: minmax(240px, 0.64fr) minmax(300px, 1fr);
    gap: 18px;
    min-height: 228px;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.56), rgba(8, 17, 31, 0.76));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
}

.analysis-chart-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.analysis-chart-copy strong {
    color: var(--text-primary);
    font-size: 2.7rem;
    line-height: 1;
}

.analysis-chart-copy em {
    font-size: 1rem;
    font-style: normal;
}

.analysis-chart-copy p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

.analysis-line-chart {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    align-items: end;
    gap: 8px;
    min-height: 190px;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(56, 189, 248, 0.08), transparent),
        repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 38px);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
}

.analysis-line-chart span {
    display: block;
    min-height: 22px;
    background: linear-gradient(180deg, #2ee59d, rgba(46, 229, 157, 0.18));
    border-radius: 5px 5px 0 0;
    box-shadow: 0 -10px 22px rgba(46, 229, 157, 0.16);
}

.analysis-watch-panel {
    display: flex;
    flex-direction: column;
}

.analysis-watch-list {
    display: grid;
    gap: 8px;
}

.analysis-watch-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 9px 10px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
}

.coin-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #03101c;
    border-radius: 50%;
    font-weight: 900;
}

.coin-dot.bitcoin { background: #f59e0b; }
.coin-dot.ethereum { background: #8b5cf6; color: #ffffff; }
.coin-dot.solana { background: #2ee59d; }
.coin-dot.doge { background: #facc15; }
.coin-dot.pepe { background: #22c55e; }

.analysis-watch-row strong {
    color: var(--text-primary);
    font-size: 0.92rem;
}

.analysis-watch-row small {
    margin-left: 4px;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.analysis-watch-row em {
    font-style: normal;
    font-weight: 900;
}

.analysis-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.analysis-signal-card {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.signal-index {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
}

.analysis-signal-card strong {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.35;
}

.analysis-signal-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.metric-card,
.strategy-strip article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    gap: 8px;
    min-height: 136px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.82));
}

.metric-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--success));
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 800;
}

.metric-card strong {
    color: var(--text-primary);
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 900;
}

.metric-card small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.attention-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 16px;
    margin-bottom: 20px;
}

.attention-panel {
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(20, 34, 55, 0.92), rgba(10, 18, 32, 0.86));
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.attention-panel-main {
    min-height: 320px;
}

.section-title-row {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title-row h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.35rem;
    line-height: 1.25;
}

.section-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--cyan);
}

.mini-link-button {
    flex: 0 0 auto;
    min-height: 36px;
    color: var(--accent);
    background: var(--bg-secondary);
    border-color: var(--border);
}

.hot-coin-list,
.signal-list {
    display: grid;
    gap: 10px;
}

.hot-coin-item,
.signal-item {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.hot-coin-item {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
}

.hot-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #ffffff;
    background: var(--surface-strong-light);
    border-radius: 8px;
    font-weight: 900;
    font-size: 0.86rem;
}

[data-theme="dark"] .hot-rank {
    background: #1e3a8a;
}

.hot-symbol {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 900;
}

.hot-meta,
.hot-change,
.signal-item span {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.hot-change {
    font-weight: 900;
    text-align: right;
}

.hot-change.positive {
    color: var(--success);
}

.hot-change.negative {
    color: var(--danger);
}

.signal-item strong {
    color: var(--text-primary);
    font-size: 0.96rem;
}

.signal-item[data-tone="green"] {
    border-left: 4px solid var(--success);
}

.signal-item[data-tone="amber"] {
    border-left: 4px solid var(--warning);
}

.signal-item[data-tone="blue"] {
    border-left: 4px solid var(--accent);
}

.strategy-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.strategy-strip article {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.strategy-number {
    color: var(--warning);
    font-size: 0.78rem;
    font-weight: 900;
}

.strategy-strip strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.strategy-strip p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

.seo-topic-section {
    margin: 28px 0;
    padding: 0 20px;
}

.seo-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.seo-topic-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.seo-topic-card:hover,
.seo-topic-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent);
    outline: none;
}

.seo-topic-card small {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
}

.seo-topic-card strong {
    font-size: 1.08rem;
    line-height: 1.35;
}

.seo-topic-card span {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.92rem;
}

.seo-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px 56px;
}

.seo-answer-block,
.seo-checklist,
.seo-faq,
.seo-related {
    background:
        linear-gradient(180deg, rgba(20, 34, 55, 0.94), rgba(10, 18, 32, 0.88));
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 18px;
}

.seo-answer-block h2,
.seo-checklist h2,
.seo-faq h2,
.seo-related h2 {
    color: var(--text-primary);
    font-size: 1.45rem;
    margin-bottom: 12px;
}

.seo-answer-block p,
.seo-answer-block li,
.seo-checklist li,
.seo-faq p {
    color: var(--text-secondary);
    line-height: 1.72;
}

.seo-answer-block > p:first-of-type {
    color: var(--text-primary);
    font-size: 1.04rem;
}

.seo-signal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    overflow: hidden;
    border-radius: 8px;
}

.seo-signal-table th,
.seo-signal-table td {
    padding: 13px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.seo-signal-table th {
    color: var(--text-primary);
    background: rgba(56, 189, 248, 0.1);
}

.seo-signal-table td {
    color: var(--text-secondary);
}

.seo-checklist ol,
.seo-checklist ul,
.seo-answer-block ol,
.seo-answer-block ul {
    padding-left: 22px;
}

.seo-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.seo-related-grid a {
    padding: 14px;
    color: var(--text-primary);
    text-decoration: none;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.seo-related-grid a:hover {
    border-color: var(--accent);
}

.skeleton-line {
    height: 58px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-secondary), rgba(148, 163, 184, 0.22), var(--bg-secondary));
    background-size: 220% 100%;
    animation: loadingBar 1.4s ease-in-out infinite;
}

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

@media (max-width: 980px) {
    .site-nav {
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .hero-section,
    .attention-layout {
        grid-template-columns: 1fr;
    }

    .hero-section {
        min-height: auto;
        padding: 28px;
    }

    .market-terminal {
        min-height: 300px;
    }

    .ticker-ribbon {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .strategy-strip {
        grid-template-columns: 1fr;
    }

    .seo-topic-section {
        padding: 0 14px;
    }

    .seo-page {
        padding: 0 14px 42px;
    }

    .seo-answer-block,
    .seo-checklist,
    .seo-faq,
    .seo-related {
        padding: 18px;
    }

    .seo-signal-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .site-nav {
        gap: 12px;
        padding: 6px 0 10px;
    }

    .brand-mark {
        min-width: 0;
    }

    .brand-symbol {
        width: 38px;
        height: 38px;
    }

    .brand-mark strong {
        font-size: 1rem;
    }

    .brand-mark small,
    .nav-links {
        display: none;
    }

    .nav-tools {
        min-width: 0;
    }

    .hero-section {
        padding: 22px;
        gap: 22px;
    }

    .hero-title {
        font-size: 2.65rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .hero-actions {
        width: 100%;
    }

    .coin-category-strip span {
        min-width: 56px;
        flex: 1 1 calc(25% - 8px);
    }

    .hero-action {
        flex: 1 1 100%;
        width: 100%;
    }

    .market-terminal {
        padding: 20px;
        min-height: 420px;
    }

    .coin-orbit {
        inset: 86px 10px auto auto;
        width: 76%;
        opacity: 0.58;
    }

    .coin-core {
        width: 92px;
        height: 92px;
        font-size: 3rem;
    }

    .orbit-coin {
        min-width: 48px;
        height: 34px;
        font-size: 0.65rem;
    }

    .terminal-featured {
        padding-top: 198px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .terminal-bars {
        height: 92px;
    }

    .ticker-ribbon {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .mini-link-button {
        width: 100%;
    }

    .hot-coin-item {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .hot-change {
        grid-column: 2;
        text-align: left;
    }
}

/* 헤더 */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 0;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.logo:hover {
    transform: scale(1.05);
    color: var(--accent);
}

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

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}



/* 메뉴 바 */
.menu-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* 1위 코인 정보 */
.top-coin-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.top-coin-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

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

.top-coin-details {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.top-coin-details .positive {
    color: var(--success);
    font-weight: 600;
}

.top-coin-details .negative {
    color: var(--danger);
    font-weight: 600;
}

.top-coin-details .coin-symbol-colored {
    font-weight: 700;
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.top-coin-details .news-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.top-coin-details .news-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.top-coin-details .additional-info {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .top-coin-info {
        padding: 10px 12px;
        margin-bottom: 15px;
    }
    
    .top-coin-content {
        flex-direction: column;
        gap: 4px;
    }
    
    .top-coin-label {
        font-size: 0.8rem;
    }
    
    .top-coin-details {
        font-size: 0.8rem;
    }
}

.menu-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
    white-space: nowrap;
}

.menu-btn:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

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

.menu-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.menu-btn.active:hover {
    opacity: 0.9;
}

/* 컨트롤 */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.update-info {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}



/* 코인 리스트 */
.coin-list {
    padding: 20px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    cursor: grab;
}

.coin-list:active {
    cursor: grabbing;
}

/* 코인 테이블 헤더 */
.list-header {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 100px 100px 80px;
    gap: 15px;
    padding: 20px;
    background: var(--bg-secondary);
    font-weight: 700;
    color: var(--text-secondary);
    border-radius: 12px 12px 0 0;
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0;
    min-width: 900px;
}

.list-header .sortable {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.list-header .sortable:hover {
    color: var(--accent);
}

.list-header .sortable.active {
    color: var(--accent);
}

.list-header .sortable span {
    font-size: 0.7em;
}

.coin-item {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 100px 100px 80px;
    gap: 15px;
    align-items: center;
    padding: 20px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    min-width: 900px;
    user-select: none;
}

.coin-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.coin-item.rank-up {
    border-color: var(--success);
}

.coin-item.rank-down {
    border-color: var(--danger);
}

/* 라이트 모드에서만 상위 3위 스타일 적용 */
[data-theme="light"] .coin-item:nth-child(1) { 
    border-left: 4px solid #ffd700;
    background: linear-gradient(135deg, #fffbf0 0%, var(--bg-card) 100%);
}
[data-theme="light"] .coin-item:nth-child(2) { 
    border-left: 4px solid #c0c0c0;
    background: linear-gradient(135deg, #f8f9fa 0%, var(--bg-card) 100%);
}
[data-theme="light"] .coin-item:nth-child(3) { 
    border-left: 4px solid #cd7f32;
    background: linear-gradient(135deg, #fff8f0 0%, var(--bg-card) 100%);
}

.rank {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-primary);
    text-align: center;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
}

.rank-arrow {
    font-size: 0.8rem;
    margin-top: 2px;
}

.rank-up {
    color: var(--success);
    animation: bounce 0.6s ease-in-out;
}

.rank-down {
    color: var(--danger);
    animation: shake 0.6s ease-in-out;
}

.rank-same {
    color: var(--text-secondary);
}

.rank-new {
    color: #f59e0b;
    animation: pulse 1s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

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

.coin-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    height: 100%;
}

.coin-symbol {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.coin-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 롱숏 비율 컬럼 */
.longshort-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
}

.volume-display {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 4px;
}

.longshort-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 100%;
}

.mini-ratio-bar {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mini-long-bar {
    background: linear-gradient(90deg, var(--success), #059669);
    height: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.mini-short-bar {
    background: linear-gradient(90deg, var(--danger), #dc2626);
    height: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.mini-ratio-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

.no-data {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.price {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.krw-price {
    font-weight: 700;
    color: var(--success);
    font-size: 1rem;
}

.volume {
    font-weight: 700;
    color: var(--success);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.change {
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 20px;
}

.change.positive {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.change.negative {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.volume-surge {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
}

.volume-surge-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.volume-high-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    min-width: 60px;
    text-align: center;
}

/* 거래량 급증 배지 스타일 */
.volume-surge-badge.volume-high {
    background: #f59e0b;
    color: white;
    font-weight: bold;
}

.volume-surge-badge.volume-medium {
    background: #fbbf24;
    color: white;
    font-weight: bold;
}

.volume-surge-badge.volume-low {
    background: #fde047;
    color: #92400e;
    font-weight: bold;
}


/* 로딩 */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.loading-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* 에러 */
.error {
    text-align: center;
    padding: 40px 20px;
    color: var(--danger);
}

.error h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.error p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* 푸터 */
.footer {
    margin-top: 40px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.footer-link:hover {
    color: var(--text-primary);
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* 언어 선택기 */
.language-selector {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent);
}

.lang-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.lang-btn.active:hover {
    background: var(--accent);
    color: white;
}

@media (max-width: 768px) {
    .language-selector {
        justify-content: center;
        margin-top: 8px;
    }
    
    .lang-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-width: 50px;
    }
}

/* 언어 변경 알림 애니메이션 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 시장 심리 지표 스타일 */
.market-sentiment {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.sentiment-header {
    margin-bottom: 10px;
}

.sentiment-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.sentiment-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sentiment-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sentiment-emoji {
    font-size: 1.5rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.sentiment-status {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.sentiment-ratio {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

.sentiment-details {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ratio-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-secondary);
}

.ratio-item:first-child {
    color: var(--success);
    font-weight: 500;
}

.ratio-item:last-child {
    color: var(--danger);
    font-weight: 500;
}

@media (max-width: 768px) {
    .market-sentiment {
        padding: 12px;
        margin: 10px 0;
    }
    
    .sentiment-main {
        flex-direction: column;
        gap: 4px;
    }
    
    .sentiment-emoji {
        font-size: 1.3rem;
    }
    
    .sentiment-status {
        font-size: 0.85rem;
    }
    
    .sentiment-ratio {
        font-size: 0.75rem;
    }
    
    .sentiment-details {
        gap: 10px;
    }
    
    .ratio-item {
        font-size: 0.75rem;
    }
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.api-info {
    color: var(--text-secondary);
}

.api-info h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.api-item {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.api-item strong {
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.api-item p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* 코인 상세 정보 모달 스타일 */
.coin-detail {
    color: var(--text-primary);
}

.coin-header {
    margin-bottom: 20px;
}

.coin-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.coin-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.coin-rank {
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.coin-price-section {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.current-price {
    text-align: center;
}

.price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.price-krw {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.price-change {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.price-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.price-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.coin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.positive {
    color: var(--success);
}

.stat-value.negative {
    color: var(--danger);
}

.sparkline-section {
    margin-bottom: 25px;
}

.sparkline-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.sparkline-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.sparkline-placeholder {
    text-align: center;
}

.sparkline-chart {
    margin-bottom: 10px;
    /* 겹침 방지를 위한 위치 설정 */
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.sparkline-placeholder canvas,
.sparkline-chart {
    width: 120px;
    height: 60px;
    border-radius: 4px;
}

.sparkline-chart svg {
    width: 100%;
    height: 100%;
}

/* 모달 내부 스파크차트 크기 강제 설정 */
.modal .sparkline-chart {
    width: 300px !important;
    height: 50px !important;
    min-width: 300px !important;
    min-height: 50px !important;
    border: none !important;
}

.modal .sparkline-chart svg {
    width: 300px !important;
    height: 50px !important;
    border: none !important;
}

.sparkline-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 10px;
}

.coin-info-section {
    margin-bottom: 20px;
}

.coin-info-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* 반응형 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .menu-bar {
        margin-bottom: 15px;
        gap: 8px;
    }
    
    .menu-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .update-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .coin-list {
        padding: 15px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        max-height: none;
        /* 모바일에서 겹침 방지 */
        position: relative;
        z-index: 1;
    }
    
    .coin-item, .list-header {
        min-width: 500px;
        grid-template-columns: 35px 70px 70px 70px 70px 70px 60px;
        gap: 3px;
        font-size: 0.75rem;
        /* 모바일에서 겹침 방지 */
        position: relative;
        z-index: 1;
        margin-bottom: 8px;
    }
    
    /* 모바일에서 헤더 숨김 */
    .list-header {
        display: none;
    }
    
    .coin-item {
        padding: 8px;
    }
    
    .list-header {
        padding: 8px;
        /* 헤더 고정 높이 */
        min-height: 40px;
        display: flex;
        align-items: center;
        /* 모바일에서 헤더 텍스트 간격 조정 */
        gap: 2px;
    }
    
    /* 모바일에서 헤더 텍스트 크기 조정 */
    .list-header .col-rank {
        font-size: 0.7rem;
    }
    
    .list-header .col-coin {
        font-size: 0.7rem;
    }
    
    .list-header .col-longshort {
        font-size: 0.65rem;
    }
    
    .list-header .col-volume {
        font-size: 0.7rem;
    }
    
    .list-header .col-change {
        font-size: 0.7rem;
    }
    
    .list-header .col-sparkline {
        font-size: 0.7rem;
    }
    
    .list-header .col-interest {
        font-size: 0.7rem;
    }
    
    .coin-symbol {
        font-size: 1rem;
        /* 텍스트 겹침 방지 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .volume, .change, .volume-surge {
        font-size: 0.7rem;
        /* 텍스트 겹침 방지 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .volume-high-badge {
        font-size: 0.45rem;
        padding: 1px 2px;
        min-width: 35px;
        /* 배지 겹침 방지 */
        position: relative;
        z-index: 2;
    }
    
    .mini-ratio-text {
        font-size: 0.6rem;
        /* 텍스트 겹침 방지 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 모바일에서 스파크라인 차트 크기 조정 */
    .sparkline-chart {
        width: 60px !important;
        height: 30px !important;
        margin-bottom: 5px;
    }
    
    /* AI 배지 겹침 방지 */
    .ai-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        z-index: 10;
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .ai-score {
        position: absolute;
        top: 28px;
        right: 6px;
        z-index: 10;
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 85vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 모바일에서 모달 내 스파크차트 크기 조정 */
    .modal .sparkline-chart {
        width: 250px !important;
        height: 40px !important;
        min-width: 250px !important;
        min-height: 40px !important;
    }
    
    .modal .sparkline-chart svg {
        width: 250px !important;
        height: 40px !important;
    }
    
    .modal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    

    
    /* 모바일 모달 스타일 */
    .coin-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .price-main {
        font-size: 1.5rem;
    }
    
    .coin-title h3 {
        font-size: 1.3rem;
    }
    
    /* 모바일에서 푸터 링크 최적화 */
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-link {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* 매우 작은 화면 최적화 */
@media (max-width: 480px) {
    .coin-item, .list-header {
        min-width: 400px;
        grid-template-columns: 25px 60px 60px 60px 60px 60px 50px;
        gap: 2px;
        font-size: 0.65rem;
        /* 매우 작은 화면에서 겹침 방지 */
        margin-bottom: 6px;
    }
    
    /* 매우 작은 화면에서도 헤더 숨김 */
    .list-header {
        display: none;
    }
    
    .coin-item {
        padding: 6px;
    }
    
    .list-header {
        min-height: 35px;
        padding: 6px;
        /* 매우 작은 화면에서 헤더 텍스트 크기 조정 */
        gap: 1px;
    }
    
    /* 매우 작은 화면에서 헤더 텍스트 크기 조정 */
    .list-header .col-rank {
        font-size: 0.6rem;
    }
    
    .list-header .col-coin {
        font-size: 0.6rem;
    }
    
    .list-header .col-longshort {
        font-size: 0.55rem;
    }
    
    .list-header .col-volume {
        font-size: 0.6rem;
    }
    
    .list-header .col-change {
        font-size: 0.6rem;
    }
    
    .list-header .col-sparkline {
        font-size: 0.6rem;
    }
    
    .list-header .col-interest {
        font-size: 0.6rem;
    }
    
    /* AI 배지 크기 조정 */
    .ai-badge {
        font-size: 0.6rem;
        padding: 3px 6px;
        top: 2px;
        right: 2px;
    }
    
    .ai-score {
        font-size: 0.5rem;
        padding: 1px 3px;
        top: 22px;
        right: 4px;
    }
    
    /* 텍스트 겹침 방지 강화 */
    .coin-symbol {
        font-size: 0.9rem;
    }
    
    .volume, .change, .volume-surge {
        font-size: 0.6rem;
    }
    
    .mini-ratio-text {
        font-size: 0.5rem;
    }
    
    /* 매우 작은 화면에서 스파크라인 차트 크기 조정 */
    .sparkline-chart {
        width: 50px !important;
        height: 25px !important;
        margin-bottom: 3px;
    }
    
    /* 매우 작은 화면에서 모달 내 스파크차트 크기 조정 */
    .modal .sparkline-chart {
        width: 200px !important;
        height: 35px !important;
        min-width: 200px !important;
        min-height: 35px !important;
    }
    
    .modal .sparkline-chart svg {
        width: 200px !important;
        height: 35px !important;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

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

.coin-item {
    animation: fadeIn 0.5s ease-out;
}

/* 호버 효과 개선 */
.coin-item:hover .coin-symbol {
    color: var(--accent);
}

/* 랭크 변화 애니메이션 */
@keyframes rankChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.coin-item.rank-up,
.coin-item.rank-down {
    animation: rankChange 0.3s ease-in-out;
}

/* AI 추천 코인 스타일 */
.coin-item.ai-recommendation {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    position: relative;
    color: #222;
}

.coin-item.ai-recommendation .coin-symbol,
.coin-item.ai-recommendation .coin-name,
.coin-item.ai-recommendation .price,
.coin-item.ai-recommendation .krw-price,
.coin-item.ai-recommendation .volume,
.coin-item.ai-recommendation .change {
    color: #222;
}

.ai-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f59e0b;
    color: #222;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ai-score {
    position: absolute;
    top: 38px;
    right: 12px;
    background: rgba(255, 255, 255, 0.7);
    color: #222;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 9;
}

.ai-reco-panel {
    padding: 20px;
}

.ai-reco-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.ai-reco-heading h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 2px 0 0;
}

.ai-reco-heading > span {
    flex: 0 0 auto;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

.ai-reco-kicker,
.ai-reco-summary {
    color: var(--text-secondary);
}

.ai-reco-kicker {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ai-reco-summary {
    margin: 0 0 16px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.ai-reco-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.ai-reco-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 310px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-reco-card:hover,
.ai-reco-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent);
    outline: none;
}

.ai-reco-card-head,
.ai-reco-price-row,
.ai-reco-confidence > div:first-child,
.ai-reco-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-reco-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 800;
}

.ai-reco-symbol {
    flex: 1;
    min-width: 0;
}

.ai-reco-symbol strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.2rem;
    line-height: 1.2;
}

.ai-reco-symbol small {
    display: block;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 3px;
}

.ai-reco-level {
    flex: 0 0 auto;
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 0.78rem;
    font-weight: 800;
}

.ai-reco-level[data-tone="strong"] {
    background: rgba(5, 150, 105, 0.14);
    color: var(--success);
}

.ai-reco-level[data-tone="watch"] {
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent);
}

.ai-reco-level[data-tone="neutral"] {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.ai-reco-price-row strong {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.ai-reco-price-row span {
    font-weight: 800;
}

.ai-reco-confidence {
    display: grid;
    gap: 8px;
}

.ai-reco-confidence span,
.ai-reco-action span {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.ai-reco-confidence strong,
.ai-reco-action strong {
    color: var(--text-primary);
}

.ai-confidence-bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.ai-confidence-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--accent));
    border-radius: inherit;
}

.ai-reco-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ai-reco-metrics span {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.ai-reco-metrics strong {
    color: var(--text-primary);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.ai-reco-metrics strong[data-risk="high"] {
    color: var(--danger);
}

.ai-reco-metrics strong[data-risk="medium"] {
    color: var(--warning);
}

.ai-reco-metrics strong[data-risk="low"] {
    color: var(--success);
}

.ai-reco-reasons {
    display: grid;
    gap: 7px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ai-reco-reasons li {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
}

.ai-reco-reasons li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: 1px;
}

.ai-reco-action {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .ai-reco-panel {
        padding: 14px;
    }

    .ai-reco-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-reco-heading > span {
        width: 100%;
        text-align: center;
    }

    .ai-reco-grid-list {
        grid-template-columns: 1fr;
    }

    .ai-reco-card {
        min-height: 0;
        padding: 14px;
    }

    .ai-reco-metrics {
        grid-template-columns: 1fr;
    }
}



/* About 페이지 스타일 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.about-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.about-section h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.intro-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
}

.intro-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.intro-main {
    margin-bottom: 25px;
}

.intro-main p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}

.intro-question {
    font-weight: 600;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.intro-button {
    text-align: center;
    margin-top: 25px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    opacity: 0.9;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.feature-item h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-item p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.feature-highlight {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tech-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.tech-item h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.tech-item ul {
    list-style: none;
    padding: 0;
}

.tech-item li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.tech-item li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.back-button {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
}

/* About 페이지 반응형 */
@media (max-width: 768px) {
    .about-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .about-section h2 {
        font-size: 1.3rem;
    }
    
    .intro-title {
        font-size: 1.2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tech-stack {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-item,
    .tech-item {
        padding: 15px;
    }
} 

@media (max-width: 768px) {
    .coin-item, .list-header {
        min-width: 600px;
        grid-template-columns: 35px 70px 70px 70px 70px 70px 70px 70px;
        gap: 3px;
        font-size: 0.75rem;
    }
} 

@media (max-width: 768px) {
    .menu-bar {
        gap: 4px;
        padding: 8px;
    }
    
    .menu-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-width: 50px;
    }
}

/* 꿀팁 컨텐츠 스타일 */
.tips-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.tips-header {
    text-align: center;
    margin-bottom: 30px;
}

.tips-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tips-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tip-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.tip-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.tip-header:hover {
    background: var(--bg-secondary);
}

.tip-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tip-icon {
    font-size: 2rem;
    display: block;
}

.tip-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.tip-toggle {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.tip-card.expanded .tip-toggle {
    color: var(--text-secondary);
}

.tip-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tip-card.expanded .tip-content {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.tip-card.expanded .tip-content::-webkit-scrollbar {
    width: 6px;
}

.tip-card.expanded .tip-content::-webkit-scrollbar-track {
    background: transparent;
}

.tip-card.expanded .tip-content::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 3px;
}

.tip-card.expanded .tip-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

.tip-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 0 20px;
}

.tip-detail {
    padding: 0 20px 20px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
    padding-top: 16px;
}

.tip-detail p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.tip-detail p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .tips-content {
        padding: 15px;
        margin: 15px 0;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tip-header {
        padding: 15px;
    }
    
    .tips-header h2 {
        font-size: 1.3rem;
    }
    
    .tip-content p {
        padding: 0 15px;
    }
    
    .tip-detail {
        padding: 0 15px 15px;
    }
    
    .tip-card.expanded .tip-content {
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .tips-content {
        padding: 12px;
        margin: 12px 0;
    }
    
    .tip-header {
        padding: 12px;
    }
    
    .tip-icon {
        font-size: 1.5rem;
    }
    
    .tip-header h3 {
        font-size: 1rem;
    }
    
    .tip-content p {
        font-size: 0.85rem;
        padding: 0 12px;
    }
    
    .tip-detail {
        padding: 0 12px 12px;
    }
    
    .tip-card.expanded .tip-content {
        max-height: 400px;
    }
} 

/* 투자성향 테스트 스타일 */
.answer-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.test-retry-btn {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-retry-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.test-start-btn {
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-start-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.q-options {
    padding: 0;
}

.q-options h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.q-options div {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .answer-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .test-retry-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
} 

/* 투자 경고 섹션 스타일 */
.investment-warning {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 20px 0;
    padding: 24px;
    box-shadow: var(--shadow);
}

.warning-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.warning-header h3 {
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.warning-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.warning-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.warning-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.warning-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-text h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.warning-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .investment-warning {
        margin: 15px 0;
        padding: 20px;
    }
    
    .warning-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .warning-item {
        padding: 14px;
    }
    
    .warning-header h3 {
        font-size: 1.2rem;
    }
    
    .warning-text h4 {
        font-size: 0.95rem;
    }
    
    .warning-text p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .investment-warning {
        margin: 12px 0;
        padding: 16px;
    }
    
    .warning-item {
        padding: 12px;
    }
    
    .warning-header h3 {
        font-size: 1.1rem;
    }
    
    .warning-text h4 {
        font-size: 0.9rem;
    }
    
    .warning-text p {
        font-size: 0.75rem;
    }
}

/* 뉴스 컨텐츠 스타일 */
.news-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.news-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.news-time {
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.news-category {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.news-category.비트코인 {
    background: #f59e0b;
    color: white;
}

.news-category.이더리움 {
    background: #627eea;
    color: white;
}

.news-category.거래소 {
    background: #10b981;
    color: white;
}

.news-category.스테이블코인 {
    background: #8b5cf6;
    color: white;
}

.news-category.DeFi {
    background: #06b6d4;
    color: white;
}

.news-category.기타 {
    background: var(--text-secondary);
    color: white;
}

.news-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-content-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.news-keyword {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    border: 1px solid var(--border);
}

.news-source {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: right;
    margin-top: 8px;
    font-style: italic;
}

/* 뉴스 없을 때 메시지 */
.news-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.news-empty h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.news-empty p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.news-setup-guide {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.news-setup-guide h4 {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.news-setup-guide ol {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 20px;
}

.news-setup-guide li {
    margin-bottom: 8px;
}

.news-setup-guide code {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .news-content {
        padding: 15px;
        margin: 15px 0;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .news-card {
        padding: 16px;
    }
    
    .news-title {
        font-size: 0.95rem;
    }
    
    .news-content-text {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .news-setup-guide {
        padding: 16px;
    }
    
    .news-setup-guide h4 {
        font-size: 1rem;
    }
    
    .news-setup-guide ol {
        font-size: 0.85rem;
    }
    
    .news-setup-guide code {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .news-content {
        padding: 12px;
        margin: 12px 0;
    }
    
    .news-card {
        padding: 14px;
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .news-title {
        font-size: 0.9rem;
    }
    
    .news-content-text {
        font-size: 0.8rem;
    }
    
    .news-time,
    .news-category {
        font-size: 0.7rem;
    }
    
    .news-keyword {
        font-size: 0.65rem;
    }
    
    .news-setup-guide {
        padding: 14px;
    }
    
    .news-setup-guide h4 {
        font-size: 0.95rem;
    }
    
    .news-setup-guide ol {
        font-size: 0.8rem;
    }
}

@media (max-width: 980px) {
    .analysis-dashboard-main,
    .analysis-chart-card,
    .analysis-signal-grid {
        grid-template-columns: 1fr;
    }

    .analysis-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-language-switch {
        height: 36px;
    }

    .site-lang-btn {
        min-width: 34px;
        height: 28px;
    }

    body.subpage .method-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.subpage .tab-btn {
        text-align: center !important;
    }

    .analysis-panel,
    .analysis-signal-card {
        padding: 16px;
    }

    .analysis-panel-header {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .analysis-stat-grid {
        grid-template-columns: 1fr;
    }

    .analysis-watch-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .analysis-watch-row em {
        grid-column: 2;
    }
}
