/* 디자인 시스템 변수 정의 */
:root {
    /* 폰트 */
    --font-primary: 'Outfit', 'Inter', 'Noto Sans KR', sans-serif;
    
    /* 기본 테마 색상 (Dark Mode Base) */
    --bg-dark: #0d0e12;
    --panel-bg: rgba(20, 22, 28, 0.7);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    /* 상태별 테마 변수 (Dynamic) */
    --state-color: #f59e0b; /* Default Warning Yellow */
    --state-glow: rgba(245, 158, 11, 0.2);
    --state-bg-gradient: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(13, 14, 18, 0.8) 100%);
    
    /* 중립적 포인트 색상 정의 */
    --color-live: #00b0ff; /* Live 시그널용 시안 블루 */
    --color-live-glow: rgba(0, 176, 255, 0.25);
    --color-info: #00e5ff; /* 정보/도움말용 민트 시안 */
    
    --transition-speed: 0.5s;
}

/* BUY STATE (그린라이트 / 강력 매수) - 은은한 포인트만 적용 */
body.state-buy {
    --state-color: #00e676; /* Vibrant Neon Green */
    --state-glow: rgba(0, 230, 118, 0.06); /* 은은한 백그라운드 글로우 */
    --state-bg-gradient: linear-gradient(135deg, rgba(20, 22, 28, 0.8) 0%, rgba(13, 14, 18, 0.95) 100%);
}

/* SELL STATE (레드얼럿 / 강력 매도) - 은은한 포인트만 적용 */
body.state-sell {
    --state-color: #ff1744; /* Blood Crimson Red */
    --state-glow: rgba(255, 23, 68, 0.06); /* 은은한 백그라운드 글로우 */
    --state-bg-gradient: linear-gradient(135deg, rgba(20, 22, 28, 0.8) 0%, rgba(13, 14, 18, 0.95) 100%);
}

/* HOLD STATE (옐로우 / 관망) */
body.state-hold {
    --state-color: #ffd600; /* Neon Yellow */
    --state-glow: rgba(255, 214, 0, 0.05);
    --state-bg-gradient: linear-gradient(135deg, rgba(20, 22, 28, 0.8) 0%, rgba(13, 14, 18, 0.95) 100%);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

/* Glassmorphism Background elements */
.glass-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--state-glow) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
    pointer-events: none;
    transition: background var(--transition-speed) ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: var(--state-bg-gradient);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.02);
    transition: background var(--transition-speed) ease, border var(--transition-speed) ease;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #ffffff 40%, var(--color-info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 12px rgba(0, 229, 255, 0.15));
}

/* 엠블럼 컨테이너: 라이브 애니메이션 엠블럼 */
.emblem-container {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 2px;
}

/* 바깥쪽 회전 다이아몬드 링: 현재 예측 상태 색상과 동조 */
.emblem-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-top: 1.5px solid var(--state-color);
    border-right: 1.5px solid var(--state-color);
    border-radius: 6px;
    transform: rotate(45deg);
    animation: emblem-spin 3.5s linear infinite;
    transition: border-color var(--transition-speed) ease;
}

/* 안쪽 펄싱 코어: 현재 예측 상태 색상으로 호흡하듯 깜빡임 */
.emblem-core {
    width: 8px;
    height: 8px;
    background-color: var(--state-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--state-glow);
    animation: emblem-pulse 1.8s ease-in-out infinite;
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

/* 엠블럼 회전 애니메이션 */
@keyframes emblem-spin {
    0% { transform: rotate(45deg); }
    100% { transform: rotate(405deg); }
}

/* 엠블럼 펄싱 애니메이션 */
@keyframes emblem-pulse {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 4px var(--state-glow);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 12px var(--state-color), 0 0 18px var(--state-glow);
        opacity: 1;
    }
    100% {
        transform: scale(0.85);
        box-shadow: 0 0 4px var(--state-glow);
        opacity: 0.6;
    }
}

