:root {
    --primary-color: #4f46e5;
    --primary-light: #e0e7ff;
    --bg-gradient-start: #f5f7fa;
    --bg-gradient-end: #e4e8ec;
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.4);
    --card-shadow: rgba(31, 38, 135, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: #374151;
}

.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.bg-ball-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -100px;
    right: -100px;
}

.bg-ball-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -50px;
    left: -50px;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 30%) 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    align-items: start;
}

.side-nav-new {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 16px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
    max-width: 300px;
    width: 100%;
    justify-self: end;
}

.side-logo {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.side-logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-logo .logo-icon {
    font-size: 28px;
    color: var(--primary-color);
}

.side-logo h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* 垂直导航 tab - 每个菜单占一行 */
.side-nav-tabs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    position: relative;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.nav-tab i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-tab:hover {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-tab.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-tab.active::before {
    height: 24px;
}

/* 移除旧的垂直菜单样式 */
.pc-side-menu {
    display: none;
}

.side-nav-footer {
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.footer-info {
    text-align: center;
}

.footer-info p {
    font-size: 11px;
    color: #9ca3af;
    margin: 2px 0;
}

.footer-info .version {
    font-size: 10px;
    color: #d1d5db;
}

.main-content-new {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 16px;
    min-width: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 999;
    padding: 20px;
    list-style: none;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.side-menu.active {
    right: 0;
}

.side-menu li {
    margin-bottom: 8px;
}

.side-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    transition: background 0.2s;
}

.side-menu li a:hover,
.side-menu li a.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.side-menu li a i {
    font-size: 20px;
}

.side-menu-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
        padding: 0;
		border-radius:none;
        gap: 12px;
        padding-bottom: 80px;
    }

    .side-nav-new {
        display: none;
    }

    .mobile-menu-btn {
        display: none;
    }

    .main-content-new {
        padding: 12px;
    }
}

/* 移动端底部导航栏 */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 500;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.mb-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: #9ca3af;
    font-size: 10px;
    transition: color 0.2s;
    position: relative;
}

.mb-nav-item i {
    font-size: 22px;
}

.mb-nav-item.active {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
}

.layui-card {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    border-radius: none;
}

.tool-class-section {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
