﻿:root {
    --sidebar-width: 250px;
    --primary-color: #27ae60;
    --secondary-color: #2ecc71;
    --bg-color: #f5f5f5;
    --text-color: #333;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    color: #333;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1rem 0;
    text-align: center;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logo-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    margin-top: 2rem;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--primary-color);
}

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

.nav-menu span {
    font-size: 14px;
    line-height: 1;
}

.nav-menu .active a {
    background-color: rgba(39, 174, 96, 0.15);
    color: var(--primary-color);
}

/* 主内容区域样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.search-box {
    margin-left: auto;
    position: relative;
}

.search-box input {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 200px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    width: 250px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1);
}

.search-box i {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-box i:hover {
    color: var(--primary-color);
}

.content-area {
    flex: 1;
    padding: 1rem;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: white;
}

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

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

    .menu-toggle {
        display: block;
    }

    .nav-menu span {
        display: none;
    }
    
    .nav-menu i {
        margin: 0;
        font-size: 18px;
    }
    
    .nav-menu a {
        justify-content: center;
        padding: 0.8rem;
    }
}

.sidebar-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 250px; /* 与侧边栏宽度相同 */
    padding: 12px 15px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    width: 30px;
    height: 30px;
    opacity: 0.9;
}

.footer-text {
    flex: 1;
}

.footer-text p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.footer-text i {
    margin-right: 5px;
    color: #666;
}

.footer-text .icp-info {
    margin-top: 3px;
    font-size: 11px;
}

.footer-text .icp-info a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar-footer {
        width: 60px;
        padding: 10px;
    }
    
    .footer-text {
        display: none;
    }
    
    .footer-logo {
        width: 25px;
        height: 25px;
        margin: 0 auto;
    }
}