.logo-subtext {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 12px;
    margin-left: 4px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Main Dashboard Panels */
main {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Left Panel: Signal Display */
.main-signal-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 25px;
    min-height: 360px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; /* 쌓임 맥락 생성을 위해 추가 */
    z-index: 10; /* 오른쪽 패널보다 레이어를 높게 올려서 팝업이 덮도록 함 */
}

.main-signal-panel.fade-out {
    opacity: 0;
    transform: translateY(4px);
}

.signal-header {
    display: flex;
    justify-content: flex-end;
}

.last-updated {
    font-size: 12px;
    color: var(--text-muted);
}

/* 예보 상태 배지 스타일 */
.badge-status-update {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 오늘 예보 반영 완료: 그린/시안 포인트 */
.badge-status-update.updated {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.25);
    color: #00e676;
}

/* 오늘 예보 대기/지연 중 (어제 예보 노출): 옐로우/오렌지 */
.badge-status-update.pending {
    background: rgba(255, 145, 0, 0.1);
    border: 1px solid rgba(255, 145, 0, 0.25);
    color: #ff9100;
}

/* 오늘 휴장일 (주말): 그레이 */
.badge-status-update.holiday {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.signal-banner {
    margin: 10px 0 5px 0;
}

.status-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    color: var(--state-color);
    border: 1px solid var(--state-color);
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 16px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1), inset 0 0 10px var(--state-glow);
    margin-bottom: 20px;
    transition: all var(--transition-speed) ease;
}

.main-copy {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -1px;
    color: #ffffff;
    word-break: keep-all;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.sub-copies-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: none;
    border: none;
    padding: 0;
}

.sub-copy-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-copy-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.feat-text {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    word-break: keep-all;
}

.feat-icon {
    font-size: 11px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    flex-shrink: 0;
    margin-top: 1px;
    font-family: 'Outfit', sans-serif;
    user-select: none;
}

.feat-icon.feat-up {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    box-shadow: 0 0 6px rgba(0, 230, 118, 0.05);
}

.feat-icon.feat-down {
    background: rgba(255, 23, 68, 0.1);
    color: #ff1744;
    box-shadow: 0 0 6px rgba(255, 23, 68, 0.05);
}

.feat-icon.feat-hold {
    background: rgba(255, 214, 0, 0.1);
    color: #ffd600;
    box-shadow: 0 0 6px rgba(255, 214, 0, 0.05);
}

.feat-icon-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

.feat-icon-container .feat-icon {
    position: relative;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.25s ease, filter 0.25s ease;
}

/* 겹침 효과: 두 번째 아이콘부터 왼쪽으로 음수 마진을 주어 포개지게 함 */
.feat-icon-container .feat-icon:not(:first-child) {
    margin-left: -12px;
}

/* z-index 설정: 첫 번째 배지가 가장 위(맨 앞)에 오고 뒤로 갈수록 아래에 깔리게 포개짐 */
.feat-icon-container .feat-icon:nth-child(1) { z-index: 3; }
.feat-icon-container .feat-icon:nth-child(2) { z-index: 2; }
.feat-icon-container .feat-icon:nth-child(3) { z-index: 1; }

/* 3D 깊이감을 주기 위해 약간의 그림자와 밝기 차이 적용 */
.feat-icon-container .feat-icon:nth-child(2) {
    filter: brightness(0.85);
    transform: scale(0.95);
}
.feat-icon-container .feat-icon:nth-child(3) {
    filter: brightness(0.7);
    transform: scale(0.9);
}

/* 호버 인터랙션: 마우스를 갖다 대면 배지가 부드럽게 옆으로 펼쳐짐 (Spread Effect) */
.sub-copy-item:hover .feat-icon-container .feat-icon:not(:first-child) {
    margin-left: 3px;
}
.sub-copy-item:hover .feat-icon-container .feat-icon {
    filter: brightness(1) !important;
    transform: scale(1) !important;
}

/* 지배적 원인(과반 이상 영향력) 강조 카드 테두리 & 네온 글로우 효과 */
.sub-copy-item.item-dominant {
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    position: relative;
    overflow: visible !important; /* 배지가 경계선 밖으로 삐져나와도 잘리지 않게 허용 */
}

/* 상승 지배적 요인 */
.sub-copy-item.item-dominant.item-up {
    border-color: rgba(0, 230, 118, 0.35) !important;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1), inset 0 0 6px rgba(0, 230, 118, 0.03) !important;
    background: rgba(0, 230, 118, 0.02) !important;
}

/* 하락 지배적 요인 */
.sub-copy-item.item-dominant.item-down {
    border-color: rgba(255, 23, 68, 0.35) !important;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.1), inset 0 0 6px rgba(255, 23, 68, 0.03) !important;
    background: rgba(255, 23, 68, 0.02) !important;
}

