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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #0d1117;
    color: #e6edf3;
}

.app-container {
    display: flex;
    height: 100vh;
    background: #0d1117;
}

/* Hamburger Menu */
.hamburger {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hamburger:hover {
    background: #30363d;
    border-color: #58a6ff;
    box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.3);
}

.hamburger-lines {
    width: 20px;
    height: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: #e6edf3;
    border-radius: 1px;
    transition: all 0.3s ease;
}

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

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

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.sidebar {
    width: 300px;
    background: #0d1117;
    border-right: 1px solid #30363d;
    color: #e6edf3;
    padding: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: fixed;
    height: 100vh;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(13, 110, 253, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(88, 166, 255, 0.05) 0%, transparent 50%);
}

.sidebar.open {
    transform: translateX(0);
}

.logo {
    padding: 60px 24px 24px 24px;
    border-bottom: 1px solid #30363d;
    text-align: center;
}

.logo h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #58a6ff;
    background: linear-gradient(135deg, #58a6ff, #1f6feb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    font-size: 14px;
    color: #8b949e;
    font-weight: 400;
}

.navigation {
    padding: 24px 0;
}

.nav-item {
    margin: 0 16px 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: #21262d;
    border-color: #30363d;
    transform: translateX(4px);
}

.nav-item.active {
    background: #1f6feb;
    border-color: #58a6ff;
    box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.3);
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #e6edf3;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-item .icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item:hover a {
    color: #58a6ff;
}

.nav-item.active a {
    color: white;
}

.content {
    flex: 1;
    background: #0d1117;
    position: relative;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.content.sidebar-open {
    margin-left: 300px;
}

.app-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    border: none;
    background: #0d1117;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-frame.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Loading indicator */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #8b949e;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #30363d;
    border-top: 2px solid #58a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }

    .content.sidebar-open {
        margin-left: 0;
    }

    .logo h2 {
        font-size: 20px;
    }

    .nav-item a {
        padding: 12px 14px;
        font-size: 13px;
    }
}
