/* 设计系统变量 */
:root {
    --primary: #3498db; --success: #27ae60; --danger: #e74c3c; --warning: #f39c12;
    --dark: #2c3e50; --light: #f8f9fa; --border: #e9ecef; --text: #2c3e50;
    --text-light: #7f8c8d;
    --transition-fast: 0.2s ease; --transition-normal: 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.2);
}

/* 基础样式重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; overflow: hidden; }

/* 密码保护模块 - 修改为渐变卡片效果 */
.password-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.8); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 9999; 
}

/* 卡片样式 - From Uiverse.io by alexruix */
.password-container {
    --background: linear-gradient(to left, #f7ba2b 0%, #ea5358 100%);
    width: 320px;
    height: 280px;
    padding: 4px; /* 减小边框粗细，从5px改为2px */
    border-radius: 1rem;
    overflow: visible;
    background: #f7ba2b;
    background: var(--background);
    position: relative;
    z-index: 1;
}

.password-container::after {
    position: absolute;
    content: "";
    top: 15px; /* 减小发光效果的位置 */
    left: 0;
    right: 0;
    z-index: -1;
    height: 100%;
    width: 100%;
    transform: scale(0.9); /* 减小缩放比例 */
    filter: blur(15px); /* 减小模糊程度 */
    background: #f7ba2b;
    background: var(--background);
    transition: opacity .5s;
}

.password-content {
    --color: #181818;
    background: var(--color);
    color: transparent; /* 默认文字透明 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: visible;
    border-radius: .7rem;
    padding: 30px;
    text-align: center;
    transition: all 0.5s ease;
    position: relative;
}

/* 默认状态下显示404 页面未找到 */
.password-content::before {
    content: "404 页面未找到";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: bold;
    color: #f7ba2b;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}

/* 默认状态下隐藏所有内容 */
.password-content > * {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.password-container h2 {
    font-weight: bold;
    letter-spacing: .1em;
    font-size: 24px;
    margin-bottom: 20px;
    color: #f7ba2b;
}

/* 输入框样式 */
.password-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #444;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;
    background: #222;
    color: white;
    transition: all 0.3s;
    opacity: 0;
    position: relative;
    z-index: 2;
}

.password-input:focus {
    border-color: #f7ba2b;
    box-shadow: 0 0 0 3px rgba(247, 186, 43, 0.2);
}

.password-btn {
    background: linear-gradient(to left, #f7ba2b 0%, #ea5358 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    letter-spacing: .1em;
    width: 100%;
    opacity: 0;
    position: relative;
    z-index: 2;
}

.password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 186, 43, 0.3);
}

.password-error {
    color: #ea5358;
    margin-top: 10px;
    font-size: 14px;
    display: none;
    opacity: 0;
    position: relative;
    z-index: 2;
}

/* 点击4次显示密码输入框的样式 */
.password-container.active::after {
    opacity: 0;
}

.password-container.active .password-content {
    color: #f7ba2b;
    transition: color 1s;
}

.password-container.active .password-content::before {
    opacity: 0; /* 激活时隐藏404 */
}

.password-container.active .password-content > * {
    opacity: 1; /* 激活时显示所有内容 */
}

.password-container.active .password-input {
    opacity: 1;
}

.password-container.active .password-btn {
    opacity: 1;
}

.password-container.active .password-error {
    opacity: 1;
}

/* 删除重复的.password-container样式 */
/* .password-container { background: white; padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); text-align: center; max-width: 400px; width: 90%; } */
/* .password-container h2 { color: var(--dark); margin-bottom: 20px; font-size: 1.5em; } */
/* .password-input { width: 100%; padding: 15px; border: 2px solid var(--border); border-radius: 8px; font-size: 16px; margin-bottom: 20px; text-align: center; transition: border-color var(--transition-normal); } */
/* .password-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); } */
/* .password-btn { background: var(--primary); color: white; border: none; padding: 12px 30px; border-radius: 8px; font-size: 16px; cursor: pointer; transition: all var(--transition-normal); font-weight: 600; } */
/* .password-btn:hover { background: #2980b9; transform: translateY(-2px); } */
/* .password-error { color: var(--danger); margin-top: 10px; font-size: 14px; display: none; } */

/* 主应用布局 */
.app { display: flex; flex-direction: column; height: 100vh; background: white; display: none; }
.header { background: linear-gradient(135deg, #2c3e50, #34495e); color: white; padding: 20px 30px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); flex-shrink: 0; }
.header h1 { font-size: 2em; margin-bottom: 5px; font-weight: 600; }
.header p { opacity: 0.9; font-size: 1em; }
.main-content { flex: 1; display: flex; overflow: hidden; }

/* 侧边栏模块 */
.sidebar { width: 280px; background: var(--light); border-right: 1px solid var(--border); padding: 25px 20px; display: flex; flex-direction: column; gap: 25px; overflow-y: auto; }
.sidebar-section { background: white; border-radius: 10px; padding: 15px; box-shadow: var(--shadow-sm); }
.sidebar-section h3 { color: var(--dark); margin-bottom: 15px; font-size: 1.1em; text-align: center; padding: 8px; background: linear-gradient(135deg, var(--primary), #2980b9); color: white; border-radius: 6px; }

/* 按钮系统 */
.btn-group { display: flex; flex-direction: column; gap: 10px; }
.btn { padding: 12px; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; transition: all var(--transition-fast); display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 14px; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* 文件上传模块 */
.file-upload { background: var(--primary); color: white; padding: 12px; border-radius: 8px; text-align: center; cursor: pointer; transition: all var(--transition-fast); font-size: 14px; font-weight: 600; }
.file-upload:hover { opacity: 0.9; }
#fileInput { display: none; }
.stats-content { color: var(--text-light); font-size: 0.9em; line-height: 1.5; text-align: center; }

/* 内容区域模块 */
.content-area { flex: 1; padding: 25px; overflow-y: auto; background: var(--light); }
.form-card { background: white; padding: 20px; border-radius: 12px; margin-bottom: 20px; box-shadow: var(--shadow-md); }
.form-card h3 { margin-bottom: 15px; color: var(--dark); font-size: 1.1em; text-align: center; padding: 8px; background: linear-gradient(135deg, var(--light), var(--border)); border-radius: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--text); font-size: 0.9em; }
.form-control { width: 100%; padding: 10px; border: 2px solid var(--border); border-radius: 6px; font-size: 14px; transition: border-color var(--transition-fast); background: var(--light); }
.form-control:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* 卡片展示模块 */
.columns { display: flex; gap: 20px; overflow-y: auto; padding: 10px 0; flex-wrap: wrap; max-height: 600px; width: 100%; }
.column { width: calc(20% - 16px); background: white; border-radius: 12px; padding: 15px; box-shadow: var(--shadow-md); border: 2px solid var(--border); box-sizing: border-box; }
/* 栏目头部样式 */
.column-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.column-title { font-weight: 600; color: var(--text); font-size: 1.1em; }
.column-count { background: var(--light); padding: 4px 8px; border-radius: 12px; font-size: 0.8em; color: var(--text-light); font-weight: 600; }
.column-actions { display: flex; gap: 5px; }
.cards { display: flex; flex-direction: column; gap: 10px; max-height: 500px; overflow-y: auto; padding-right: 5px; transition: all 0.3s ease; }
.card { background: white; border: 2px solid var(--border); border-radius: 8px; padding: 12px; transition: all var(--transition-fast); animation: fadeIn 0.3s ease; }
.card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-title { font-weight: 600; color: var(--text); font-size: 0.95em; }
.card-icon { color: var(--primary); font-size: 1.2em; }
.card-desc { color: var(--text-light); font-size: 0.8em; margin-bottom: 10px; line-height: 1.3; min-height: 35px; }
.card-actions { display: flex; gap: 5px; justify-content: center; }
.action-btn { padding: 6px 10px; border: none; border-radius: 4px; font-size: 0.8em; cursor: pointer; transition: all var(--transition-fast); flex: 1; max-width: 70px; display: flex; align-items: center; justify-content: center; gap: 3px; font-weight: 500; }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 消息提示模块 */
.toast { position: fixed; top: 20px; right: 20px; background: var(--danger); color: white; padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 1000; animation: slideIn 0.3s ease; display: none; }
.toast.show { display: block; }

/* 滚动条样式模块 */
.cards::-webkit-scrollbar, .columns::-webkit-scrollbar { width: 6px; height: 8px; }
.cards::-webkit-scrollbar-track, .columns::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.cards::-webkit-scrollbar-thumb, .columns::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
.cards::-webkit-scrollbar-thumb:hover, .columns::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* 动画效果 */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.shake-animation { animation: shake 0.5s; }

/* 拖拽样式 */
.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    cursor: grabbing;
}

.card.dragging {
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(52, 152, 219, 0.3);
}

.column.dragging {
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(52, 152, 219, 0.3);
}

.drag-over {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
}

.cards.drag-over {
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
}

/* 拖拽过程中的视觉反馈 */
[draggable="true"] {
    cursor: grab;
    transition: all var(--transition-fast);
}

[draggable="true"]:active {
    cursor: grabbing;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: var(--shadow-md);
}
.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all var(--transition-fast);
    font-size: 14px;
}
.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) { .main-content { flex-direction: column; } .sidebar { width: 100%; height: auto; } .columns { flex-direction: column; } .column { min-width: auto; } }