/* 박스 아래 테두리에 달리듯이 걸치는 절대 배치 지배적 요인 배지 */
.dominant-badge {
    position: absolute;
    bottom: -7px; /* 테두리 라인에 쏙 걸치도록 마이너스 마진 조절 */
    left: 16px;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    user-select: none;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); /* 입체감 그림자 */
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dominant-badge.badge-up {
    background: #00e676;
    color: #0d1e36; /* 어두운 네이비색으로 뚜렷한 가독성 확보 */
}

.dominant-badge.badge-down {
    background: #ff1744;
    color: #ffffff;
}

/* Right Panel: Gauges & Metrics */
.metrics-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 1; /* 왼쪽 패널보다 레이어를 낮춤 */
}

.metric-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
}

.metric-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Radial Gauge Styling */
.probability-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.radial-gauge-container {
    position: relative;
    width: 160px;
    height: 160px;
}

.radial-gauge {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.radial-gauge circle {
    fill: none;
    stroke-width: 8;
}

.radial-gauge .gauge-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.radial-gauge .gauge-fill {
    stroke: var(--state-color);
    stroke-linecap: round;
    stroke-dasharray: 283; /* 2 * PI * r (r=45) = 282.7 */
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1), stroke var(--transition-speed) ease;
    filter: drop-shadow(0 0 6px var(--state-color));
}

.gauge-value-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.gauge-percent {
    font-size: 36px;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    text-shadow: 0 0 10px var(--state-glow);
    transition: text-shadow var(--transition-speed) ease;
}

.gauge-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--state-color);
    text-transform: uppercase;
    margin-top: -2px;
    transition: color var(--transition-speed) ease;
}

/* Metrics Grid styling */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

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

.card-header h3 {
    margin-bottom: 0;
}

.metric-value {
    font-size: 18px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
}

.metric-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Progress bar styling */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), #4b5563);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: width 1.2s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* LED Dots style */
.led-dots {
    display: flex;
    gap: 6px;
    justify-content: space-between;
    margin-top: 5px;
}

.led-dot {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.led-dot.active {
    background: var(--state-color);
    box-shadow: 0 0 8px var(--state-color);
}

/* Sentiment splitting bar style */
.sentiment-bar-container {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.sentiment-split-bar {
    display: flex;
    height: 100%;
    width: 100%;
}

.sentiment-panic {
    background: linear-gradient(to right, #d32f2f, #ff1744);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 1s ease;
}

.sentiment-greed {
    background: linear-gradient(to right, #00e676, #388e3c);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 1s ease;
}

.sentiment-scores {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.sentiment-scores strong {
    color: #ffffff;
}

/* Scoreboard Panel */
footer {
    border-top: 1px solid var(--panel-border);
    padding-top: 25px;
}

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

.scoreboard-header h2 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.title-rounds {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
    display: inline;
}

.scoreboard-summary {
    display: flex;
    gap: 20px;
}

.summary-item {
    font-size: 13px;
    color: var(--text-muted);
}

.summary-item strong {
    font-size: 15px;
    color: #ffd600; /* Neon Gold로 상시 고정 */
    font-family: 'Outfit', sans-serif;
    margin-left: 4px;
}

/* Timeline grid horizontal */
.timeline-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(0,0,0,0);
}

.timeline-container::-webkit-scrollbar {
    height: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.timeline-item {
    min-width: 190px;
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

/* HIT 카드 은은한 초록 테두리 */
.timeline-item.hit {
    border-color: rgba(0, 230, 118, 0.15);
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.05);
}

/* MISS 카드 은은한 빨간 테두리 */
.timeline-item.miss {
    border-color: rgba(255, 23, 68, 0.15);
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.05);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
    margin-bottom: 2px;
}

.timeline-date {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.badge-result {
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-result.hit {
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.badge-result.miss {
    background: rgba(255, 23, 68, 0.12);
    color: #ff1744;
    border: 1px solid rgba(255, 23, 68, 0.2);
}

.timeline-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.comparison-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.col-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: -0.2px;
}

.result-box {
    width: 100%;
    padding: 6px 2px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    border: 1px solid transparent;
    font-family: 'Inter', 'Outfit', sans-serif;
}

/* 예측 박스 스타일 */
.result-box.pred-up {
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.2);
}

.result-box.pred-down {
    background: rgba(255, 23, 68, 0.08);
    color: #ff1744;
    border-color: rgba(255, 23, 68, 0.2);
}

/* 실제 박스 스타일 */
.result-box.act-plus {
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.2);
}

.result-box.act-minus {
    background: rgba(255, 23, 68, 0.08);
    color: #ff1744;
    border-color: rgba(255, 23, 68, 0.2);
}

.result-box.act-zero {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.08);
}

.comparison-arrow {
    color: rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 900;
    margin-top: 14px; /* 라벨 높이를 맞추기 위한 상단 여백 */
    user-select: none;
}

.hit-reason {
    font-size: 8px;
    color: #ffd600; /* Neon Yellow for emphasis */
    background: rgba(255, 214, 0, 0.1);
    border: 1px solid rgba(255, 214, 0, 0.2);
    border-radius: 4px;
    padding: 1px 4px;
    margin-top: 4px;
    white-space: nowrap;
    text-align: center;
    font-weight: 600;
}

/* Data Update Info Hover Tooltip Styling */
.update-info-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 999; /* Z-Index 층을 최상단급으로 상향 조정 */
}

.info-trigger {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: help;
    z-index: 999;
}

.info-icon {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.2s ease;
    user-select: none;
}

.info-trigger:hover .info-icon {
    color: var(--color-info);
}

.info-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 290px;
    background: rgba(15, 15, 22, 0.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1000 !important; /* 오른쪽 패널 게이지 등 모든 브라우저 렌더링보다 위에 오도록 봉인 */
}

.info-trigger:hover .info-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.info-popup h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-popup ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.info-popup li {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 6px;
}

.info-popup li:last-child {
    margin-bottom: 0;
}

.info-popup li strong {
    color: var(--color-info);
    margin-right: 4px;
    font-family: 'Outfit', sans-serif;
}

.popup-note {
    display: block;
    font-size: 9.5px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

/* Sponsorship & Contact Section */
.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.contact-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25); /* 톤다운된 어두운 회색 */
    letter-spacing: 0.5px;
}

.contact-email {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted); /* 일반적인 차분한 회색 */
    text-decoration: none;
    padding: 2px 4px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.15); /* 은은한 점선 */
}

