/* ============================================
   CYBERPUNK CRT AESTHETIC - EVE ONLINE PORTAL
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    /* 기본 색상 팔레트 */
    --color-bg-primary: #05070f;
    --color-bg-secondary: #0a0d1a;
    --color-bg-tertiary: #0f1228;
    
    /* 네온 색상 */
    --color-neon-cyan: #adf3ff;
    --color-neon-magenta: #ff006e;
    --color-neon-green: #1ff71f;
    --color-neon-purple: #b537f2;
    --color-neon-blue: #0080ff;
    --color-neon-orange: #ff6b35;
    
    /* 텍스트 색상 */
    --color-text-primary: #adf3ff;
    --color-text-secondary: #1ff71f;
    --color-text-accent: #ff006e;
    --color-text-dim: rgba(173, 243, 255, 0.4);
    
    /* 폰트 */
    --font-main: 'Shentox', 'JetBrains Mono', 'Courier New', monospace;
    --font-size-base: 14px;
    --font-size-sm: 12px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    
    /* 애니메이션 */
    --scanline-speed: 8s;
    --flicker-speed: 0.15s;
    --glow-duration: 2s;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

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

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: 1.6;
    text-shadow: 0 0 10px var(--color-text-primary);
    overflow: hidden;
    position: relative;
}

/* 비디오 배경 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://nerdvana.kr/mv/eve/bg.mp4') center/cover no-repeat fixed;
    background-attachment: fixed;
    z-index: -2;
    opacity: 0.3;
}

/* 배경 오버레이 */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(5, 7, 15, 0.85) 0%, rgba(5, 7, 15, 0.95) 100%);
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   GLOBAL CONTAINER
   ============================================ */

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
    background: transparent;
    overflow: hidden;
    flex-direction: column;
}

.app-container-inner {
    display: flex;
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

/* CRT 스캔라인 오버레이 */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 50%,
            rgba(0, 0, 0, 0.15) 50%
        ),
        linear-gradient(
            90deg,
            rgba(255, 0, 0, 0.03),
            rgba(0, 255, 0, 0.02),
            rgba(0, 0, 255, 0.03)
        );
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
    animation: scanlines-move var(--scanline-speed) linear infinite;
}

@keyframes scanlines-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* 화면 미세 떨림 효과 */
@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 0.98;
        text-shadow: 0 0 10px var(--color-text-primary);
    }
    20%, 24%, 55% {
        opacity: 0.95;
        text-shadow: 0 0 5px var(--color-text-primary);
    }
}

.flicker-effect {
    animation: flicker var(--flicker-speed) infinite;
}

/* ============================================
   NAVBAR (TOP)
   ============================================ */

.navbar {
    background: linear-gradient(90deg, rgba(10, 13, 26, 0.95) 0%, rgba(15, 18, 40, 0.95) 50%, rgba(10, 13, 26, 0.95) 100%);
    border-bottom: 2px solid var(--color-neon-cyan);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 30px rgba(173, 243, 255, 0.2);
    z-index: 90;
    width: 100%;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.navbar-brand {
    font-size: var(--font-size-xl);
    color: var(--color-neon-cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px var(--color-neon-cyan);
}

.navbar-status {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: var(--font-size-sm);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-neon-green);
    box-shadow: 0 0 10px var(--color-neon-green);
    animation: pulse 2s ease-in-out infinite;
}

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

/* 햄버거 메뉴 버튼 */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger-btn span {
    width: 25px;
    height: 2px;
    background: var(--color-neon-cyan);
    transition: all 0.3s ease;
    display: block;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.layout-wrapper {
    display: flex;
    flex: 1;
    width: 100%;
    overflow: hidden;
    background: transparent;
    border-left: 2px solid var(--color-neon-cyan);
    border-right: 2px solid var(--color-neon-cyan);
    box-shadow: inset 20px 0 40px rgba(173, 243, 255, 0.05), inset -20px 0 40px rgba(173, 243, 255, 0.05);
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: 240px;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 13, 26, 0.95) 0%, rgba(5, 7, 15, 0.95) 100%);
    border-right: 2px solid var(--color-neon-cyan);
    padding: 20px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: inset -20px 0 40px rgba(173, 243, 255, 0.1);
    flex-shrink: 0;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--color-neon-cyan);
    border-radius: 4px;
}

