/* --- 全局设置 (复用主界面风格) --- */
:root {
    --primary-color: #ffb7b2;
    --accent-color: #ff9aa2;
    --text-color: #6d4c41;
    --bg-overlay: rgba(255, 248, 240, 0.6);
    --card-bg: rgba(255, 255, 255, 0.95);
    --hover-shadow: 0 8px 20px rgba(255, 154, 162, 0.3);
}

body {
    font-family: 'Quicksand', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    background: url('https://images.unsplash.com/photo-1425082661705-1834bfd09dca?q=80&w=2076&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 245, 238, 0.3); /* 暖色调遮罩 */
    backdrop-filter: blur(5px);
    z-index: -1;
}

.app-container {
    width: 90%;
    max-width: 500px; /* 稍微宽一点 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 20px 0;
}

/* --- 头部 --- */
header { text-align: center; width: 100%; }

h1 {
    font-family: 'Zcool KuaiLe', cursive;
    color: var(--text-color);
    font-size: 2.4em;
    margin: 0;
    text-shadow: 2px 2px 0px #fff, 3px 3px 5px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.1em;
    color: var(--accent-color);
    margin-top: 5px;
    font-weight: bold;
}

/* --- 词书列表 --- */
.book-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 60vh; /* 限制高度，支持滚动 */
    overflow-y: auto;
    padding: 5px; /* 为阴影预留空间 */
    /* 自定义滚动条 */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}
.book-list::-webkit-scrollbar { width: 6px; }
.book-list::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 10px; }


/* --- 词书卡片 --- */
.book-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    position: relative;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

/* 装饰性背景图案 */
.book-card::before {
    content: '📘';
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 8em;
    opacity: 0.05;
    transform: rotate(-15deg);
    pointer-events: none;
}

.book-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.book-icon { font-size: 2.5em; }

.book-info { flex: 1; }

.book-info h2 {
    margin: 0 0 6px 0;
    font-size: 1.25em;
    color: var(--text-color);
}

.book-info p {
    margin: 0;
    font-size: 0.9em;
    color: #8d6e63;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status {
    font-size: 0.8em;
    padding: 2px 8px;
    background-color: #ffe0b2;
    color: #e65100;
    border-radius: 10px;
    font-weight: bold;
}

.arrow {
    font-size: 1.8em;
    color: var(--primary-color);
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
}
.book-card:hover .arrow { opacity: 1; transform: translateX(5px); }

/* --- 删除按钮 --- */
.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1em;
    cursor: pointer;
    opacity: 0; /* 默认隐藏 */
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.book-card:hover .delete-btn { opacity: 1; }
.delete-btn:hover { background: #ffcdd2; transform: scale(1.1) rotate(10deg); }

/* --- 进度条 --- */
.progress-bar {
    height: 8px;
    background-color: #f0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

/* --- 底部操作栏 --- */
.action-bar { width: 100%; display: flex; justify-content: center; }

.import-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 154, 162, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 154, 162, 0.6);
}
.import-btn:active { transform: translateY(1px); }
.import-btn .icon { font-size: 1.2em; }

#importInput { display: none; }

/* --- 空状态提示 --- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255,255,255,0.6);
    border-radius: 20px;
    border: 2px dashed var(--primary-color);
    color: #8d6e63;
}
.empty-icon { font-size: 4em; margin-bottom: 15px; opacity: 0.8; }
.empty-text { font-size: 1.1em; font-weight: bold; margin-bottom: 5px; }
.empty-subtext { font-size: 0.9em; opacity: 0.8; }
