/* 图书批量导入页面样式 - 女性风格优化版 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --primary-color: #e083b8;
    --primary-light: #f8d7e9;
    --secondary-color: #89c2d9;
    --accent-color: #a76eb8;
    --text-color: #555;
    --light-text: #888;
    --dark-text: #333;
    --border-radius: 12px;
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

body {
    background-color: #fff6f9;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
}

.import-container {
    padding: 30px;
    position: relative;
    overflow: hidden;
}

/* 页眉样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0d3e6;
}

.fancy-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(167, 110, 184, 0.2);
    letter-spacing: 1px;
    margin: 0;
    position: relative;
}

.fancy-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--light-text);
    margin-left: 10px;
}

.btn-return {
    padding: 8px 20px;
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--primary-light);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(167, 110, 184, 0.1);
}

.btn-return:hover {
    background-color: var(--primary-light);
    color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(167, 110, 184, 0.2);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #f9f1f7, #fcf6fa);
    padding: 20px 25px;
    border-bottom: 1px solid #f0e1ea;
}

.card-header h4 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    margin: 0;
    font-size: 1.5rem;
}

.sparkle {
    color: var(--primary-color);
    margin-right: 8px;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.card-body {
    padding: 30px;
}

/* 表单样式 */
.elegant-label {
    font-weight: 500;
    color: var(--dark-text);
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: block;
}

.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
}

.custom-file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.custom-file-label {
    padding: 15px 20px;
    background-color: #f9f2f7;
    color: var(--light-text);
    border: 2px dashed #e9d6e5;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.custom-file-label:hover {
    background-color: #f4e8f0;
    border-color: var(--primary-color);
}

.has-file .custom-file-label {
    background-color: #e6f3ff;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    font-weight: 500;
}

.import-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    padding: 15px 30px;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 30px;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(167, 110, 184, 0.3);
}

.import-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(167, 110, 184, 0.4);
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

/* 分隔线 */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--light-text);
}

.divider:before,
.divider:after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #f0d3e6;
}

.divider-content {
    padding: 0 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 导入说明样式 */
.import-instructions {
    margin-top: 10px;
    padding: 25px;
    background: linear-gradient(to bottom right, #fff, #fafafa);
    border-radius: var(--border-radius);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.03);
}

.instruction-title {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
    display: inline-block;
}

.instruction-content {
    color: var(--text-color);
    line-height: 1.6;
}

.elegant-list {
    list-style-type: none;
    padding-left: 5px;
    margin-top: 15px;
}

.elegant-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    line-height: 1.5;
}

.elegant-list li:before {
    content: "\f054";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 12px;
}

.field-name {
    font-family: 'Courier New', monospace;
    background-color: #f6f6f6;
    padding: 2px 8px;
    border-radius: 4px;
    color: #9c5bb5;
    font-weight: 600;
    font-size: 0.9rem;
}

.required-field {
    color: var(--dark-text);
}

.required-badge {
    background-color: #fce1e9;
    color: #e25a86;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: 600;
}

/* 模板下载样式 */
.template-download {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff, #f5f0ff);
    border-radius: var(--border-radius);
    border: 1px solid #e0f0ff;
}

.template-download p {
    color: var(--dark-text);
    margin-bottom: 15px;
    font-weight: 500;
}

.download-btn {
    background-color: white;
    color: var(--accent-color);
    border: 2px solid var(--primary-light);
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.download-btn:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(167, 110, 184, 0.2);
}

/* 悬浮元素 - 冰雪奇缘和天空之城风格 */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.snowflake {
    position: absolute;
    opacity: 0.7;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.8) 0%, rgba(230,240,255,0.3) 70%, transparent 100%);
    animation: float 20s linear infinite;
}

.snowflake-1 {
    width: 20px;
    height: 20px;
    top: 10%;
    left: 10%;
}

.snowflake-2 {
    width: 15px;
    height: 15px;
    top: 20%;
    right: 20%;
}

.snowflake-3 {
    width: 25px;
    height: 25px;
    bottom: 30%;
    left: 30%;
}

.snowflake-4 {
    width: 18px;
    height: 18px;
    bottom: 15%;
    right: 15%;
}

.flower {
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23e083b8' d='M50 15c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10zm-25 25c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10zm50 0c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10zm-25 25c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10z'/%3E%3Ccircle fill='%23f8d7e9' cx='50' cy='50' r='10'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
    animation: rotate 25s linear infinite, float 20s ease-in-out infinite;
}

.flower-1 {
    top: 70%;
    left: 5%;
}

.flower-2 {
    top: 15%;
    right: 5%;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(30px) translateX(15px);
    }
    50% {
        transform: translateY(50px) translateX(-15px);
    }
    75% {
        transform: translateY(20px) translateX(25px);
    }
    100% {
        transform: translateY(0) translateX(0);
    }
}

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

/* 响应式调整 */
@media (max-width: 992px) {
    .import-container {
        padding: 20px 15px;
    }

    .fancy-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .card-body {
        padding: 20px 15px;
    }

    .import-instructions {
        padding: 15px;
    }

    .fancy-title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

/* 添加到book-import.css文件末尾 */

/* 导入消息样式 */
.import-message {
    margin-top: 15px;
}

.import-message .alert {
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: none;
}

.import-message .alert-success {
    background-color: #e6f7ee;
    color: #28a745;
}

.import-message .alert-warning {
    background-color: #fff8e6;
    color: #ffc107;
}

.import-message .alert-danger {
    background-color: #feecf0;
    color: #dc3545;
}

.import-message .alert-info {
    background-color: #e6f3f8;
    color: #17a2b8;
}

.import-message .alert i {
    margin-right: 8px;
}

/* 导入过程中的飘落元素 */
.falling-element {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.8;
}

.falling-flower {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23e083b8' d='M50 15c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10zm-25 25c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10zm50 0c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10zm-25 25c-5 0-10 5-10 10s5 10 10 10 10-5 10-10-5-10-10-10z'/%3E%3Ccircle fill='%23f8d7e9' cx='50' cy='50' r='10'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    animation: fallAndSpin 5s linear forwards;
}

.falling-snowflake {
    background: radial-gradient(circle at center, rgba(255,255,255,0.8) 0%, rgba(230,240,255,0.3) 70%, transparent 100%);
    border-radius: 50%;
    animation: fall 5s linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh - 100px)) rotate(359deg);
        opacity: 0;
    }
}

@keyframes fallAndSpin {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh - 100px)) rotate(720deg);
        opacity: 0;
    }
}

/* 导入过程中按钮样式 */
.import-btn:disabled {
    background: linear-gradient(45deg, #f089b7, #b989d9);
    opacity: 0.7;
    cursor: not-allowed;
}

.import-btn:disabled .fa-spinner {
    margin-right: 10px;
}

/* 文件上传成功状态样式 */
.has-file .custom-file-label {
    background-color: #e6f7ee;
    border-color: #28a745;
    color: #28a745;
}

/* 添加文件类型图标 */
.has-file .custom-file-label::before {
    content: "\f56f";  /* Excel文件图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
}
