
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;800;900&family=Exo+2:wght@400;600;700;800&display=swap');

body {
    font-family: 'Exo 2', 'Orbitron', monospace;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1d3a 50%, #2d1b69 100%);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 增强背景动态效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(100, 255, 218, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(63, 81, 181, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(233, 30, 99, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
    z-index: -2;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 动态背景粒子效果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(100, 255, 218, 0.6);
    border-radius: 50%;
    animation: float 6s infinite linear;
}

/* 几何动态背景 */
.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.geo-shape {
    position: absolute;
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 50%;
}

.geo-shape:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation: rotate 20s linear infinite, pulse 4s ease-in-out infinite;
}

.geo-shape:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    border-radius: 0;
    animation: rotate -15s linear infinite, pulse 3s ease-in-out infinite;
}

.geo-shape:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 20%;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border: none;
    background: linear-gradient(45deg, rgba(100, 255, 218, 0.1), rgba(63, 81, 181, 0.1));
    animation: float2 12s ease-in-out infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        border-color: rgba(100, 255, 218, 0.2);
        transform: scale(1);
    }
    50% { 
        border-color: rgba(100, 255, 218, 0.6);
        transform: scale(1.1);
    }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-15px); }
    75% { transform: translateY(-30px) translateX(5px); }
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10px) rotate(360deg);
        opacity: 0;
    }
}

/* 渐变边框动画 */
@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(100, 255, 218, 0.6);
    }
}

/* 头部导航 */
.header {
    padding: 20px 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #64ffda, #00bcd4, #3f51b5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(100, 255, 218, 0.5);
    animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.2);
    }
}

/* 主要内容区域 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

.hero-section {
    text-align: center;
    margin-bottom: 60px;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffffff, #64ffda);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titlePulse 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.hero-subtitle {
    font-size: 1.4rem;
    color: #b0bec5;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 分析卡片 */
.analysis-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    margin: 40px auto;
    max-width: 600px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    animation: borderGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.analysis-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #64ffda, #3f51b5, #e91e63, #ff9800);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    animation: gradientRotate 4s linear infinite;
}

@keyframes gradientRotate {
    0% {
        opacity: 0;
        transform: rotate(0deg);
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: rotate(360deg);
    }
}

.input-section {
    margin-bottom: 30px;
}

.input-label {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #64ffda;
    font-weight: 700;
    letter-spacing: 1px;
}

.stock-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

.stock-input:focus {
    border-color: #64ffda;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
    transform: translateY(-2px);
}

.stock-input::placeholder {
    color: #90a4ae;
}

.analyze-btn {
    width: 100%;
    padding: 18px;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, #64ffda, #00bcd4);
    color: #1a1d3a;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.4);
}

.analyze-btn:active {
    transform: translateY(-1px);
}

.analyze-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;
}

.analyze-btn:hover::before {
    left: 100%;
}

/* 特性展示 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: rgba(100, 255, 218, 0.5);
    background: rgba(100, 255, 218, 0.08);
    box-shadow: 0 25px 50px rgba(100, 255, 218, 0.2);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(10deg);
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: scale(1.2) translateY(0); }
    40% { transform: scale(1.2) translateY(-10px); }
    60% { transform: scale(1.2) translateY(-5px); }
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    transition: all 0.3s ease;
}

.feature-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #64ffda;
}

.feature-desc {
    color: #b0bec5;
    line-height: 1.5;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1d3a 0%, #2d1b69 100%);
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    border: 2px solid rgba(100, 255, 218, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #64ffda;
}

.modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #64ffda;
    text-align: center;
}

/* 诊断过程弹窗 */
.diagnosis-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.diagnosis-content {
    background: linear-gradient(135deg, #1a1d3a 0%, #2d1b69 100%);
    margin: 2% auto;
    padding: 20px;
    border-radius: 20px;
    width: 95%;
    max-width: 480px;
    max-height: 90vh;
    border: 2px solid rgba(100, 255, 218, 0.3);
    animation: modalSlideIn 0.5s ease-out;
    position: relative;
    text-align: center;
    overflow-y: auto;
}

.diagnosis-steps {
    margin: 15px 0;
}

.step-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 12px 0;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid transparent;
    transition: all 0.5s ease;
    opacity: 0.3;
}

.step-item.active {
    opacity: 1;
    border-left-color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(100, 255, 218, 0.2);
}

