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

html, body {
    min-height: 100vh;
    background-color: #F9F7F2;
    font-family: 'Noto Serif SC', 'Noto Sans SC', 'Microsoft YaHei', serif;
    line-height: 1.6;
    color: #2C3E50;
}

main {
    position: relative;
    z-index: 10;
}

/* Background layers */
#ink-bg {
    pointer-events: none;
    filter: grayscale(0.8) contrast(1.1);
}


/* Reusable elements */
.glass-card {
    background: rgba(253, 249, 240, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(198, 163, 85, 0.35);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}

.nav-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(210, 195, 170, 0.6);
    font-weight: 600;
    color: #2C3E50;
    min-width: 140px;
}

.section-tag {
    color: #8E2826;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 1.15rem;
    background: rgba(255,255,255,0.7);
    padding: 0.35rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.05);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1F2A37;
    margin-top: 1.5rem;
    font-family: 'Noto Serif SC', serif;
}

.section-desc {
    margin-top: 1rem;
    color: #4B5563;
    font-size: 1rem;
}

.value-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 40px rgba(0,0,0,0.12);
}

.value-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1F2A37;
}

.value-card p {
    color: #4B5563;
    font-size: 0.95rem;
    line-height: 1.8;
}

.value-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.badge-gray {
    background: #E5E7EB;
    color: #4B5563;
}

.badge-red {
    background: #FDF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.badge-red-light {
    background: #FEE2E2;
    color: #8E2826;
}

.free-card {
    background: rgba(255,255,255,0.9);
    border-radius: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 2rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 20px 30px rgba(0,0,0,0.08);
}

.premium-card {
    position: relative;
    border: 2px solid #8E2826;
    overflow: hidden;
}

.insight-card {
    background: #FDFBF7;
    border-radius: 0.75rem;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 1rem;
}

.meter {
    height: 0.8rem;
    border-radius: 999px;
    background: rgba(156, 163, 175, 0.3);
}

.pricing-card {
    background: #fff;
    color: #1F2937;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.15);
}

.pricing-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    color: #374151;
}

.pricing-item::before {
    content: '✔';
    color: #059669;
}

.cta-btn {
    width: 100%;
    background: #8E2826;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 0.85rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 15px 30px rgba(142, 40, 38, 0.35);
}

.cta-btn:hover {
    background: #721D1C;
    transform: translateY(-2px);
}

/* Form + interaction styles */
.name-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #4B5563;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.9);
    transition: all 0.2s ease;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8E2826;
    box-shadow: 0 0 0 3px rgba(142, 40, 38, 0.15);
    background: #fff;
}

