/* 基础重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0a0a0f;
    --secondary-bg: #1a1a2e;
    --neon-blue: #00d4ff;
    --neon-purple: #b829ff;
    --neon-pink: #ff0080;
    --text-primary: #ffffff;
    --text-secondary: #b8c3d9;
    --text-accent: #7c8db5;
    --gradient-primary: linear-gradient(45deg, #b829ff, #00d4ff);
    --shadow-neon: 0 0 20px rgba(0, 212, 255, 0.3);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* 主容器 */
.main-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 视频背景 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5; /* 调高透明度让视频更明显 */
    filter: hue-rotate(200deg) saturate(1.5) brightness(0.8); /* 调整色调为蓝紫色并稍微降低亮度 */
    position: absolute;
    top: 0;
    left: 0;
    z-index: -3;
}

/* 如果视频加载失败，显示渐变背景 */
.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(184, 41, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
                linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    z-index: -4;
    display: none; /* 默认隐藏，只有在视频加载失败时才显示 */
}

/* 备用背景样式 */
.video-background.fallback-bg::after {
    display: block; /* 显示备用背景 */
    background: radial-gradient(circle at 30% 40%, rgba(184, 41, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
                linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    animation: backgroundFlow 20s ease-in-out infinite;
}

@keyframes backgroundFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 背景效果 */
.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(2px 2px at 20px 30px, var(--neon-blue), transparent),
                radial-gradient(2px 2px at 40px 70px, var(--neon-purple), transparent),
                radial-gradient(1px 1px at 90px 40px, var(--neon-pink), transparent);
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.glow-orb {
    position: absolute;
    top: 20%;
    right: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(184, 41, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 内容包装器 */
.content-wrapper {
    background: rgba(26, 26, 46, 0.8);
    padding: 60px 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-neon);
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 10; /* 确保内容显示在视频上方 */
}

.content-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

/* 标题区域 */
.title-section {
    margin-bottom: 40px;
}

.main-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8)); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* 服务介绍区域 */
.service-intro {
    margin-bottom: 40px;
}

.intro-content {
    text-align: center;
}

.intro-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-blue);
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.feature-grid {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.feature-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.feature-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.intro-description {
    font-size: 1rem;
    color: var(--text-accent);
    line-height: 1.6;
    opacity: 0.9;
}

/* 输入区域 */
.input-section {
    text-align: center;
}

.input-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.stock-input {
    flex: 1;
    padding: 20px 25px;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
}

.stock-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.stock-input::placeholder {
    color: var(--text-accent);
}

.analyze-btn {
    padding: 20px 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    white-space: nowrap;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.5s ease;
}

.analyze-btn:hover .btn-glow {
    left: 100%;
}

.input-help {
    color: var(--text-accent);
    font-size: 0.9rem;
}

/* 分析弹窗 */
.analysis-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;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--secondary-bg);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--neon-blue);
    box-shadow: var(--shadow-neon);
    text-align: center;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.2;
}

.modal-header {
    margin-bottom: 30px;
}

.modal-header h2 {
    color: var(--neon-blue);
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--neon-pink);
}

/* 分析过程 */
.analysis-progress {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.5s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.analysis-steps {
    text-align: left;
    margin: 20px 0;
}

.analysis-step {
    padding: 10px 0;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.analysis-step.active {
    color: var(--neon-blue);
}

.analysis-step.completed {
    color: var(--neon-purple);
}

/* 分析结果 */
.analysis-result {
    margin: 30px 0;
}

.result-header {
    margin-bottom: 20px;
}

.result-header h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.stock-code {
    color: var(--neon-purple);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    background: rgba(184, 41, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(184, 41, 255, 0.3);
}

.result-score {
    margin: 30px 0;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--neon-blue);
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.score-label {
    color: var(--text-accent);
    font-size: 1rem;
    margin-bottom: 10px;
}

/* LINE引导 */
.line-guide {
    background: rgba(0, 255, 136, 0.1);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    margin: 30px 0;
}

.line-guide h3 {
    color: #00ff88;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.line-guide p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.line-btn {
    background: linear-gradient(45deg, #00ff88, #00d4ff);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
}

.line-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .content-wrapper {
        padding: 40px 20px;
        margin: 20px;
    }
    
    .intro-title {
        font-size: 1.5rem;
    }
    
    .feature-grid {
        flex-direction: column;
        gap: 15px;
    }
    
    .feature-item {
        min-width: auto;
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .input-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .analyze-btn {
        width: 100%;
    }
    
    .glow-orb {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .content-wrapper {
        padding: 30px 15px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--neon-blue);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 