.sidebar-header {
    border-bottom: 2px solid var(--color-neon-cyan);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: var(--font-size-xl);
    color: var(--color-neon-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--color-neon-cyan);
}

.sidebar-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-dim);
    margin-top: 5px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    max-width: calc(1200px - 230px);
}

.main-content {
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 30px;
    background: transparent;
    width: 100%;
    min-width: calc(1200px - 230px);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.main-content::-webkit-scrollbar {
    width: 12px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(5, 7, 15, 0.5);
    border-left: 1px solid var(--color-neon-cyan);
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--color-neon-cyan);
    border-radius: 6px;
    border: 2px solid rgba(5, 7, 15, 0.8);
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-neon-magenta);
    box-shadow: 0 0 10px rgba(173, 243, 255, 0.5);
}

/* ============================================
   PAGE TITLE
   ============================================ */

.page-title {
    font-size: 32px;
    color: var(--color-neon-cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-shadow: 0 0 30px var(--color-neon-cyan);
    border-bottom: 2px solid var(--color-neon-cyan);
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title::before {
    content: "█";
    color: var(--color-neon-magenta);
    font-size: 24px;
}

/* ============================================
   CARDS & BOXES
   ============================================ */

.card {
    background: linear-gradient(135deg, rgba(10, 13, 26, 0.85) 0%, rgba(15, 18, 40, 0.75) 100%);
    border: 2px solid var(--color-neon-cyan);
    border-radius: 2px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(173, 243, 255, 0.3),
        inset 0 0 20px rgba(173, 243, 255, 0.05);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(173, 243, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.card-header {
    border-bottom: 1px solid var(--color-neon-cyan);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-title {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--color-neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 15px var(--color-neon-cyan);
}

.card-value {
    text-align: center;
    font-size: 24px;
    color: var(--color-neon-green);
    text-shadow: 0 0 15px var(--color-neon-green);
    font-weight: bold;
}

.card-subtitle {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-dim);
    margin-top: 5px;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1400px) {
    .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================
   TABLES
   ============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(10, 13, 26, 0.6);
    border: 1px solid var(--color-neon-cyan);
}

.data-table thead {
    background: rgba(15, 18, 40, 0.8);
    border-bottom: 2px solid var(--color-neon-cyan);
}

.data-table th {
    padding: 12px;
    text-align: left;
    color: var(--color-neon-cyan);
    text-transform: uppercase;
    font-size: var(--font-size-sm);
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--color-neon-cyan);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(173, 243, 255, 0.2);
    color: var(--color-text-primary);
}

.data-table tbody tr:hover {
    background: rgba(173, 243, 255, 0.1);
    box-shadow: inset 0 0 10px rgba(173, 243, 255, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 10px 20px;
    border: 2px solid var(--color-neon-cyan);
    background: transparent;
    color: var(--color-neon-cyan);
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px var(--color-neon-cyan);
    box-shadow: 0 0 10px rgba(173, 243, 255, 0.3);
}

.btn:hover {
    background: var(--color-neon-cyan);
    color: var(--color-bg-primary);
    box-shadow: 0 0 20px rgba(173, 243, 255, 0.6);
    text-shadow: none;
}

.btn-primary {
    border-color: var(--color-neon-cyan);
    color: var(--color-neon-cyan);
    text-shadow: 0 0 10px var(--color-neon-cyan);
    box-shadow: 0 0 10px rgba(173, 243, 255, 0.3);
}

.btn-primary:hover {
    background: var(--color-neon-cyan);
    color: var(--color-bg-primary);
    box-shadow: 0 0 20px rgba(173, 243, 255, 0.6);
}

/* ============================================
   CHARTS & GRAPHS
   ============================================ */

.chart-container {
    background: linear-gradient(135deg, rgba(10, 13, 26, 0.85) 0%, rgba(15, 18, 40, 0.75) 100%);
    border: 2px solid var(--color-neon-cyan);
    border-radius: 2px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(173, 243, 255, 0.3);
    width: 100%;
    height: 350px;
    flex-shrink: 0;
    padding-bottom: 50px;
}

canvas {
    max-height: 300px;
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   TERMINAL-STYLE ELEMENTS
   ============================================ */

.terminal-box {
    background: rgba(5, 7, 15, 0.9);
    border: 1px solid var(--color-neon-cyan);
    border-radius: 2px;
    padding: 15px;
    font-family: var(--font-main);
    font-size: var(--font-size-sm);
    color: var(--color-neon-green);
    text-shadow: 0 0 10px var(--color-neon-green);
    margin-bottom: 15px;
    line-height: 1.8;
}

.terminal-box::before {
    content: "$ ";
    color: var(--color-neon-cyan);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1rem;
    background: var(--color-neon-cyan);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

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

/* ============================================
   INPUT ELEMENTS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    background: rgba(5, 7, 15, 0.9);
    border: 1px solid var(--color-neon-cyan);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    padding: 8px 12px;
    border-radius: 2px;
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--color-neon-magenta);
    box-shadow: 0 0 15px rgba(173, 243, 255, 0.3);
    outline: none;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
        padding: 15px;
    }
    
    .main-wrapper {
        max-width: calc(1200px - 240px);
    }
    
    .main-content {
        padding: 20px;
        min-width: calc(1200px - 240px);
    }
}

@media (max-width: 768px) {
    /* 햄버거 메뉴 표시 */
    .hamburger-btn {
        display: flex;
    }
    
    /* 레이아웃 변경 */
    .app-container-inner {
        max-width: 100%;
        flex-direction: column;
        height: 100px;
    }
    
    .layout-wrapper {
        flex-direction: column;
        border-left: none;
        border-right: none;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 0;
        border-right: none;
        border-bottom: 2px solid var(--color-neon-cyan);
        overflow: hidden;
        transition: max-height 0.3s ease;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 99;
        padding: 0;
    }
    
    .sidebar.active {
        max-height: 400px;
        overflow-y: auto;
        padding: 20px;
    }
    
    .main-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .main-content {
        padding: 15px;
        margin-top: 0;
        min-width: 100%;
    }
    
    .navbar {
        padding: 10px 15px;
    }
    
    .navbar-inner {
        flex-direction: row;
    }
    
    .navbar-brand {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .navbar-status {
        gap: 10px;
        font-size: 11px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    .navbar-status {
        gap: 5px;
        font-size: 10px;
    }
    
    .page-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .page-title::before {
        font-size: 18px;
    }
    
    .card-title {
        font-size: 12px;
    }
    
    .card-value {
        font-size: 18px;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    .sidebar {
        top: 50px;
    }
    
    .main-content {
        min-width: 100%;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

.text-success { color: var(--color-neon-green); }
.text-danger { color: var(--color-neon-magenta); }
.text-warning { color: var(--color-neon-orange); }
.text-info { color: var(--color-neon-cyan); }

.glow-cyan {
    text-shadow: 0 0 20px var(--color-neon-cyan);
}

.glow-magenta {
    text-shadow: 0 0 20px var(--color-neon-magenta);
}

.glow-green {
    text-shadow: 0 0 20px var(--color-neon-green);
}

/* CLI 콘솔 스타일 강화 */
.cli-text {
    font-family: var(--font-main);
    letter-spacing: 0.05em;
    line-height: 1.8;
}

.cli-prefix {
    color: var(--color-neon-cyan);
    font-weight: bold;
}

.cli-command {
    color: var(--color-neon-green);
}

.cli-output {
    color: var(--color-text-primary);
}

.cli-error {
    color: var(--color-neon-magenta);
}
