/* ===================================
   AI电商图生成平台 - 全局样式
   =================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: #333;
    background: #f5f7fa;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #6366f1;
}

.nav a {
    margin-left: 24px;
    color: #555;
    transition: color 0.3s;
}

.nav a:hover {
    color: #6366f1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

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

.btn-outline:hover {
    background: #6366f1;
    color: #fff;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 100px 20px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-outline {
    border-color: #fff;
    color: #fff;
}

.hero .btn-outline:hover {
    background: #fff;
    color: #6366f1;
}

/* Features */
.features {
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 48px;
    color: #333;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s;
}

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

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
}

.feature-card p {
    color: #666;
    font-size: 14px;
}

/* Community Preview */
.community-preview {
    padding: 60px 20px;
    background: #fff;
}

.view-all {
    float: right;
    color: #6366f1;
    font-size: 14px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    clear: both;
}

.post-card {
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
}

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

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

.post-info {
    padding: 16px;
}

.post-info h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.post-info h4 a:hover {
    color: #6366f1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
}

.post-meta .author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}

.cta h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.cta p {
    margin-bottom: 24px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #1f2937;
    color: #ccc;
    padding: 48px 20px 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: #6366f1;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #374151;
}

/* Forms */
.form-container {
    max-width: 480px;
    margin: 60px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    text-align: center;
    margin-top: 24px;
}

.form-actions .btn {
    width: 100%;
}

.form-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

.form-link a {
    color: #6366f1;
}

/* Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Member Area */
.member-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}

.member-sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 24px 0;
}

.member-sidebar a {
    display: block;
    padding: 12px 24px;
    color: #555;
    transition: all 0.3s;
}

.member-sidebar a:hover,
.member-sidebar a.active {
    background: #f3f4f6;
    color: #6366f1;
    border-right: 3px solid #6366f1;
}

.member-content {
    flex: 1;
    padding: 32px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #6366f1;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 24px;
}

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

.card-header h3 {
    font-size: 18px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

table th {
    background: #f9fafb;
    font-weight: 600;
    color: #555;
}

table tr:hover {
    background: #f9fafb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: #ede9fe;
    color: #5b21b6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
}

.pagination a:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

.pagination .current {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #6366f1;
    background: #f9fafb;
}

.upload-area .upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Sign-in Button */
.signin-btn {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    width: 100%;
    transition: transform 0.3s;
}

.signin-btn:hover {
    transform: scale(1.02);
}

.signin-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .member-layout {
        flex-direction: column;
    }
    
    .member-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .member-sidebar a {
        display: inline-block;
        padding: 10px 16px;
        border-right: none;
        border-bottom: 3px solid transparent;
    }
    
    .member-sidebar a.active {
        border-bottom: 3px solid #6366f1;
    }
}
