/* navigation.css - 侧边导航栏样式 */

/* 导航菜单样式 */
.nav-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: white;
    color:#667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background: white;
    transform: scale(1.05);
}

.nav-toggle.active {
    background: white;
    transform: rotate(90deg);
}

.sidebar-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    color: #667eea;
    z-index: 999;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 5px 0 25px rgba(0,0,0,0.3);
    overflow-y: auto;
    padding-top: 80px;
}

.sidebar-nav.open {
    left: 0;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* 用户信息区域 */
.user-info {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-email {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.login-btn {
    display: inline-block;
    padding: 6px 20px;
    background: #4CAF50;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* 导航菜单列表 */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 25px;
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    border-left: 4px solid #2196F3;
}

.nav-icon {
    width: 24px;
    margin-right: 15px;
    text-align: center;
    font-size: 16px;
}

.nav-badge {
    position: absolute;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* 菜单项特殊样式 */
.nav-item.account .nav-icon {
    color: #4CAF50;
}

.nav-item.favorites .nav-icon {
    color: #e91e63;
}

.nav-item.downloads .nav-icon {
    color: #FF9800;
}

.nav-item.timer .nav-icon {
    color: #9C27B0;
}

.nav-item.records .nav-icon {
    color: #00BCD4;
}

.nav-item.about .nav-icon {
    color: #607D8B;
}

/* 底部信息 */
.nav-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    font-size: 12px;
    opacity: 0.7;
}

.version-info {
    margin-bottom: 10px;
}

.copyright {
    font-size: 11px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-nav {
        width: 250px;
    }
    
    .nav-toggle {
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .sidebar-nav {
        width: 100%;
        left: -100%;
    }
    
    .sidebar-nav.open {
        left: 0;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-item:nth-child(6) { animation-delay: 0.35s; }
.nav-item:nth-child(7) { animation-delay: 0.4s; }