/* 面相分析 · AI智能相师 - 样式 */

:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --accent: #F59E0B;
    --bg: #0F0F1A;
    --bg-card: #1A1A2E;
    --bg-input: #16213E;
    --text: #E2E8F0;
    --text-secondary: #94A3B8;
    --border: #334155;
    --success: #10B981;
    --gradient: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
}

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

body {
    font-family: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
}

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

/* Header */
.header {
    text-align: center;
    padding: 40px 0 30px;
}

.header-small {
    padding: 20px 0;
}

.logo {
    font-size: 48px;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    font-size: 28px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Upload Area */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.upload-area.has-image {
    border-style: solid;
    border-color: var(--success);
}

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

.upload-placeholder p {
    color: var(--text-secondary);
    font-size: 14px;
}

.upload-hint {
    font-size: 12px !important;
    margin-top: 4px;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    object-fit: contain;
}

.hidden {
    display: none !important;
}

/* Upload Tips */
.upload-tips {
    margin: 16px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tip {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 10px;
    background: var(--bg-card);
    border-radius: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-hot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
}

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

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

/* Result Section */
.result-section {
    animation: fadeIn 0.5s ease;
}

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

.result-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.result-header h2 {
    font-size: 20px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-free {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.badge-full {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.result-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Pricing Section */
.pricing-section {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-section h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.pricing-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pricing-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, var(--bg-card) 100%);
}

.price-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.price-badge.hot {
    background: var(--gradient);
    color: white;
    border: none;
}

.price {
    font-size: 36px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 4px 0 16px;
}

.price-features {
    list-style: none;
    text-align: left;
    margin-bottom: 16px;
}

.price-features li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Pricing Inline (on report page) */
.pricing-inline {
    flex-direction: row;
    gap: 12px;
    margin-top: 20px;
}

.pricing-inline .pricing-card {
    flex: 1;
    padding: 16px;
}

.pricing-inline .price {
    font-size: 28px;
}

/* Report Page */
.report-full, .report-preview {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.report-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.report-date {
    color: var(--text-secondary);
    font-size: 13px;
}

.report-content {
    font-size: 15px;
    line-height: 1.9;
    white-space: pre-wrap;
}

.report-content h2,
.report-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

.preview-content {
    max-height: 300px;
    overflow: hidden;
    position: relative;
}

.report-blur-overlay {
    position: relative;
    margin-top: -80px;
    background: linear-gradient(transparent, var(--bg-card) 60%);
    padding: 60px 0 0;
    text-align: center;
}

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

.unlock-prompt h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.unlock-prompt p {
    color: var(--text-secondary);
    font-size: 14px;
}

.report-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 2;
}

/* Pay Buttons */
.pay-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-alipay {
    background: linear-gradient(135deg, #1677FF 0%, #0958d9 100%);
    color: white;
    font-weight: 600;
}

.btn-alipay:hover {
    background: linear-gradient(135deg, #0958d9 0%, #003eb3 100%);
    transform: translateY(-1px);
}

.btn-wechat {
    background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
    color: white;
    font-weight: 600;
}

.btn-wechat:hover {
    background: linear-gradient(135deg, #06AD56 0%, #059048 100%);
    transform: translateY(-1px);
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

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

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.qr-code {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.qr-tip {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.qr-amount {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.polling-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.polling-status.success {
    color: var(--success);
}

/* Desktop Responsive */
@media (min-width: 768px) {
    .container {
        max-width: 640px;
    }

    .pricing-cards {
        flex-direction: row;
    }

    .pricing-card {
        flex: 1;
    }
}
