/* AI图片生成系统 - 样式文件 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: #333;
}

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

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

.navbar h1 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

#userInfo {
    font-weight: bold;
    color: #666;
}

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

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

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

.card-header h2 {
    margin: 0;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
}

/* 按钮 */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

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

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 任务列表 */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-item {
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.task-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

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

.task-header h3 {
    color: #333;
    font-size: 1.2em;
    margin: 0;
}

.status-pending {
    color: var(--warning-color);
    font-weight: bold;
    padding: 5px 15px;
    background: #fff3e0;
    border-radius: 20px;
    font-size: 0.9em;
}

.status-done {
    color: var(--success-color);
    font-weight: bold;
    padding: 5px 15px;
    background: #e8f5e9;
    border-radius: 20px;
    font-size: 0.9em;
}

.task-info p {
    margin: 8px 0;
    color: #666;
    line-height: 1.6;
}

.task-result {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.result-image {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.processing-tip {
    color: var(--warning-color);
    font-style: italic;
    margin-top: 10px;
}

.loading,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1.1em;
}

/* 认证页面 */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-card h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2em;
}

.auth-card h2 {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.3em;
    font-weight: 500;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar h1 {
        font-size: 1.2em;
    }
    
    .nav-right {
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px 30px;
    }
    
    .card {
        padding: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}
