/* 新的滑块样式 */
.range-inputs {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 20px 0;
}

.range-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.range-input-group label {
    font-size: 14px;
    color: #495057;
    margin-bottom: 5px;
    font-weight: 500;
}

.range-input-group input {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
    transition: all 0.3s;
}

.range-input-group input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* 滑块样式 */
.range-slider {
    margin: 40px 10px 30px 10px;
    height: 10px;
}

/* 确保nouislider样式正确加载 */
.noUi-target {
    background: #e0e8f0;
    border-radius: 5px;
    border: none !important;
    height: 6px !important;
    box-shadow: none !important;
}

.noUi-connect {
    background: #3B82F6;
    border-radius: 5px;
    height: 6px;
}

.noUi-horizontal {
    height: 6px !important;
}

.noUi-handle {
    width: 22px !important;
    height: 22px !important;
    right: -11px !important;
    top: -8px !important;
    border-radius: 50% !important;
    background: #3B82F6 !important;
    border: 3px solid white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    cursor: grab;
}

.noUi-handle:focus {
    outline: none;
}

.noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.noUi-handle:before, 
.noUi-handle:after {
    display: none !important;
}

/* 标签样式 */
.tags-filter {
    margin: 20px 0;
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.tag-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    text-align: center;
}

.tag-option:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,123,255,0.1);
}

.tag-option.selected {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #0056b3;
    box-shadow: 0 3px 8px rgba(0,123,255,0.3);
}

.tag-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-count {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.7;
}

/* 范围选择器样式 */
.range-selector {
    margin: 20px 0;
}

.range-type-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.range-type-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.range-type-btn.active {
    background: #007bff;
    color: white;
}

.range-content {
    display: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.range-content.active {
    display: block;
}

.range-display {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #3B82F6;
    margin-bottom: 20px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

/* 图书卡片样式 */
.book-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 20px;
}

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

.book-image-container {
    flex-shrink: 0;
    width: 160px;
}

.book-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.book-content {
    flex: 1;
    min-width: 0;
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.book-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.lang-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 2px;
    margin-left: 16px;
}

.lang-btn {
    padding: 4px 8px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.lang-btn.active {
    background: #007bff;
    color: white;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .page-title {
        font-size: 28px;
        margin: 20px 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .book-card {
        flex-direction: column;
        gap: 16px;
    }
    
    .range-inputs {
        flex-direction: column;
    }
}

.range-note {
    text-align: center;
    margin-top: 15px;
    color: #6c757d;
    font-size: 13px;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 标签数量限制提示样式 */
.tag-limit-message {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

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

.tag-limit-message.fade-out {
    animation: fadeOut 0.5s ease-out;
    opacity: 0;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 登录提示样式 */
.login-prompt {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 30px auto;
    max-width: 500px;
    overflow: hidden;
    padding: 30px;
    text-align: center;
}

.login-message {
    padding: 20px;
}

.login-message p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-30px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    padding: 15px 20px;
    background-color: #3B82F6;
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close-modal {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #f1f1f1;
}

.modal-body {
    padding: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-footer {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

/* 登录表单样式 */
.login-form {
    width: 100%;
}

.login-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.login-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.login-error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

/* 验证码相关样式 */
.captcha-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.captcha-image-container {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

#captchaImage {
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

#captchaInput {
    width: 120px;
    flex-shrink: 0;
}

#refreshCaptcha {
    background: none;
    border: none;
    color: #0056b3;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    margin-left: 5px;
    width: auto;
}

#refreshCaptcha:hover {
    color: #003d82;
}

.refresh-icon {
    font-style: normal;
    display: inline-block;
}

/* 加载指示器样式 */
.loading-indicator {
    text-align: center;
    padding: 10px 0;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 86, 179, 0.2);
    border-radius: 50%;
    border-top-color: #0056b3;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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