.contact-email:hover {
    color: var(--color-live); /* 호버 시에만 은은하게 켜짐 */
    border-bottom-color: var(--color-live);
}

/* ==========================================
   Responsive Mobile Support (모바일 전용 최적화)
   ========================================== */
@media (max-width: 600px) {
    body {
        padding: 5px 10px 10px 10px;
    }
    
    .container {
        padding: 12px 15px 20px 15px;
        border-radius: 16px;
    }
    
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 10px;
        margin-bottom: 16px;
        gap: 10px;
    }
    
    .logo {
        position: relative;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        width: auto;
    }
    
    .logo h1 {
        font-size: 23px;
        letter-spacing: -1px;
    }
    
    .emblem-container {
        display: flex;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 21px;
        height: 21px;
        margin-right: 0;
    }
    
    .emblem-ring {
        border-width: 1.4px;
        border-radius: 5px;
    }
    
    .emblem-core {
        width: 7px;
        height: 7px;
    }
    
    .logo-subtext {
        display: none;
    }
    
    .tabs {
        width: auto;
    }
    
    .tab-btn {
        flex: none;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    main {
        display: flex;
        flex-direction: column-reverse;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .panel {
        padding: 15px;
        border-radius: 16px;
    }
    
    .main-signal-panel {
        min-height: auto;
        gap: 20px;
    }
    
    .signal-header {
        justify-content: center;
        width: 100%;
    }
    
    .update-info-container {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .info-popup {
        left: auto;
        right: -10px;
        transform: translateY(8px);
        width: 270px;
    }
    
    .info-trigger:hover .info-popup {
        transform: translateY(0);
    }
    
    .signal-banner {
        margin: 5px 0;
        text-align: center;
    }
    
    .main-copy {
        font-size: 23px;
        line-height: 1.4;
    }
    
    .sub-copies-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .sub-copy-item {
        padding: 8px 12px;
    }
    
    .feat-text {
        font-size: 11.5px;
    }
    
    .radial-gauge-container {
        width: 130px;
        height: 130px;
    }
    
    .gauge-percent {
        font-size: 30px;
    }
    
    .scoreboard-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }
    
    .scoreboard-summary {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
    
    .contact-section {
        flex-direction: column;
        gap: 6px;
        margin-top: 20px;
    }
}