.step-item.completed {
    opacity: 1;
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.step-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 255, 218, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.step-item.active .step-icon {
    background: #64ffda;
    color: #1a1d3a;
    animation: pulse-icon 2s ease-in-out infinite;
}

.step-item.completed .step-icon {
    background: #4caf50;
    color: white;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.step-text {
    flex: 1;
    text-align: left;
}

.step-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: #64ffda;
    margin-bottom: 3px;
}

.step-desc {
    color: #b0bec5;
    font-size: 0.8rem;
    line-height: 1.3;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64ffda, #00bcd4);
    border-radius: 3px;
    width: 0%;
    transition: width 0.8s ease;
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(100, 255, 218, 0.5); }
    50% { box-shadow: 0 0 20px rgba(100, 255, 218, 0.8); }
}

.diagnosis-status {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #64ffda;
    margin: 15px 0;
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.6; }
}

.analysis-result {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #64ffda;
}

.kakao-download {
    background: linear-gradient(45deg, #fee500, #ffcd00);
    color: #3c1e1e;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.kakao-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 229, 0, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .analysis-card {
        padding: 25px;
        margin: 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    /* 移动设备弹窗优化 */
    .diagnosis-content {
        margin: 10vh auto;
        padding: 15px;
        width: 98%;
        max-width: 350px;
        max-height: 80vh;
        border-radius: 15px;
    }
    
    .modal-content {
        margin: 10vh auto;
        padding: 20px;
        width: 95%;
        max-width: 380px;
        max-height: 75vh;
        border-radius: 15px;
    }
    
    .modal-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
        letter-spacing: 1px;
    }
    
    .diagnosis-status {
        font-size: 0.9rem;
        margin: 10px 0;
    }
    
    .step-item {
        margin: 8px 0;
        padding: 10px 12px;
    }
    
    .step-icon {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
        margin-right: 10px;
    }
    
    .step-title {
        font-size: 0.85rem;
    }
    
    .step-desc {
        font-size: 0.75rem;
    }
    
    .progress-bar {
        height: 4px;
        margin: 12px 0;
    }
    
    /* 结果弹窗移动端优化 */
    .analysis-result {
        padding: 15px;
    }
    
    .analysis-result h3 {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }
    
    .analysis-result h4 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    .analysis-result p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    .analysis-result div[style*="font-size: 4rem"] {
        font-size: 3rem !important;
        margin-bottom: 15px !important;
    }
    
    .analysis-result div[style*="padding: 20px"] {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .analysis-result div[style*="padding: 30px 20px"] {
        padding: 20px 15px !important;
    }
    
    .kakao-download {
        font-size: 0.95rem;
        padding: 12px 20px;
    }
}

/* 小屏幕设备进一步优化 */
@media (max-width: 480px) {
    .diagnosis-content {
        margin: 8vh auto;
        padding: 12px;
        width: 99%;
        max-width: 320px;
        max-height: 75vh;
    }
    
    .modal-content {
        margin: 8vh auto;
        padding: 15px;
        width: 98%;
        max-width: 340px;
        max-height: 70vh;
    }
    
    .modal-title {
        font-size: 1rem;
        margin-bottom: 8px;
        letter-spacing: 1px;
    }
    
    .diagnosis-status {
        font-size: 0.8rem;
        margin: 8px 0;
    }
    
    .step-item {
        margin: 6px 0;
        padding: 8px 10px;
    }
    
    .step-icon {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
        margin-right: 8px;
    }
    
    .step-title {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    
    .step-desc {
        font-size: 0.7rem;
    }
    
    /* 小屏幕结果弹窗优化 */
    .analysis-result {
        padding: 10px;
    }
    
    .analysis-result h3 {
        font-size: 0.95rem !important;
        margin-bottom: 12px !important;
    }
    
    .analysis-result h4 {
        font-size: 0.9rem !important;
        margin-bottom: 6px !important;
    }
    
    .analysis-result p {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }
    
    .analysis-result div[style*="font-size: 4rem"] {
        font-size: 2.5rem !important;
        margin-bottom: 12px !important;
    }
    
    .analysis-result div[style*="padding: 20px"] {
        padding: 10px !important;
        margin: 10px 0 !important;
    }
    
    .analysis-result div[style*="padding: 30px 20px"] {
        padding: 15px 10px !important;
    }
    
    .kakao-download {
        font-size: 0.85rem;
        padding: 10px 15px;
    }
    
    /* 进一步优化提示文字 */
    .modal-content p[style*="color: #64ffda"] {
        font-size: 0.9rem !important;
        margin: 15px 0 !important;
    }
    
    /* 额外确保文字换行正常 */
    .analysis-result * {
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* 加载动画 */
.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 3px solid rgba(100, 255, 218, 0.3);
    border-radius: 50%;
    border-top: 3px solid #64ffda;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
