html {
    font-size: 100%;   /* 通常相当于浏览器默认 16px */
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #ffffff;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --sidebar-bg: #f8fafc;
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1rem
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar.collapsed {
    opacity: 1;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.toggle-btn:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

.nav-menu {
    padding: 1rem 0;
}

.nav-item {
    position: relative;
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(37, 99, 235, 0.15);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.nav-icon {
    font-size: 1.2rem;
    width: 1.5rem;
    text-align: center;
    margin-right: 1rem;
}

.nav-text {
    white-space: nowrap;
    opacity: 1;
    transition: var(--transition);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
}

.nav-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: var(--transition);
}

.sidebar.collapsed .nav-arrow {
    opacity: 0;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.nav-item:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* 主内容区域 */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

.content {
    flex: 1;
    padding: 2rem;
}

.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    padding: 2rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--sidebar-bg);
}

/*.footer-links {*/
/*    margin-bottom: 1rem;*/
/*}*/

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1rem;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1002;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 0.75rem;
        border-radius: 0.5rem;
        cursor: pointer;
        box-shadow: var(--shadow);
    }

    .hero-title {
        font-size: 2rem;
    }

    .content {
        padding: 1rem;
        margin-top: 4rem;
    }
}

@media (min-width: 769px) {
    .mobile-toggle {
        display: none;
    }
}

/* 遮罩层 */
.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: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}