/* 剧本杀剧本本库 - 全局样式 */
:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1e2a3a;
    --bg-input: #0f3460;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-muted: #6c6c80;
    --accent: #00d4aa;
    --accent-hover: #00b894;
    --accent2: #e94560;
    --accent3: #533483;
    --accent4: #f5a623;
    --accent5: #4ecdc4;
    --border: #2a2a4a;
    --danger: #e94560;
    --success: #00b894;
    --warning: #fdcb6e;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border: none; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s;
    gap: 6px;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* 输入框 */
.input {
    width: 100%; padding: 10px 14px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-primary); font-size: 14px; outline: none;
    transition: border-color 0.2s;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text-muted); }
textarea.input { resize: vertical; min-height: 80px; }

select.input {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}

/* 卡片 */
.card {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* 搜索框 */
.search-box {
    display: flex; gap: 8px; margin-bottom: 16px;
}
.search-box .input { flex: 1; }

/* 标签 */
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 12px;
    font-size: 11px; font-weight: 500;
}
.tag-theme-恐怖 { background: #e94560; color: #fff; }
.tag-theme-欢乐 { background: #f5a623; color: #000; }
.tag-theme-推理 { background: #4ecdc4; color: #000; }
.tag-theme-情感 { background: #a29bfe; color: #fff; }
.tag-theme-机制 { background: #00d4aa; color: #000; }
.tag-difficulty-简单 { background: #00b894; color: #000; }
.tag-difficulty-中等 { background: #fdcb6e; color: #000; }
.tag-difficulty-困难 { background: #e94560; color: #fff; }

/* 筛选栏 */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding: 12px;
    background: var(--bg-secondary); border-radius: var(--radius);
}
.filter-bar select { max-width: 140px; }

/* Toast */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    padding: 12px 24px; border-radius: var(--radius); z-index: 9999;
    font-size: 14px; color: #fff; animation: slideDown 0.3s ease;
    max-width: 90vw; text-align: center;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--accent); color: #000; }
@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s;
}
.modal {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 24px; max-width: 560px; width: 90vw;
    max-height: 85vh; overflow-y: auto; border: 1px solid var(--border);
}
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 分页 */
.pagination {
    display: flex; justify-content: center; align-items: center; gap: 8px;
    margin-top: 20px; padding: 12px;
}
.pagination button {
    padding: 6px 14px; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary); cursor: pointer;
}
.pagination button:hover { border-color: var(--accent); }
.pagination button.active { background: var(--accent); color: #000; border-color: var(--accent); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* 空状态 */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* Loading */
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.spinner {
    display: inline-block; width: 32px; height: 32px; border: 3px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 响应式 */
@media (max-width: 768px) {
    .filter-bar select { max-width: 100%; flex: 1; }
}
