#app {
    width: 100vw;
    height: 100vh;
}

#graph-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#graph-container canvas {
    pointer-events: auto;
}

#graph-container.collapsed {
    pointer-events: none;
}

#module-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-panel);
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.35s ease;
}

#module-panel:not(.hidden) {
    display: flex;
}

#module-panel.hidden {
    display: none;
}

#module-window {
    position: relative;
    width: min(900px, 94vw);
    max-height: 85vh;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-modal);
    box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: windowIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#orbit-nodes {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    z-index: 6;
}

.orbit-node {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: border-color 0.3s, box-shadow 0.3s, color 0.3s, transform 0.3s;
    box-shadow: 0 0 8px rgba(124,92,252,0.1), 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    animation: orbitVerticalFloat var(--orbit-dur) ease-in-out infinite,
               orbitFadeIn 0.5s ease forwards;
    animation-delay: var(--orbit-delay), calc(var(--orbit-delay) + 0.15s);
    flex-shrink: 0;
}
.orbit-node:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.25);
    z-index: 10;
}

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

@keyframes orbitFadeIn {
    to { opacity: 1; }
}

@keyframes windowIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

#module-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 36px;
}

#module-sidebar {
    display: none;
}

#module-close {
    position: absolute;
    top: 12px;
    left: 16px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
    line-height: 1;
}
#module-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.btn-back {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.btn-back:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.4);
    transform: translateX(-50%) translateY(-3px);
}

@keyframes panelIn { from { opacity: 0; } to { opacity: 1; } }

.module-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.module-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary-hover);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.module-title::before {
    content: '';
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
    display: block;
}
.module-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

.top-right {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 200;
    pointer-events: auto;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 12px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.theme-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all var(--transition-slow);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    position: relative;
}

.copyright {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 100;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.35;
    transition: opacity 0.3s;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    pointer-events: auto;
}

@media (max-width: 1280px) {
    #module-window { width: 96vw; }
    #module-content { padding: 24px; }
}
