/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 紫色渐变主题 */
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --accent: #3b82f6;
    
    /* 背景色 */
    --bg-main: #fafafa;
    --bg-surface: #ffffff;
    --bg-soft: #f5f3ff;
    --bg-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    
    /* 文字色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* 边框和阴影 */
    --border: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(139, 92, 246, 0.08);
    --shadow-md: 0 4px 16px rgba(139, 92, 246, 0.12);
    --shadow-lg: 0 8px 32px rgba(139, 92, 246, 0.16);
    --shadow-xl: 0 16px 48px rgba(139, 92, 246, 0.2);
    
    /* 圆角 */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes checkmark-circle {
    0% {
        stroke-dashoffset: 166;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmark-check {
    0% {
        stroke-dashoffset: 48;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes pulseDot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ===== HEADER ===== */
.header {
    padding: 1.5rem 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.6s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-soft);
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== MAIN ===== */
.main {
    padding: 3rem 0;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulseDot 2s ease infinite;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== INPUT SECTION ===== */
.input-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.input-box {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stock-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    background: var(--bg-soft);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.stock-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.stock-input::placeholder {
    color: var(--text-muted);
}

.btn-analyze {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--bg-gradient);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md), 0 0 20px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(139, 92, 246, 0.4);
}

.btn-analyze:active {
    transform: translateY(0);
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.input-hint svg {
    flex-shrink: 0;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.stat-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-icon.pink {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-icon svg {
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== FEATURES ===== */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.feature-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== WHATSAPP CTA ===== */
.whatsapp-cta {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(37, 211, 102, 0.2);
    animation: fadeInUp 0.8s ease 0.5s both;
}

.whatsapp-cta:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(37, 211, 102, 0.3);
}

.whatsapp-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.whatsapp-icon-large {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.whatsapp-text {
    flex: 1;
}

.whatsapp-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.whatsapp-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.whatsapp-arrow {
    color: white;
    transition: transform 0.3s ease;
}

.whatsapp-cta:hover .whatsapp-arrow {
    transform: translateX(8px);
}

/* ===== FOOTER ===== */
.footer {
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    max-width: 520px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

/* Progress Modal */
.progress-modal {
    padding: 2.5rem;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border: 4px solid var(--bg-soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: var(--bg-soft);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--bg-gradient);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-percent {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 48px;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.step-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid var(--primary-light);
}

.step-item.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 1px solid #10b981;
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-item.active .step-icon {
    background: var(--bg-gradient);
    color: white;
    border-color: var(--primary);
    animation: pulse 2s ease infinite;
}

.step-item.completed .step-icon {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.step-item.completed .step-icon::before {
    content: '✓';
}

.step-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step-item.active .step-text {
    color: var(--text-primary);
    font-weight: 600;
}

.step-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}

.step-item.active .step-status {
    background: var(--primary);
    animation: pulseDot 2s ease infinite;
}

.step-item.completed .step-status {
    background: #10b981;
}

/* Complete Modal */
.complete-modal {
    padding: 3rem 2.5rem;
    text-align: center;
    overflow: hidden;
}

.success-animation {
    margin: 0 auto 1.5rem;
    width: 100px;
    height: 100px;
    opacity: 0;
    animation: scaleIn 0.5s ease 0.2s forwards;
}

.checkmark {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: #10b981;
    fill: rgba(16, 185, 129, 0.1);
    animation: checkmark-circle 0.6s ease 0.4s forwards;
}

.checkmark-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #10b981;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: checkmark-check 0.4s ease 0.8s forwards;
}

.complete-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.6s forwards;
}

.complete-message {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.8s forwards;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    opacity: 0;
    animation: fadeInUp 0.5s ease 1s forwards;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .header-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .header-badge svg {
        width: 12px;
        height: 12px;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .hero {
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .input-section {
        margin-bottom: 2rem;
    }
    
    .input-box {
        padding: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn-analyze {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .whatsapp-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .whatsapp-arrow {
        display: none;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 1rem;
    }
    
    .progress-modal {
        padding: 2rem 1.5rem;
    }
    
    .complete-modal {
        padding: 2.5rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .complete-title {
        font-size: 1.5rem;
    }
    
    .complete-message {
        font-size: 0.875rem;
    }
    
    .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }
    
    .footer {
        margin-top: 3rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .whatsapp-icon-large {
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-icon-large svg {
        width: 40px;
        height: 40px;
    }
    
    .whatsapp-title {
        font-size: 1.25rem;
    }
    
    .whatsapp-desc {
        font-size: 0.875rem;
    }
}
