* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1rem;
    opacity: 0.8;
}

.nav-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* 表单操作区域样式 */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.form-actions-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-actions-right {
    display: flex;
    align-items: center;
}

.form-actions .btn-link {
    font-size: 0.9rem;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.form-actions .btn-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 忘记密码确认邮箱样式 */
.email-confirmation {
    color: #666;
    font-size: 0.9rem;
}

.email-display {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-display i {
    color: #667eea;
    font-size: 1.1rem;
}

.email-display span {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

/* 功能选择区域样式 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.feature-card {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.form-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 信息卡片样式 */
.info-card {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    border: 2px solid #e9ecef;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.info-item p {
    color: #666;
    line-height: 1.5;
}

/* 错误消息样式 */
.error-message {
    background: #fff5f5;
    border: 2px solid #fed7d7;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
}

.error-content i {
    font-size: 3rem;
    color: #e53e3e;
    margin-bottom: 20px;
}

.error-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #e53e3e;
}

.error-content p {
    color: #666;
    margin-bottom: 25px;
}

/* 上传区域样式 */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #764ba2;
    background-color: #f0f2ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 1.2rem;
    color: #667eea;
    margin-right: 5px;
}

.upload-content h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 12px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* 进度条样式 */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    color: #666;
}
.card_wrapper{
    text-align: center;
    margin-left: -10px;
}

/* 杂志区域样式 */
.magazine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.magazine-controls {
    display: flex;
    gap: 10px;
}

.flipbook-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    min-height: 750px;
    padding: 20px;
}

.flipbook {
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: hidden;
}

.flipbook .page {
    background-color: white;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flipbook .page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.magazine-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-info {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.navigation-controls {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 加载覆盖层 */
.loading-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;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .section {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .magazine-header {
        flex-direction: column;
        text-align: center;
    }

    .magazine-footer {
        flex-direction: column;
        text-align: center;
    }

    .flipbook-container {
        min-height: 400px;
        padding: 10px;
    }

    .flipbook {
        max-width: 95vw !important;
        max-height: 70vh !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .flipbook-container {
        min-height: 300px;
        padding: 5px;
    }

    .flipbook {
        max-width: 98vw !important;
        max-height: 60vh !important;
    }

    .magazine-controls {
        flex-direction: column;
        gap: 5px;
    }

    .navigation-controls {
        flex-direction: column;
        gap: 5px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 20px;
    }

    .input-group {
        flex-direction: column;
    }

    .info-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* 全屏模式 */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen .flipbook {
    max-width: 90vw;
    max-height: 90vh;
}

 /* 文件列表样式 */
.file-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s;
    position: relative;
}
.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}
.file-card .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0;
    border: none;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    display: none;
    opacity: 0;
}
.file-card:hover .remove-btn{
    display: block;
    opacity: 1;
}
.file-card-header{
    display: flex;
    margin-bottom: 10px;
}
.file-selector {
    display: inline-block;
    position: relative;
    margin-right: 5px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: #fff;
}

.file-selector:hover {
    border-color: #007bff;
}

.file-selector.selected {
    background-color: #007bff;
    border-color: #007bff;
}

.selector-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-selector.selected .selector-dot {
    opacity: 1;
}

.file-card h2 {
    font-size: 16px;
    margin: 0 0 10px 0;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%; 
    max-width: 90%; 
}
.file-card p.text-muted {
    font-size: 12px;
    color: #c1c1c1!important;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.qr-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.code_wrapper{
    padding-top: 20px;
    cursor: pointer;
}
.qrCodeContainer{
    position: relative;
    margin-bottom: 0;
}
.qrCodeContainer span.down_code_btn{
    position: absolute;
    bottom: 15px;
    left: 16px;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    width: calc(100% - 30px);
    font-size: 12px;
} 
.qrCodeContainer:hover span.down_code_btn {
    opacity: 1;
    display: block;
}  

.qr-code-wrap {
    flex: 0 0 120px;
    margin-right: 1.5rem;
}

.qr-meta {
    flex: 1;
}

.qr-filename {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.qr-filepath {
    font-size: 0.9rem;
    color: #7f8c8d;
    word-break: break-all;
}
.img-wrapper{
    position: relative;
}
.img-wrapper .copy_link_btn{
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 5px 0;
    display: inline-block;
    background: rgb(102 126 234 / 67%);
    border-radius: 0;
}   

/* 加载动画 */
#loadingModal .modal-dialog {
    max-width: 200px;
}
#qrCodeContainer {
    min-height: 180px;
    position: relative;
}

#qrCodeContainer div canvas {
    margin-right: 1rem;
}

/* 加载提示样式 */
.loading-text {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.2rem;
}

/* 错误状态提示 */
.error {
    color: #dc3545;
    padding: 1rem;
    border: 1px dashed #dc3545;
}

/* 空状态提示 */
.no-data {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 1.1rem;
}

/* 强制显示二维码画布 */
canvas {
    display: block !important;
}

.drag-drop-area {
    border: 2px dashed #6c757d;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border-radius: 12px;
}
.drag-drop-area.dragover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}
.firstImg{
    padding-left: 30px;
}
.firstImg .img-wrapper{
    height: 180px;
}
.firstImg .img-wrapper img{
    height: 167px;
    display: block;
    object-fit: contain;
}
.firstImg .btn-wrapper a{
    margin: 0 5px;
}
.container_login{
    max-width: 800px;
}
.form-group{
    display: flex;
    align-items: center;
    padding: 15px 0;
}
.form-group label{
    width: 120px;
    text-align: right;
    padding-right: 10px;
}
.go_register{
    font-size: 14px;
    text-decoration: underline;
    color: #667eea;
}
.form-actions{
    margin-top: 20px;   
}
.upload_area{
    position: relative;
}
.upload_area .user-info{
    position: absolute;
    top: -60px;
    right: 0;
    height: 50px;
    color: #fff;
}
.btn-link{
    margin-left:10px
}
.loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.pdf-list {
    margin-top: 20px;
}

.pdf-list h3 {
    margin-bottom: 10px;
}

.pdf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.pdf-item .pdf-name {
    flex-grow: 1;
    font-size: 16px;
    color: #333;
}

.pdf-item .pdf-download-btn {
    background-color: #705dbd;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.pdf-item .pdf-download-btn:hover {
    background-color: #8164f3;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.pagination button {
    border: none;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    background-color: #f9f9f9;
    color: #000;
    border: 1px solid #705dbd;
    padding: 8px 16px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .active {
    background-color: #705dbd;
    border: 1px solid #705dbd;
    color: white;
    cursor: default;
}
#pageInfo{
    line-height: 42px;
    color: #f5f5f5;
    padding: 0 10px;
}

.search-container {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}
#clearSearch {
    color: #333;
    background: #f0f0f0;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 20px;
    cursor: pointer;
    text-align: center;
    position: absolute; 
    right: 8px; 
    top: 50%; 
    transform: translateY(-50%); 
    cursor: pointer; 
    color: #999; 
    font-size: 16px;
}
#clearSearch:hover {
    color: #fff;
    background: #a2a2a2;
}

#searchInput{
    padding: 8px 35px 8px 12px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    width: 100%;
}

#searchInput:focus {
    border-color: #007bff;
    outline: none;
}
.search_btn{
    padding: 8px 16px; 
    background: #667eea; 
    color: white; 
    border: none; 
    border-radius: 5px; 
    cursor: pointer;
}