/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #1a1d29;
    color: #e4e4e7;
    overflow-x: hidden;
}

/* ============================================
   DESKTOP ENVIRONMENT
   ============================================ */
.desktop {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1d29 0%, #2d3748 100%);
    position: relative;
}

/* ============================================
   MATRIX BACKGROUND
   ============================================ */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
}

/* ============================================
   MENU BAR
   ============================================ */
/* css/style.css 파일의 MENU BAR 섹션을 이것으로 교체하세요 */

/* ============================================
   MENU BAR
   ============================================ */
.menu-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 32px;
    background: rgba(26, 29, 41, 0.95);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    z-index: 1001;
    font-size: 0.9rem;
}

.menu-item {
    position: relative;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: all 0.3s;
    border-radius: 4px;
}

.menu-item:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: rgba(30, 33, 45, 0.98);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.6rem 1rem;
    color: #e4e4e7;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding-left: 1.2rem;
}

.dropdown-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
    margin: 0.5rem 0;
}

/* ============================================
   TASKBAR
   ============================================ */
.taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 48px;
    background: rgba(26, 29, 41, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    z-index: 1000;
}

.taskbar-item {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: #e4e4e7;
}

.taskbar-item:hover {
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    border-color: rgba(129, 140, 248, 0.5);
}

.clock {
    margin-left: auto;
    font-family: 'Courier New', monospace;
    color: #a5b4fc;
}

/* ============================================
   WINDOW SYSTEM
   ============================================ */
.window {
    position: absolute;
    background: rgba(30, 33, 45, 0.95);
    border: 2px solid rgba(99, 102, 241, 0.4);
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    min-width: 400px;
    max-width: 90vw;
}

.window-header {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    cursor: move;
}

.window-title {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e4e4e7;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.window-btn {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s;
    color: #e4e4e7;
    background: rgba(45, 55, 72, 0.5);
}

.window-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(129, 140, 248, 0.6);
}

.window-btn.close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(248, 113, 113, 0.6);
}

.window-content {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* ============================================
   TERMINAL
   ============================================ */
.terminal {
    font-family: 'Courier New', monospace;
    background: #0f1419;
    color: #c9d1d9;
    padding: 1rem;
    border-radius: 4px;
    min-height: 300px;
}

.terminal-line {
    margin-bottom: 0.5rem;
    animation: typing 0.5s steps(40);
}

.terminal-prompt {
    color: #79c0ff;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #c9d1d9;
    font-family: 'Courier New', monospace;
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: #79c0ff;
    animation: blink 1s infinite;
}

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

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* ============================================
   HERO TERMINAL
   ============================================ */
.hero-terminal {
    margin: 2rem auto;
    max-width: 900px;
    padding: 0 1rem;
    margin-top: 50px;
}

.hero-terminal .terminal {
    font-size: 1.1rem;
}

.ascii-art {
    color: #a5b4fc;
    font-size: 0.6rem;
    line-height: 1;
    white-space: pre;
    margin: 2rem 0;
    text-align: center;
}

/* ============================================
   SYSTEM MONITOR
   ============================================ */
.system-monitor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.monitor-item {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem;
    border-radius: 4px;
}

.monitor-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    color: #a5b4fc;
}

.monitor-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e4e4e7;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    animation: pulse 2s infinite;
}

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

/* ============================================
   CODE EDITOR
   ============================================ */
.code-editor {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    border-radius: 4px;
    min-height: 300px;
}

.line-numbers {
    color: #858585;
    user-select: none;
    padding-right: 1rem;
    border-right: 1px solid #333;
    margin-right: 1rem;
}

.code-line {
    display: flex;
    margin-bottom: 0.3rem;
}

.keyword { color: #569cd6; }
.string { color: #ce9178; }
.function { color: #dcdcaa; }
.comment { color: #6a9955; }

/* ============================================
   FILE BROWSER
   ============================================ */
.file-browser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: #e4e4e7;
    user-select: none;  /* 추가 */
}

.file-icon:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: scale(1.05);  /* 추가 */
}

.file-icon:active {  /* 새로 추가 */
    transform: scale(0.95);
}

.file-icon svg {
    width: 48px;
    height: 48px;
    stroke: #a5b4fc;
}

/* ============================================
   GLITCH EFFECT
   ============================================ */
.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .window {
        min-width: 95vw;
        left: 2.5vw !important;
        top: 50px !important;
    }

    .ascii-art {
        font-size: 0.4rem;
    }

    .system-monitor {
        grid-template-columns: repeat(2, 1fr);
    }

    .taskbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.5rem;
    }

    .taskbar-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}