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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    font-size: 28px;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.navbar-menu {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #1890ff;
}

.hero-section {
    background: #eff1f2;
    padding: 40px 24px 48px;
    text-align: center;
}

.hero-title {
    font-size: 40px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 16px;
    line-height: 1.4;
}

.gradient-text {
    background: linear-gradient(90deg, #ff6b35, #ff4d94, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(0, 0, 0, 0.85);
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.8;
}

.hero-subtitle:nth-child(2) {
    margin-top: 12px;
    font-size: 22px;
    color: #1890ff;
    font-weight: 500;
    line-height: 1.8;
}

.hero-subtitle:nth-child(2) strong {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #ff6b35, #ff4d94);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-wrapper {
    flex: 1;
    padding: 32px 24px;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    min-height: calc(100vh - 64px - 80px);
}

.left-panel,
.right-panel {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 24px;
}

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

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.panel-desc {
    font-size: 13px;
    color: #999;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

textarea::placeholder {
    color: #bfbfbf;
}

input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

input[type="text"]::placeholder {
    color: #bfbfbf;
}

.form-tip {
    font-size: 14px;
    color: #999;
    margin-top: 6px;
}

.form-tip a {
    color: #1890ff;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px dashed transparent;
}

.form-tip a:hover {
    color: #096dd9;
    border-bottom-color: #1890ff;
}

.quality-options {
    display: flex;
    gap: 8px;
}

.quality-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quality-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.quality-btn.active {
    border-color: #1890ff;
    background: #1890ff;
    color: #fff;
}

.aspect-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aspect-category {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-label {
    font-size: 12px;
    color: #999;
    width: 48px;
    flex-shrink: 0;
}

.aspect-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.aspect-btn {
    padding: 6px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    background: #fafafa;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.aspect-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.aspect-btn.active {
    border-color: #1890ff;
    background: #e6f7ff;
    color: #1890ff;
}

.generate-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #999;
    text-align: center;
    padding: 40px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.result-placeholder p {
    font-size: 16px;
    margin-bottom: 8px;
    color: #666;
}

.result-placeholder span {
    font-size: 13px;
    color: #999;
}

.result-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.image-container {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    border: 1px solid #e8e8e8;
}

.image-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.image-info {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #1890ff;
    border-radius: 6px;
    background: #fff;
    color: #1890ff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #1890ff;
    color: #fff;
}

.error-section {
    margin-top: 20px;
    padding: 20px;
    background: #fff2f0;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ffccc7;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.error-section h3 {
    font-size: 15px;
    margin-bottom: 4px;
    color: #ff4d4f;
}

.error-section p {
    color: #666;
    font-size: 13px;
}

.footer {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 20px 24px;
    text-align: center;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer p {
    color: #999;
    font-size: 13px;
}

@media (max-width: 900px) {
    .content-container {
        grid-template-columns: 1fr;
    }
    
    .left-panel {
        order: 1;
    }
    
    .right-panel {
        order: 2;
    }
    
    .result-placeholder {
        min-height: 250px;
    }
}

@media (max-width: 600px) {
    .navbar-container {
        padding: 0 16px;
    }
    
    .brand-name {
        font-size: 16px;
    }
    
    .main-wrapper {
        padding: 16px;
    }
    
    .left-panel,
    .right-panel {
        padding: 16px;
    }
    
    .aspect-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .category-label {
        width: auto;
    }
    
    .hero-section {
        padding: 32px 16px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
}

.donate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.donate-modal.show {
    display: flex;
}

.donate-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.donate-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.donate-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    text-align: center;
}

.donate-modal-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.donate-modal-body {
    display: flex;
    gap: 24px;
    padding: 24px;
}

.donate-qrcode {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e8e8e8;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.donate-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.donate-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e6f7ff;
    color: #1890ff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
    width: fit-content;
}

.donate-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.donate-cost {
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cost-label {
    font-size: 12px;
    color: #999;
}

.cost-value {
    font-size: 20px;
    font-weight: 700;
    color: #fa8c16;
}

.donate-appeal {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.donate-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
}

.donate-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

@media (max-width: 600px) {
    .donate-modal-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .donate-qrcode {
        width: 160px;
        height: 160px;
    }
    
    .donate-info {
        align-items: center;
    }
    
    .donate-cost {
        align-items: center;
    }
    
    .donate-modal-footer {
        justify-content: center;
    }
}
