/* 基础样式重置和变量定义 */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --text-color: #1F2937;
    --bg-color: #FFFFFF;
    --card-bg: #F9FAFB;
    --border-radius: 0.75rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

/* 头部导航栏 */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
}

/* 侧边栏菜单 */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: white;
    z-index: 200;
    transition: left 0.3s ease-in-out;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-sidebar {
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-menu li:hover {
    background-color: #F3F4F6;
}

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

.overlay.active {
    display: block;
}

/* 主内容区域 */
main {
    padding: 1rem;
}

section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 0.5rem;
}

/* 卡片组件 */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-content {
    color: #4B5563;
}

.cards{
    height: calc(100vh - 100px);

}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    border: 1px solid #23292e;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2563EB;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #059669;
}

.btn-outline {
    padding: 0.20rem 1.25rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.btn:active {
    transform: scale(0.98);
}

/* 表单元素 */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    transition: border-color 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 90;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6B7280;
    transition: color 0.2s;
    text-decoration: none;
}

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

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.75rem;
}

/* 响应式布局 */
.container {
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

/* 加载动画 */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#demoTabsHeader .layui-btn.layui-this{
    border-color: #eee;
    color: unset;
}
#demoTabsBody .test-item{
    display: none;
}