/**
 * 自动发货系统样式表
 */

/* 基础样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* 布局 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

/* 头部 */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 客服提醒警示 */
.service-alert {
    background-color: var(--danger-color);
    color: white;
    padding: 0.7rem 0;
    margin-top: 0.5rem;
    text-align: center;
    font-weight: bold;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.5);
    position: relative;
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.service-alert .container {
    display: flex;
    justify-content: center;
}

.alert-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-content i {
    font-size: 1.3rem;
    margin-right: 0.8rem;
    animation: shake 1.5s ease-in-out infinite;
    color: #ffcc00;
}

.alert-content span {
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.alert-content strong {
    margin-right: 0.3rem;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-3px);
    }
    40%, 80% {
        transform: translateX(3px);
    }
}

/* 页脚 */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* 表单 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* 按钮 */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.btn:focus, .btn:hover {
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #1a252f;
    border-color: #1a252f;
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-block {
    display: block;
    width: 100%;
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* 卡片 */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* 提示框 */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 表格 */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
    background-color: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* 安装页面样式 */
.install-page {
    background-color: #f8f9fa;
    padding: 2rem 0;
}

.install-box {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.install-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.requirements {
    margin-bottom: 2rem;
}

.requirements h3 {
    margin-bottom: 1rem;
}

.requirements ul {
    list-style: none;
}

.requirements li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.requirements .ok {
    color: var(--success-color);
}

.requirements .error {
    color: var(--danger-color);
}

.install-actions {
    text-align: center;
    margin-top: 2rem;
}

/* 验证页面样式 */
.verify-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-top: 3rem;
}

.verify-box h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.key-input {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
}

/* 搜索页面 */
.search-box {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-result {
    margin-top: 20px;
}

.file-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .file-item {
        flex-direction: row;
        justify-content: space-between;
    }
}

.file-info {
    display: flex;
    flex: 1;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .file-info {
        margin-bottom: 0;
    }
}

.file-cover {
    flex: 0 0 120px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

.file-cover img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.file-cover img:hover {
    transform: scale(1.05);
}

.file-cover-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.file-cover-default i {
    font-size: 2.5rem;
    color: #aaa;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.file-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.file-meta span {
    margin-right: 15px;
}

.file-notes {
    font-size: 0.85rem;
    color: #777;
    margin-top: 5px;
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* 封面图预览模态框 */
.cover-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.cover-preview-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 2px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.cover-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* 自适应图片 */
.img-thumbnail {
    max-width: 100%;
    height: auto;
}

/* 响应式 */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
    
    .col {
        flex: none;
        width: 100%;
    }
    
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-block-sm {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .service-alert {
        padding: 0.7rem 0;
    }
    
    .alert-content i {
        font-size: 1rem;
    }
    
    .alert-content span {
        font-size: 0.9rem;
    }
} 