/* ========================================
   通用样式
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ========================================
   登录页面样式
   ======================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #667eea;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

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

/* ========================================
   导航栏样式
   ======================================== */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-content h1 {
    font-size: 24px;
    color: #667eea;
}

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

/* ========================================
   按钮样式
   ======================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
    padding: 12px;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #667eea;
    color: white;
}

.btn-secondary:hover {
    background: #5568d3;
}

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

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
    width: 100%;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-copy {
    background: #10b981;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-copy:hover {
    background: #059669;
}

/* ========================================
   容器样式
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ========================================
   上传区域样式
   ======================================== */
.upload-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.upload-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.upload-box {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-box:hover {
    background: #f8f9ff;
    border-color: #5568d3;
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.upload-prompt p {
    margin: 5px 0;
    color: #666;
}

.upload-hint {
    font-size: 14px;
    color: #999;
}

.upload-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

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

#progressText {
    text-align: center;
    margin-top: 10px;
    color: #667eea;
    font-weight: bold;
}

/* ========================================
   图片列表样式
   ======================================== */
.images-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #333;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.image-card {
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-info {
    padding: 15px;
}

.image-filename {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    word-break: break-all;
    font-size: 14px;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 12px;
    margin-bottom: 10px;
}

.image-url {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.image-url input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    background: white;
}

/* ========================================
   提示样式
   ======================================== */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    grid-column: 1 / -1;
}

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

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

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

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.log-content {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
    max-height: 400px;
    overflow-y: auto;
}

.log-content pre {
    margin: 0;
    white-space: pre-wrap;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }

    .images-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