.gender-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.gender-option div {
    border-radius: 0.9rem;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 0.9rem;
    text-align: center;
    font-weight: 600;
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gender-option input:checked + div {
    border-color: #8E2826;
    color: #8E2826;
    background: rgba(142, 40, 38, 0.08);
    box-shadow: 0 0 0 2px rgba(142, 40, 38, 0.2);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
}

.submit-btn,
.paid-btn {
    border: none;
    padding: 1.1rem;
    border-radius: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn {
    background: linear-gradient(135deg, #8E2826 0%, #A8322E 50%, #C45552 100%);
    color: white;
    box-shadow: 
        0 4px 14px rgba(142, 40, 38, 0.25),
        0 2px 4px rgba(142, 40, 38, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(142, 40, 38, 0.35),
        0 3px 6px rgba(142, 40, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #721D1C 0%, #8E2826 50%, #A8322E 100%);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(142, 40, 38, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.paid-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 251, 247, 0.95) 100%);
    border: 1.5px solid rgba(142, 40, 38, 0.25);
    color: #8E2826;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 
        0 2px 8px rgba(142, 40, 38, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.paid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(142, 40, 38, 0.1), transparent);
}

.paid-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(253, 249, 240, 0.98) 100%);
    border-color: rgba(142, 40, 38, 0.4);
    box-shadow: 
        0 4px 12px rgba(142, 40, 38, 0.12),
        0 2px 4px rgba(142, 40, 38, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.paid-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 4px rgba(142, 40, 38, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.paid-btn-minimal {
    border: none;
    padding: 1.1rem;
    border-radius: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #C9A961 0%, #B8860B 50%, #9D7A3F 100%);
    color: white;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 
        0 4px 14px rgba(184, 134, 11, 0.25),
        0 2px 4px rgba(184, 134, 11, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.paid-btn-minimal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s;
}

.paid-btn-minimal:hover::before {
    left: 100%;
}

.paid-btn-minimal:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(184, 134, 11, 0.35),
        0 3px 6px rgba(184, 134, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, #B8860B 0%, #9D7A3F 50%, #8B6914 100%);
}

.paid-btn-minimal:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(184, 134, 11, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.2rem;
}

.submit-btn:disabled,
.paid-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.payment-notice {
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.5;
}

/* More Requirements Section */
.more-requirements-section {
    margin-top: 2rem;
}

.requirement-tag {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 1.5px solid rgba(142, 40, 38, 0.15);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-size: 0.9rem;
    color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.requirement-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(142, 40, 38, 0.3);
    box-shadow: 0 4px 12px rgba(142, 40, 38, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(253, 249, 240, 0.95) 100%);
}

.requirement-tag:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.requirement-tag .tag-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.requirement-tag .tag-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.alipay-icon {
    color: #0EA5E9;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Interactive sections */
.interactive-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 7rem 1.5rem 5rem;
}

.interactive-card {
    background: rgba(255,255,255,0.92);
    border-radius: 1.25rem;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.interactive-card h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1F2A37;
}

.results-description {
    text-align: center;
    color: #4B5563;
    margin-bottom: 2rem;
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.name-card {
    background: #FDFBF7;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}

.name-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1F2A37;
}

.name-card .meaning {
    margin-top: 0.5rem;
    color: #4B5563;
}

.name-card .wuxing,
.name-card .refs {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #6B7280;
}

.upgrade-section {
    background: linear-gradient(135deg, rgba(142,40,38,0.95), rgba(198,163,85,0.9));
    border-radius: 1.25rem;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.upgrade-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.upgrade-card p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
}

.features-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.features-list li {
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.price {
    font-size: 2.4rem;
    font-weight: 700;
    color: #FFE194;
    margin: 1rem 0;
}

.upgrade-btn {
    background: white;
    color: #8E2826;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
}

.usage-limit-notice {
    background: rgba(255,255,255,0.9);
    border-radius: 1rem;
    padding: 1.5rem;
    color: #1F2A37;
    border: 1px solid rgba(255,255,255,0.5);
}

.usage-limit-notice h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.usage-limit-notice p {
    color: #4B5563;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.back-to-home-section {
    text-align: center;
    margin-top: 2rem;
}

.back-to-home-btn {
    border: 1px solid #8E2826;
    color: #8E2826;
    background: transparent;
    padding: 0.9rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-to-home-btn:hover {
    background: #8E2826;
    color: white;
}

.payment-info,
.report-content {
    background: #FDFBF7;
    border-radius: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.qr-code-container #qrCode {
    display: inline-block;
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.back-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}

.report-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.report-actions button {
    border: none;
    border-radius: 0.85rem;
    padding: 0.85rem 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.download-btn,
.email-btn {
    background: #8E2826;
    color: white;
}

.new-name-btn {
    background: rgba(0,0,0,0.05);
    color: #374151;
}

.report-actions button:hover {
    transform: translateY(-2px);
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #2C3E50;
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success { background: #059669; }
.toast.error { background: #DC2626; }

/* Floating Action Buttons */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 33.33%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    animation: fadeInRight 0.6s ease-out;
}

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

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    min-width: 140px;
    max-width: 180px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8E2826, #C45552);
    color: white;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(142, 40, 38, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    gap: 10px;
}

.floating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.floating-btn:hover::before {
    left: 100%;
}

.floating-btn:hover {
    transform: translateX(-6px);
    box-shadow: 0 12px 30px rgba(142, 40, 38, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.floating-btn:active {
    transform: translateX(-3px);
}

.floating-btn-icon {
    font-size: 20px;
    z-index: 1;
    position: relative;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
}

.floating-btn:hover .floating-btn-icon {
    transform: scale(1.15);
}

.floating-btn-text {
    display: block;
    font-size: 14px;
    font-weight: 600;
    z-index: 1;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
    word-wrap: break-word;
    white-space: normal;
}

.floating-btn-2025 {
    background: linear-gradient(135deg, #8E2826 0%, #C45552 100%);
    animation-delay: 0.1s;
}

.floating-btn-2025:hover {
    background: linear-gradient(135deg, #721D1C 0%, #B84442 100%);
}

.floating-btn-recent {
    background: linear-gradient(135deg, #C6A355 0%, #D4B876 100%);
    box-shadow: 0 8px 20px rgba(198, 163, 85, 0.4);
    animation-delay: 0.2s;
}

.floating-btn-recent:hover {
    background: linear-gradient(135deg, #B8943F 0%, #C9A865 100%);
    box-shadow: 0 12px 30px rgba(198, 163, 85, 0.5);
}

.floating-btn-research {
    background: linear-gradient(135deg, #6B7280 0%, #9CA3AF 100%);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
    animation-delay: 0.3s;
}

.floating-btn-research:hover {
    background: linear-gradient(135deg, #4B5563 0%, #6B7280 100%);
    box-shadow: 0 12px 30px rgba(107, 114, 128, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    #ink-bg { opacity: 0.3; }
    .interactive-card { padding: 1.75rem; }
    .upgrade-section { grid-template-columns: 1fr; }
    .report-actions { flex-direction: column; }
    .toast {
        right: 12px;
        left: 12px;
    }
    
    .floating-buttons {
        right: 10px;
        bottom: 33.33%;
        gap: 10px;
    }
    
    .floating-btn {
        min-width: 120px;
        max-width: 150px;
        padding: 10px 12px;
    }
    
    .floating-btn-icon {
        font-size: 18px;
    }
    
    .floating-btn-text {
        font-size: 12px;
    }
    
    .more-requirements-section {
        padding: 1.25rem !important;
    }
    
    .requirement-tag {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
    
    .requirement-tag .tag-icon {
        font-size: 1.1rem;
    }
    
    /* Adjust position for very small screens */
    @media (max-height: 600px) {
        .floating-buttons {
            bottom: 25%;
        }
    }
}
