:root {
    /* 호선 색상 */
    --line-1: #0052A4;
    --line-2: #00A84D;
    --line-3: #EF7C1C;
    --line-4: #00A5DE;
    --line-5: #996CAC;
    --line-6: #CD7C2F;
    --line-7: #747F00;
    --line-8: #E6186C;
    --line-9: #BDB092;
    --line-gyeongui: #77C4A3;
    --line-airport: #0090D2;
    --line-sinbundang: #D4003B;
    --line-ui: #FFC600;
    --line-suin: #FACC00;
    --line-gyeongchun: #0D8140;
    --line-bundang: #FACC00;

    /* 다크 테마 (기본) */
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --bg-tertiary: #2f2f2f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #3a3a3a;
    --accent: #00A84D;
}

/* 라이트 테마 */
[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #ddd;
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
    min-height: 100vh;
}

/* 헤더 */
.header {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-top h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-actions {
    position: absolute;
    right: 0;
    display: flex;
    gap: 4px;
}

.subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 아이콘 버튼 */
.icon-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.icon-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.icon-btn.active {
    color: #FFC107;
}

.icon-btn.active svg {
    fill: #FFC107;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* 테마 토글 */
#themeToggle .icon-moon {
    display: none;
}

[data-theme="light"] #themeToggle .icon-sun {
    display: none;
}

[data-theme="light"] #themeToggle .icon-moon {
    display: block;
}

/* 검색 섹션 */
.search-section {
    position: relative;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-btn:hover {
    opacity: 0.9;
}

.search-btn:active {
    opacity: 0.8;
}

/* 검색 제안 */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg-tertiary);
}

