/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header Styles */
.header {
    text-align: center;
    padding: 2rem 0;
    color: white;
}

.header-content h1.logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-content .tagline {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main Content */
.main {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

/* Input Section */
.input-section {
    padding: 3rem 2rem;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-container h2 {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #2d3748;
}

.form-description {
    text-align: center;
    color: #718096;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.name-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.submit-btn, .paid-btn {
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.paid-btn {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #2d3748;
    border: 2px solid #f6d365;
}

.paid-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(253, 160, 133, 0.4);
    background: linear-gradient(135deg, #fda085 0%, #f6d365 100%);
}

.payment-notice {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    line-height: 1.6;
}

.alipay-icon {
    color: #1677ff;
}

.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;
    margin-left: 10px;
}

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

/* Results Section */
.results-section {
    padding: 3rem 2rem;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-container h2 {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #2d3748;
}

.results-description {
    text-align: center;
    color: #718096;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.name-card {
    background: #f7fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.name-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.name-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.name-card .meaning {
    color: #4a5568;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.name-card .wuxing {
    color: #667eea;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Upgrade Section */
.upgrade-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.upgrade-card h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.upgrade-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.features-list {
    list-style: none;
    text-align: left;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.features-list li {
    padding: 0.5rem 0;
    font-size: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffd700;
}

.upgrade-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Payment Section */
.payment-section {
    padding: 3rem 2rem;
}

.payment-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.payment-container h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

.payment-description {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.payment-info {
    background: #f7fafc;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.order-info {
    margin-bottom: 2rem;
}

.order-info p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.qr-code-container {
    margin-bottom: 2rem;
}

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

.qr-tip {
    margin-top: 1rem;
    color: #718096;
    font-size: 0.9rem;
}

.payment-status {
    margin-bottom: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.back-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #cbd5e0;
}

/* Report Section */
.report-section {
    padding: 3rem 2rem;
}

.report-container {
    max-width: 900px;
    margin: 0 auto;
}

.report-container h2 {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: #2d3748;
}

.report-content {
    background: #f7fafc;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.report-content h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.report-content h3 {
    color: #4a5568;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
}

.report-content p {
    margin-bottom: 1rem;
    color: #4a5568;
}

.report-content ol,
.report-content ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.report-content li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.report-content strong {
    color: #2d3748;
    font-weight: 600;
}

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

.report-actions button {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.report-actions .new-name-btn {
    background: #e2e8f0;
    color: #4a5568;
}

.report-actions .new-name-btn:hover {
    background: #cbd5e0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    opacity: 0.8;
}

.footer-content p {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2d3748;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

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

.toast.success {
    background: #38a169;
}

.toast.error {
    background: #e53e3e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content h1.logo {
        font-size: 2.5rem;
    }
    
    .form-container h2,
    .results-container h2,
    .payment-container h2,
    .report-container h2 {
        font-size: 2rem;
    }
    
    .input-section,
    .results-section,
    .payment-section,
    .report-section {
        padding: 2rem 1rem;
    }
    
    .names-grid {
        grid-template-columns: 1fr;
    }
    
    .report-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* Usage Limit Notice */
.usage-limit-notice {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.usage-limit-notice h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.usage-limit-notice p {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.usage-limit-notice span {
    font-weight: 600;
    color: #2d3748;
}

/* Disabled Button Styles */
.upgrade-btn:disabled {
    background: #cbd5e0;
    color: #a0aec0;
    cursor: not-allowed;
    opacity: 0.6;
}

.upgrade-btn:disabled:hover {
    background: #cbd5e0;
    transform: none;
}

/* Back to Home Section */
.back-to-home-section {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem 0;
}

.back-to-home-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-home-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.back-to-home-btn span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
