/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066ff;
    --secondary-color: #00ccff;
    --accent-color: #ff6b35;
    --bg-dark: #0a0a0a;
    --bg-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    --text-primary: #ffffff;
    --text-secondary: #b8c6db;
    --text-muted: #718096;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 8px 32px rgba(0, 102, 255, 0.3);
    --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

/* Particles Background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 80%; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { top: 40%; left: 80%; animation-delay: 2s; }
.particle:nth-child(4) { top: 60%; left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { top: 10%; left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { top: 90%; left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { top: 30%; left: 30%; animation-delay: 6s; }
.particle:nth-child(8) { top: 70%; left: 90%; animation-delay: 7s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.6; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

/* Container */
.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 2rem 0;
    text-align: center;
}

.logo-container {
    animation: slideInDown 1s ease-out;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.logo i {
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-section {
    max-width: 800px;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.title-line {
    display: block;
    opacity: 0;
    animation: slideInRight 1s ease-out forwards;
}

.title-line:nth-child(1) { animation-delay: 0.5s; }
.title-line:nth-child(2) { animation-delay: 0.8s; }

.highlight {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s both;
}

/* Input Section */
.input-section {
    margin-bottom: 3rem;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

#stockCode {
    width: 100%;
    padding: 1.5rem 1rem 1rem;
    background: var(--glass-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#stockCode:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    background: rgba(255, 255, 255, 0.08);
}

#stockCode::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

#stockCode:focus + .input-line {
    width: 100%;
}

.analyze-btn {
    position: relative;
    padding: 1.2rem 3rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-glow);
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.4);
}

.analyze-btn:active {
    transform: translateY(0);
}

.btn-effect {
    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;
}

.analyze-btn:hover .btn-effect {
    left: 100%;
}

.analyze-btn i {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Features */
.features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s both;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.feature-item:hover {
    color: var(--secondary-color);
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-dark);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.5s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Analysis Modal */
.analysis-modal {
    padding: 3rem;
}

.analysis-header h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.progress-indicator {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.2);
}

.step.completed {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.05);
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.step.active .step-icon,
.step.completed .step-icon {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step.completed .step-icon {
    border-color: #00ff88;
    color: #00ff88;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.step-status {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.step.completed .loading-spinner {
    display: none;
}

.step.completed .step-status::after {
    content: '✓';
    color: #00ff88;
    font-size: 1.2rem;
    font-weight: bold;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Modal */
.results-modal {
    padding: 0;
    max-width: 700px;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.results-content {
    padding: 2rem;
}

.stock-info {
    margin-bottom: 2rem;
    text-align: center;
}

.stock-code-display {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 1.1rem;
}

.stock-code-display .label {
    color: var(--text-secondary);
}

.stock-code-display .value {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.3rem;
}

.analysis-preview {
    margin-bottom: 3rem;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-header i {
    color: var(--primary-color);
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.analysis-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.analysis-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.item-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.item-text {
    flex: 1;
}

.item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.item-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cta-section {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.lock-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.cta-content h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.line-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 2.5rem;
    background: linear-gradient(45deg, #00C300, #00B300);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 195, 0, 0.3);
}

.line-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 195, 0, 0.4);
}

.line-btn i {
    font-size: 1.3rem;
}

.benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.benefit i {
    color: #00ff88;
    font-size: 0.8rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Video background optimization for mobile */
    .video-background video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .video-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .features {
        gap: 2rem;
    }
    
    .feature-item {
        gap: 0.5rem;
    }
    
    .feature-item i {
        font-size: 1.5rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
    
    .input-container {
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .analyze-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .line-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* 优化手机端弹窗 */
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
        width: calc(100vw - 1rem);
        max-width: none;
    }
    
    .analysis-modal {
        padding: 1.5rem 1rem;
    }
    
    .analysis-header h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .results-modal {
        padding: 0;
    }
    
    .modal-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .results-content {
        padding: 1rem;
    }
    
    .stock-code-display {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .stock-code-display .value {
        font-size: 1.2rem;
    }
    
    /* 简化手机端的分析步骤 */
    .step {
        gap: 0.8rem;
        padding: 0.8rem;
        flex-direction: row;
        align-items: center;
    }
    
    .step-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .step-content {
        flex: 1;
        min-width: 0;
    }
    
    .step-title {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .step-description {
        font-size: 0.85rem;
        display: none; /* 隐藏描述文字减少拥挤 */
    }
    
    .step-status {
        width: 25px;
        height: 25px;
        flex-shrink: 0;
    }
    
    .loading-spinner {
        width: 16px;
        height: 16px;
    }
    
    /* 优化CTA区域 */
    .cta-section {
        padding: 1.5rem 1rem;
        margin: 1rem 0 0 0;
    }
    
    .lock-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .cta-content h4 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .cta-content p {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }
    
    .benefits {
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
    }
    
    .benefit {
        font-size: 0.8rem;
    }
    
    .benefit i {
        font-size: 0.7rem;
    }
    
    /* 手机端简化分析预览 */
    .preview-content.mobile-simple .analysis-item {
        padding: 1rem 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .preview-content.mobile-simple .item-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .preview-content.mobile-simple .item-title {
        font-size: 0.95rem;
        margin-bottom: 0.1rem;
    }
    
    .preview-content.mobile-simple .item-value {
        font-size: 0.85rem;
    }
    
    .preview-header {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .preview-header i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .features {
        flex-direction: row;
        gap: 1.5rem;
    }
}