.suggestion-line {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.suggestion-name {
    font-size: 15px;
}

/* 역 정보 */
.station-info {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.station-info.hidden {
    display: none;
}

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

.station-name-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.line-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.station-name {
    font-size: 20px;
    font-weight: 700;
}

.station-actions {
    display: flex;
    gap: 2px;
}

/* 혼잡도 바 */
.congestion-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.congestion-label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.congestion-level {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.congestion-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
    background: var(--accent);
}

.congestion-fill.low {
    width: 30%;
    background: #22C55E;
}

.congestion-fill.medium {
    width: 55%;
    background: #F59E0B;
}

.congestion-fill.high {
    width: 80%;
    background: #EF4444;
}

.congestion-fill.very-high {
    width: 100%;
    background: #DC2626;
}

.congestion-text {
    font-size: 12px;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

.congestion-text.low {
    color: #22C55E;
}

.congestion-text.medium {
    color: #F59E0B;
}

.congestion-text.high {
    color: #EF4444;
}

.congestion-text.very-high {
    color: #DC2626;
}

/* 도보 시간 설정 */
.walking-time-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.walking-time-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.walking-time-left svg {
    color: var(--accent);
}

.walking-time-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.walking-time-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.walking-time-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.walking-time-btn:active {
    transform: scale(0.95);
}

.walking-time-value {
    font-size: 18px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    color: var(--accent);
}

.walking-time-unit {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 출발 알림 */
.leave-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 600;
    font-size: 15px;
    animation: leave-pulse 1s ease-in-out infinite;
}

.leave-alert.hidden {
    display: none;
}

.leave-alert.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation: none;
}

@keyframes leave-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* 방향 탭 */
.direction-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.direction-tab {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.direction-tab.active {
    color: var(--text-primary);
}

.direction-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

/* 도착 정보 리스트 */
.arrival-list {
    padding: 12px;
    min-height: 180px;
}

.arrival-item {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 8px;
}

.arrival-item:last-child {
    margin-bottom: 0;
}

.arrival-order {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-right: 14px;
    flex-shrink: 0;
}

.arrival-info {
    flex: 1;
    min-width: 0;
}

.arrival-destination {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.train-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.train-badge.express {
    background: #ef4444;
    color: white;
}

.train-badge.last {
    background: #6366f1;
    color: white;
}

.arrival-status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.arrival-time {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}

.time-value {
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.time-unit {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 2px;
}

.arrival-item.imminent .time-value {
    color: #EF4444;
}

.arrival-item.arriving .time-value {
    color: var(--accent);
    font-size: 16px;
}

/* 행선지별 그룹 */
.destination-group {
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.destination-group:last-child {
    margin-bottom: 0;
}

.destination-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.destination-indicator {
    width: 4px;
    height: 20px;
    border-radius: 2px;
}

.destination-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.trains-list {
    padding: 4px 0;
}

.train-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.train-row:last-child {
    border-bottom: none;
}

.train-order {
    min-width: 32px;
    height: 20px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.train-status {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
}

.train-time {
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    min-width: 60px;
    text-align: right;
}

.train-row.imminent .train-time {
    color: #EF4444;
}

.train-row.arriving .train-time {
    color: var(--accent);
}

.train-row.departing .train-time {
    color: var(--text-secondary);
    font-size: 16px;
}

.train-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}

.train-badge.express {
    background: #DC2626;
    color: white;
}

.train-badge.last {
    background: #7C3AED;
    color: white;
}

/* 선택된 행선지 (알림 대상) */
.destination-group.selected {
    border: 2px solid var(--accent);
    box-shadow: 0 0 8px rgba(0, 168, 77, 0.3);
}

.destination-group.selected .destination-header {
    background: rgba(0, 168, 77, 0.15);
}

.destination-alert-icon {
    margin-left: auto;
    font-size: 16px;
}

.destination-select-hint {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s;
}

.destination-group:hover .destination-select-hint {
    opacity: 1;
}

.destination-group {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.destination-group:hover:not(.selected) {
    border: 1px solid var(--text-muted);
}

/* 업데이트 정보 */
.update-info {
    padding: 8px 16px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* 로딩 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    gap: 12px;
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.error {
    text-align: center;
    padding: 40px 20px;
    color: #EF4444;
}

/* 즐겨찾기 */
.favorites-section {
    margin-top: 24px;
}

.favorites-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.favorites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.favorite-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.favorite-chip:hover {
    border-color: var(--text-muted);
}

.favorite-chip-line {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.favorite-chip-name {
    font-size: 14px;
}

.favorite-chip-remove {
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border: none;
    border-radius: 50%;
    color: var(--bg-primary);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.favorite-chip:hover .favorite-chip-remove {
    opacity: 1;
}

.no-favorites {
    color: var(--text-muted);
    font-size: 14px;
}

/* API 키 섹션 */
.api-key-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.api-key-section details {
    font-size: 14px;
}

.api-key-section summary {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 0;
}

.api-key-content {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 12px;
}

.api-key-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.api-key-content a {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
}

.api-key-content a:hover {
    text-decoration: underline;
}

.api-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.api-input-wrap input {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    outline: none;
}

.api-input-wrap input:focus {
    border-color: var(--accent);
}

.save-api-btn {
    padding: 10px 16px;
    font-size: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* 푸터 */
.footer {
    margin-top: 32px;
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* 토스트 */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 1000;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 알림 버튼 활성화 */
#notifyBtn.active {
    color: var(--accent);
}

/* 새로고침 애니메이션 */
#refreshBtn.spinning svg {
    animation: spin 0.8s linear infinite;
}

/* 반응형 */
@media (max-width: 360px) {
    .container {
        padding: 16px 12px;
    }

    .header-top h1 {
        font-size: 20px;
    }

    .time-value {
        font-size: 20px;
    }

    .station-actions {
        gap: 0;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }
}

/* iOS 하단 안전 영역 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .container {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* ===== 전광판 모드 ===== */
.display-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.display-mode.hidden {
    display: none;
}

.exit-display-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #666;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exit-display-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 역 정보 */
.display-station {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.display-line {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.display-station-name {
    font-size: 36px;
    font-weight: 700;
    color: #555;
}

.display-direction {
    font-size: 20px;
    color: #444;
    padding: 6px 16px;
    border: 1px solid #333;
    border-radius: 20px;
}

.display-congestion-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22C55E;
    margin-left: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.display-congestion-dot.medium {
    background: #F59E0B;
}

.display-congestion-dot.high {
    background: #EF4444;
}

.display-congestion-dot.very-high {
    background: #DC2626;
    animation: pulse-fast 0.5s ease-in-out infinite;
}

/* 세그먼트 디스플레이 */
.display-timer {
    text-align: center;
    margin-bottom: 20px;
}

.segment-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* 7-세그먼트 스타일 폰트 */
@font-face {
    font-family: 'DSEG';
    src: url('https://cdn.jsdelivr.net/npm/dseg@0.46.0/fonts/DSEG7-Classic/DSEG7Classic-Bold.woff2') format('woff2');
    font-weight: bold;
}

.segment-digits {
    font-family: 'DSEG', 'Courier New', monospace;
    font-size: 140px;
    font-weight: bold;
    color: #ff6b35;
    text-shadow: 0 0 4px rgba(255, 107, 53, 0.8);
    letter-spacing: 8px;
    position: relative;
}

/* 세그먼트 배경 (어두운 8) */
.segment-digits::before {
    content: '88';
    position: absolute;
    left: 0;
    color: #0a0a0a;
    text-shadow: none;
    z-index: -1;
}

.segment-colon {
    font-family: 'DSEG', 'Courier New', monospace;
    font-size: 120px;
    font-weight: bold;
    color: #ff6b35;
    text-shadow: 0 0 4px rgba(255, 107, 53, 0.8);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0.3;
    }
}

.display-destination {
    font-size: 28px;
    color: #666;
    letter-spacing: 2px;
}

/* 도착 표시 */
.display-arriving {
    font-size: 100px;
    font-weight: bold;
    color: #22c55e;
    text-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
    letter-spacing: 20px;
}

.display-arriving.hidden {
    display: none;
}

.segment-display.hidden {
    display: none;
}

/* 다음 열차 정보 */
.display-next {
    margin-bottom: 16px;
}

.next-trains {
    display: flex;
    gap: 40px;
}

.next-train {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid #222;
}

.next-train .next-label {
    font-size: 14px;
    color: #444;
}

.next-train .next-time {
    font-family: 'DSEG', 'Courier New', monospace;
    font-size: 32px;
    color: #2a6e40;
    text-shadow: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

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

/* 임박 상태 */
.segment-digits.imminent {
    color: #ef4444;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.9);
    animation: glow-red 0.5s ease-in-out infinite alternate;
}

@keyframes glow-red {
    from {
        text-shadow: 0 0 4px rgba(239, 68, 68, 0.8);
    }

    to {
        text-shadow: 0 0 8px rgba(239, 68, 68, 1);
    }
}

.segment-digits.arriving {
    color: #22c55e;
    text-shadow: 0 0 5px rgba(34, 197, 94, 0.9);
}

/* 반응형 */
@media (max-width: 600px) {
    .segment-digits {
        font-size: 80px;
        letter-spacing: 4px;
    }

    .segment-digits::before {
        content: '88';
    }

    .segment-colon {
        font-size: 70px;
    }

    .display-station-name {
        font-size: 24px;
    }

    .display-line {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .display-direction {
        font-size: 14px;
        padding: 4px 12px;
    }

    .display-destination {
        font-size: 20px;
    }

    .next-trains {
        gap: 20px;
    }

    .next-train {
        padding: 12px 20px;
    }

    .next-train .next-time {
        font-size: 24px;
    }

    .exit-display-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

@media (max-width: 360px) {
    .segment-digits {
        font-size: 60px;
    }

    .segment-colon {
        font-size: 50px;
    }

    .next-trains {
        flex-direction: column;
        gap: 12px;
    }
}

/* 전체화면 시 더 큰 폰트 */
@media (min-width: 800px) {
    .segment-digits {
        font-size: 200px;
    }

    .segment-colon {
        font-size: 180px;
    }

    .display-station-name {
        font-size: 48px;
    }

    .display-destination {
        font-size: 36px;
    }
}

/* 전광판 모드 도보 시간 정보 */
.display-walking-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 1px solid #333;
    margin-top: 16px;
}

.display-walking-info.hidden {
    display: none;
}

.display-walking-info .walking-label {
    font-size: 16px;
    color: #666;
}

.display-walking-info .walking-value {
    font-family: 'DSEG', 'Courier New', monospace;
    font-size: 24px;
    color: #888;
}

.display-walking-info .catchable-badge {
    font-size: 18px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    background: #22c55e;
    color: #fff;
}

.display-walking-info .catchable-badge.hurry {
    background: #f59e0b;
}

.display-walking-info .catchable-badge.next-ok {
    background: #3b82f6;
}

.display-walking-info .catchable-badge.hidden {
    display: none;
}

@media (max-width: 600px) {
    .display-walking-info {
        padding: 10px 20px;
        gap: 12px;
        margin-top: 12px;
    }

    .display-walking-info .walking-value {
        font-size: 18px;
    }

    .display-walking-info .catchable-badge {
        font-size: 14px;
        padding: 4px 12px;
    }
}