@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0c0c0c;
    --accent-color: #007AFF;
    --accent-glow: rgba(0, 122, 255, 0.3);
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(25px);
    --player-radius: 20px;
    --font-main: 'Pretendard', 'Outfit', sans-serif;
    --os-padding: 50px;
    --transition-std: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
    --transition-window: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    user-select: none;
}

body::after {
    content: "";
    position: fixed;
    bottom: -10%;
    right: -5%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.05) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: -2px;
}

.section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--os-padding);
    z-index: 5;
    opacity: 0;
    transform: scale(1.1);
    transition: var(--transition-window);
}

.section.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.os-apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.os-app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-std);
}

.icon-box {
    width: 75px;
    height: 75px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    transition: var(--transition-std);
}

.os-app-icon:hover {
    transform: translateY(-5px);
}

.os-app-icon:hover .icon-box {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.os-app-name {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.7;
}

.os-input-bar {
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    padding: 10px 15px;
    border-radius: 16px;
    width: 600px;
    display: flex;
    transition: var(--transition-std);
}

.os-input-bar:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.os-input-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    outline: none;
}

.player-wrapper,
.image-wrapper,
.datapack-container,
.debug-container {
    background: #111;
    border: 1px solid var(--glass-border);
    border-radius: var(--player-radius);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
}

.logo {
    position: fixed;
    top: 30px;
    left: 40px;
    font-weight: 600;
    font-size: 1.2rem;
    z-index: 100;
}

.logo-box {
    background: var(--accent-color);
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 0.9rem;
    margin-right: 10px;
}

.os-taskbar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 8px;
    border-radius: 20px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.taskbar-item {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-std);
}

.taskbar-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.taskbar-item.active {
    background: var(--accent-color);
}

.btn-ui {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-std);
}

.btn-ui:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.image-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

canvas#equalizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    opacity: 0.3;
}

/* Neural Tree Styles */
.json-tree {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #aeaeae;
}

.tree-node {
    margin-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding-left: 10px;
}

.tree-key {
    color: #007AFF;
    font-weight: 600;
    cursor: pointer;
}

.tree-key:hover {
    color: #5856D6;
}

.tree-string {
    color: #4cd964;
}

.tree-number {
    color: #ff9500;
}

.tree-boolean {
    color: #ff2d55;
}

.tree-null {
    color: #8e8e93;
}

.tree-toggle {
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-right: 5px;
    cursor: pointer;
}

.tree-collapsed .tree-node {
    display: none;
}

.tree-collapsed::after {
    content: " ... }";
    color: #8e8e93;
}

/* Neural Interface Adjustments */
.neural-interface {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.neural-textarea {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #4cd964;
    padding: 15px;
    font-family: monospace;
    font-size: 0.85rem;
    outline: none;
    resize: none;
}

.neural-result {
    background: rgba(0, 122, 255, 0.05);
    border: 1px solid rgba(0, 122, 255, 0.2);
    padding: 12px;
    border-radius: 10px;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.75rem;
    color: #007AFF;
    max-height: 80px;
    overflow-y: auto;
}