/**
 * 통일된 헤더 스타일 (8비트 미니멀)
 * 모든 페이지에서 사용
 */

/* ===== Header (8비트 미니멀) ===== */
.dashboard-header {
    background: var(--bg-secondary, #121212);
    border-bottom: 2px solid var(--border-color, #282828);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary, #ffffff);
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
}

.logo-icon {
    font-size: 1.5rem;
    animation: pixelBounce 1s step-end infinite;
}

@keyframes pixelBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.logo-text {
    color: var(--accent-gold, #c8a870);
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
}

.nav-item {
    padding: 0.5rem 1rem;
    color: var(--text-secondary, #9ca3af);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 0;
    transition: all 0.15s;
    font-weight: 500;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
    text-transform: uppercase;
}

.nav-icon {
    font-size: 1rem;
}

.nav-label {
    font-size: 0.75rem;
}

.nav-item:hover {
    color: var(--text-primary, #e0dcd8);
    background: var(--bg-tertiary, #1a1a1a);
    border-color: var(--border-color, #282828);
}

.nav-item.active {
    color: var(--accent-gold, #c8a870);
    background: rgba(200, 168, 112, 0.1);
    border-color: var(--accent-gold, #c8a870);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary, #a0a098);
    margin-bottom: 0.25rem;
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
    text-transform: uppercase;
}

.stat-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary, #e0dcd8);
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
}

.stat-value.positive {
    color: var(--accent-green, #6a9a70);
}

.stat-value.negative {
    color: var(--accent-red, #a86868);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-default, #282828);
    background: var(--bg-tertiary, #1a1a1a);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    color: var(--text-primary, #e0dcd8);
}

.icon-btn:hover {
    background: var(--bg-elevated, #222222);
    border-color: var(--accent-gold, #c8a870);
}

.icon-btn .icon {
    font-size: 1.125rem;
}

.badge-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--accent-red, #a86868);
    border-radius: 0;
    border: 2px solid var(--bg-secondary, #121212);
}

/* 반응형 */
@media (max-width: 1024px) {
    .header-stats {
        display: none;
    }
    
    .nav-menu {
        gap: 0.125rem;
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        height: 56px;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        display: none; /* 모바일에서는 햄버거 메뉴로 대체 가능 */
    }
    
    .header-stats {
        display: none;
    }
}

/* 기존 header 클래스와의 호환성 */
.header {
    background: var(--bg-secondary, #1a1a2e);
    border-bottom: 1px solid var(--border-default, #2a2a3e);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 버튼 스타일 통일 (8비트) */
.btn {
    padding: 0.5rem 1rem;
    border: 3px solid var(--border-default, #4a3a5e);
    border-radius: 0;
    font-weight: 500;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: var(--accent-gold, #c8a870);
    border-color: var(--accent-gold, #c8a870);
    color: var(--bg-primary, #0a0a0a);
}

.btn-primary:hover {
    background: #d4b88c;
    border-color: #d4b88c;
}

.btn-secondary {
    background: var(--bg-tertiary, #1a1a1a);
    border-color: var(--border-default, #282828);
    color: var(--text-secondary, #a0a098);
}

.btn-secondary:hover {
    background: var(--bg-elevated, #222222);
    border-color: var(--accent-gold, #c8a870);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.65rem;
}

.form-control {
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary, #0a0a0a);
    border: 2px solid var(--border-default, #282828);
    border-radius: 0;
    color: var(--text-primary, #e0dcd8);
    font-size: 0.75rem;
    transition: all 0.15s;
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
}

.form-control:hover {
    border-color: var(--accent-gold, #c8a870);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold, #c8a870);
    background: var(--bg-secondary, #121212);
}

/* User Info Styles */
#user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    font-size: 0.875rem;
    color: var(--text-primary, #ffffff);
    font-weight: 500;
}

/* Ghost Button (8비트 미니멀) */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary, #a0a098);
    border: 2px solid var(--border-default, #282828);
}

.btn-ghost:hover {
    background: var(--bg-tertiary, #1a1a1a);
    color: var(--text-primary, #e0dcd8);
    border-color: var(--accent-gold, #c8a870);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-primary, #ffffff);
    cursor: pointer;
    font-size: 1.5rem;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-secondary, #1a1a2e);
        border-bottom: 1px solid var(--border-default, #2a2a3e);
        flex-direction: column;
        padding: 1rem;
        z-index: 999;
    }

    .nav-menu.mobile-open {
        display: flex;
    }

    .nav-menu .nav-item {
        padding: 0.75rem 1rem;
        border-radius: 6px;
    }

    .nav-menu .nav-item:hover {
        background: var(--bg-tertiary, #0f0f1e);
    }

    #user-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Live Indicator (8비트 미니멀) */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.65rem;
    color: var(--accent-green, #6a9a70);
    text-transform: uppercase;
    font-weight: 500;
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green, #6a9a70);
    border-radius: 0;
    animation: pixelBlink 1s step-end infinite;
}

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

/* 스크롤바 (8비트) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary, #0a0a0a);
    border: 2px solid var(--border-default, #282828);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color, #282828);
    border: 2px solid var(--bg-primary, #0a0a0a);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold, #c8a870);
}

::-webkit-scrollbar-corner {
    background: var(--bg-primary, #0a0a0a);
}

/* ===== Language Toggle Button ===== */
.lang-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.4rem 0.6rem;
    background: var(--bg-tertiary, #1a1a1a);
    border: 2px solid var(--border-default, #282828);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'VT323', 'Galmuri11', 'DotGothic16', monospace;
    font-size: 0.65rem;
    color: var(--text-secondary, #a0a098);
}

.lang-toggle-btn:hover {
    border-color: var(--accent-gold, #c8a870);
    background: var(--bg-elevated, #222222);
}

.lang-option {
    transition: color 0.15s;
}

.lang-option.active {
    color: var(--accent-gold, #c8a870);
    font-weight: 600;
}

