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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.app { display: flex; height: 100vh; }

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    animation: fadeIn 0.3s ease;
}

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

.sidebar {
    width: 260px;
    background: #1e1e2d;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo h1 {
    font-size: 18px;
    font-weight: 600;
    color: #92929f;
    letter-spacing: 2px;
}

.nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-group { margin-bottom: 24px; }

.nav-label {
    font-size: 11px;
    font-weight: 600;
    color: #565674;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 8px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #92929f;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: #b4b4c6;
}

.nav-item.active {
    background: rgba(110,110,255,0.1);
    color: #6e6eff;
}

.nav-num {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-item.active .nav-num {
    background: rgba(110,110,255,0.2);
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    min-width: 0;
}

.header {
    padding: 16px 28px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #999;
    transition: all 0.3s ease;
}

.header .title {
    cursor: pointer;
    transition: color 0.2s;
}

.header .title:hover {
    color: #666;
}

.header strong {
    color: #333;
    font-weight: 600;
}

.content { 
    flex: 1; 
    display: flex;
    position: relative;
    overflow: hidden;
}

.content iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.content iframe.loading {
    opacity: 0;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loader.show {
    display: block;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: #6e6eff;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.empty div {
    text-align: center;
}

.empty p {
    margin-top: 16px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .overlay.show {
        display: block;
    }
    
    .header .title {
        color: #6e6eff;
        font-weight: 500;
    }
    
    .header .title::before {
        content: '☰ ';
        font-size: 14px;
    }
}