/* ============ 全局样式 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* ============ 顶部导航 ============ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-login {
    padding: 8px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s;
}

.btn-login:active {
    transform: scale(0.95);
}

/* ============ 首屏Hero ============ */
.hero {
    padding: 40px 20px 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.highlight {
    background: linear-gradient(90deg, #ffd89b 0%, #ff9a8b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
}

.hero-subtitle {
    font-size: 15px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.hero-subtitle strong {
    color: #ffd89b;
    font-size: 18px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.badge {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.btn-primary {
    padding: 14px 40px;
    background: linear-gradient(135deg, #ffd89b 0%, #ff9a8b 100%);
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(255, 154, 139, 0.4);
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.95);
}

.hero-tip {
    margin-top: 16px;
    font-size: 13px;
    opacity: 0.9;
}

.hero-tip strong {
    color: #ffd89b;
}

/* ============ 价格对比 ============ */
.price-compare {
    padding: 40px 20px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.section-desc {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.compare-card {
    position: relative;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f5 100%);
    border-radius: 12px;
    border: 1px solid #e8eaf6;
}

.model-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}

.price-row .label {
    color: #888;
}

.old-price {
    text-decoration: line-through;
    color: #999;
}

.highlight-row .label {
    color: #ff6b6b;
    font-weight: 600;
}

.new-price {
    color: #ff6b6b;
    font-weight: 700;
    font-size: 14px;
}

.save-tag {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ff9a8b 0%, #ff6b6b 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* ============ 对话区域 ============ */
.chat-section {
    padding: 40px 20px;
    background: #f5f7fa;
}

.chat-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.model-selector {
    display: flex;
    overflow-x: auto;
    padding: 12px;
    gap: 8px;
    background: #fafbfc;
    border-bottom: 1px solid #eee;
    -webkit-overflow-scrolling: touch;
}

.model-selector::-webkit-scrollbar {
    display: none;
}

.model-tab {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #e0e4ec;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.model-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.model-icon {
    font-size: 16px;
}

.quota-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(90deg, #fff5f5 0%, #fff9f0 100%);
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #ffe0e0;
}

.quota-bar strong {
    color: #ff6b6b;
}

.save-info strong {
    color: #ff9500;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: #fafbfc;
}

.message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-content {
    max-width: 75%;
}

.message-text {
    padding: 10px 14px;
    background: white;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 4px;
}

.user-message .message-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quick-questions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.quick-q {
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    text-align: left;
    transition: all 0.2s;
}

.quick-q:active {
    background: #f0f4ff;
    border-color: #667eea;
}

.message-cost {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

.message-cost .save {
    color: #ff9500;
    font-weight: 600;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-top: 1px solid #eee;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: #f5f7fa;
    border: 1px solid #e0e4ec;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.chat-input:focus {
    border-color: #667eea;
    background: white;
}

.btn-send {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ 优势展示 ============ */
.features {
    padding: 40px 20px;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.feature-card {
    padding: 20px 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f5 100%);
    border-radius: 12px;
    text-align: center;
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.feature-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ============ CTA 转化区 ============ */
.cta-section {
    padding: 50px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-desc {
    font-size: 15px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.cta-benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    margin: 0 auto 28px;
}

.cta-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    text-align: left;
}

.benefit-icon {
    font-size: 22px;
}

.benefit-text {
    font-size: 14px;
}

.benefit-text strong {
    color: #ffd89b;
    font-size: 16px;
}

.btn-cta {
    padding: 16px 50px;
    background: white;
    color: #667eea;
    font-size: 17px;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.btn-cta:active {
    transform: scale(0.95);
}

.cta-share {
    margin-top: 16px;
    font-size: 13px;
    opacity: 0.9;
}

.cta-share a {
    color: #ffd89b;
    text-decoration: underline;
    cursor: pointer;
}

/* ============ 底部 ============ */
.footer {
    padding: 24px 20px;
    background: #1a1a1a;
    color: #888;
    text-align: center;
    font-size: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
}

/* ============ 弹窗 ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

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

.modal {
    background: white;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.3s ease;
}

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

.modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

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

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-input {
    padding: 12px 16px;
    background: #f5f7fa;
    border: 1px solid #e0e4ec;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.modal-input:focus {
    border-color: #667eea;
    background: white;
}

.modal-btn {
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    transition: transform 0.2s;
}

.modal-btn:active {
    transform: scale(0.97);
}

.modal-close {
    margin-top: 12px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    background: none;
}

/* ============ Loading ============ */
.typing {
    display: inline-block;
}

.typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============ 响应式 ============ */
@media (min-width: 768px) {
    .hero-title { font-size: 40px; }
    .highlight { font-size: 48px; }
    .hero-subtitle { font-size: 18px; }
    .compare-grid { grid-template-columns: repeat(4, 1fr); }
    .features-grid { grid-template-columns: repeat(4, 1fr); }
    .chat-messages { height: 500px; }
}

/* 浮动分享按钮 */
.float-share {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff9a8b 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    cursor: pointer;
    z-index: 99;
    color: white;
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 兼容 share-fab 类名 */
.share-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff9a8b 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    cursor: pointer;
    z-index: 99;
    color: white;
    font-size: 24px;
    animation: pulse 2s infinite;
    border: none;
}

/* 海报样式 */
.poster-content {
    max-width: 360px;
}

.poster-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin: 16px 0;
    text-align: center;
}

.poster-logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.poster-tagline {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.poster-saved {
    background: rgba(255, 255, 255, 0.15);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.poster-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.poster-amount {
    font-size: 32px;
    font-weight: 800;
    color: #ffd89b;
}

.poster-features {
    text-align: left;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 2;
}

.poster-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #333;
    padding: 12px;
    border-radius: 8px;
}

.qr-placeholder.small {
    width: 64px;
    height: 64px;
    font-size: 11px;
}

.poster-cta {
    font-weight: 600;
    font-size: 14px;
    color: #667eea;
}

