/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #f1f5f9;
    min-height: 100vh;
    padding-bottom: 40px;
}

/* 页面容器 */
.page-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

/* 玻璃卡片 */
.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 导航栏 */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 20px;
    font-size: 16px;
}
.nav-left, .nav-right {
    color: #94a3b8;
    cursor: pointer;
}
.nav-title {
    font-weight: 600;
    font-size: 18px;
}

/* 输入框 */
.input-main {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 16px;
    outline: none;
    margin-bottom: 16px;
}
.input-main:focus {
    border-color: #6366f1;
}

/* 按钮 */
.btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary:hover {
    opacity: 0.9;
}
.btn-large {
    margin-top: 10px;
    padding: 18px;
    font-size: 17px;
}

/* 文字样式 */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}
.logo-section h1 {
    font-size: 26px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    color: transparent;
}
.logo-section p {
    color: #94a3b8;
    font-size: 14px;
}

/* 积分 */
.points-text {
    font-size: 22px;
    font-weight: bold;
    color: #6366f1;
}
.info-group {
    margin: 20px 0;
}
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.info-item label {
    color: #94a3b8;
}

/* 分割线 */
.divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 24px 0;
}

/* 充值 */
.pay-section {
    text-align: center;
}
.pay-section h3 {
    margin-bottom: 10px;
}
.pay-section p {
    color: #cbd5e1;
    margin-bottom: 6px;
    font-size: 14px;
}
.qrcode {
    width: 160px;
    border-radius: 12px;
    margin-top: 12px;
}

/* 标签切换 */
.tab-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.tab-btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: #cbd5e1;
    font-size: 15px;
    cursor: pointer;
}
.tab-btn.active {
    background: #6366f1;
    color: white;
}

/* 上传 */
.upload-box p {
    margin-bottom: 12px;
    color: #cbd5e1;
}
#imageFile {
    color: #cbd5e1;
}

/* 提示词 */
.prompt-textarea {
    width: 100%;
    height: 140px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px;
    color: white;
    font-size: 15px;
    outline: none;
    resize: none;
    line-height: 1.6;
}

/* 区块标题 */
.section-title {
    font-size: 17px;
    font-weight: 600;
    margin: 26px 0 14px 4px;
    color: #e2e8f0;
}

/* 风格模板 */
.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.style-item {
    padding: 12px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 14px;
}
.style-item:hover {
    background: #6366f1;
    color: white;
}

/* 案例模板 */
.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.template-item {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
}
.template-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.template-item p {
    padding: 10px;
    font-size: 13px;
    text-align: center;
    color: #cbd5e1;
}

/* 提示 */
.tip-box {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 16px;
    line-height: 1.5;
}

/* 历史记录 */
.history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.history-item img {
    width: 100%;
    border-radius: 12px;
    height: 160px;
    object-fit: cover;
}
.history-status {
    font-size: 12px;
    color: #6366f1;
    margin: 6px 0;
}
.history-status.pending {
    color: #f59e0b;
}
.history-prompt {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.empty {
    text-align: center;
    color: #94a3b8;
    grid-column: 1/3;
    padding: 40px 0;
}

/* 用户信息卡片 */
.user-info-card {
    padding: 16px 24px;
}


/* 首页案例预览 */
.home-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 10px 0 20px;
}
.demo-item img {
    width: 100%;
    border-radius: 14px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* 联系微信区块 */
.contact-section {
    text-align: center;
    margin-bottom: 24px;
}
.contact-section h3 {
    margin-bottom: 10px;
    font-size: 16px;
}
.contact-section p {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 12px;
}

/* 悬浮套餐按钮 */
.float-package-btn {
    position: fixed;
    right: 20px;
    bottom: 30px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    padding: 12px 18px;
    border-radius: 50px;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    z-index: 999;
    cursor: pointer;
}

/* 套餐弹窗遮罩 */
.package-mask {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 套餐弹窗主体 */
.package-modal {
    width: 100%;
    max-width: 480px;
    background: #1e293b;
    border-radius: 20px;
    overflow: hidden;
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.modal-head h3 {
    font-size: 18px;
}
.close-btn {
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
}

/* 套餐列表 */
.package-list {
    padding: 20px;
}
.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.package-item:last-child {
    border-bottom: none;
}
.pkg-name {
    color: #e2e8f0;
}
.pkg-num {
    color: #6366f1;
    font-weight: 600;
}
.pkg-price {
    color: #f59e0b;
    font-weight: 600;
}

.modal-tip {
    padding: 20px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 尺寸选择 */
.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.size-item {
    padding: 12px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 14px;
}
.size-item.active {
    background: #6366f1;
    color: white;
}
.size-item:hover:not(.active) {
    background: rgba(99, 102, 241, 0.2);
}

/* 生成结果展示区 */
.result-section {
    margin: 24px 0;
}
.result-box {
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.result-box img {
    max-width: 100%;
    max-height: 320px;
    border-radius: 16px;
    display: none;
}
.result-box img[src] {
    display: block;
}
#resultTip {
    color: #94a3b8;
    font-size: 14px;
    margin-top: 10px;
}

 /*预览区*/
 .img-preview-mask {
     position: fixed;
     top: 0; left: 0; width: 100%; height: 100%;
     background: rgba(0,0,0,0.9);
     z-index: 9999;
     display: none;
     align-items: center;
     justify-content: center;
     padding: 20px;
 }
.img-preview-mask img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}


/*底部备案*/
.footer-wrap {
    width: 100%;
    padding: 30px 20px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 20px;
}
.footer-links {
    margin-bottom: 10px;
}
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    margin: 0 8px;
}
.footer-links a:hover {
    color: #6366f1;
}
.footer-beian {
    margin: 8px 0;
}
.footer-beian a {
    color: #94a3b8;
    text-decoration: none;
}
.footer-copy {
    color: #64748b;
    font-size: 12px;
}