/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ff88;
    --secondary-color: #00d4ff;
    --danger-color: #ff3366;
    --warning-color: #ffaa00;
    --bg-dark: #0a0e1a;
    --bg-card: #131824;
    --bg-elevated: #1a1f2e;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --border-color: #2a3142;
    --glow-primary: rgba(0, 255, 136, 0.3);
    --glow-secondary: rgba(0, 212, 255, 0.3);
}

body {
    font-family: 'Roboto Mono', monospace;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==================== 背景动画 ==================== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

#particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* ==================== 主容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* ==================== 头部 ==================== */
.header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
    filter: blur(60px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.logo-section i {
    font-size: 60px;
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--glow-primary);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px var(--glow-primary);
    letter-spacing: 4px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.status-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.status-dot {
    color: var(--primary-color);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ==================== 卡片样式 ==================== */
.analyst-card,
.upload-section,
.results-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.analyst-card:hover,
.upload-section:hover,
.results-section:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 32px var(--glow-primary);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.card-header i {
    font-size: 24px;
    color: var(--primary-color);
}

.card-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.timestamp {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Roboto Mono', monospace;
}

/* ==================== 分析师档案 ==================== */
.analyst-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.analyst-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.analyst-avatar i {
    font-size: 60px;
    color: var(--primary-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.avatar-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: rotate 3s linear infinite;
}

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

.analyst-details h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.expertise {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.expertise-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.expertise-item i {
    font-size: 24px;
    color: var(--secondary-color);
    margin-top: 5px;
}

.expertise-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 5px;
}

.expertise-item p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

/* ==================== 上传区域 ==================== */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-elevated);
    margin-bottom: 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.05);
}

.upload-area.drag-over {
    border-color: var(--secondary-color);
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.02);
}

.upload-placeholder i {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.6;
}

.upload-text {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-secondary);
}

.image-preview {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.image-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.4);
}

.remove-btn:hover {
    background: #ff0044;
    transform: scale(1.1);
}

.analyze-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 6px 24px var(--glow-primary);
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--glow-primary);
}

.analyze-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.analyze-btn i {
    font-size: 20px;
}

/* ==================== 加载动画 ==================== */
.loading-container {
    padding: 60px 40px;
}

.loading-animation {
    max-width: 600px;
    margin: 0 auto;
}

.scanner-line {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin-bottom: 30px;
    animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
    0%, 100% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); }
}

.loading-text {
    text-align: center;
    margin-bottom: 30px;
}

.loading-title {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.loading-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px var(--glow-primary);
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==================== 分析结果 ==================== */
.analysis-content {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-section {
    margin-bottom: 40px;
    padding: 25px;
    background: var(--bg-elevated);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.result-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-section h3 i {
    font-size: 22px;
}

.result-item {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.result-item h4 {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.result-item p, .result-item ul {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.result-item ul {
    list-style: none;
    padding-left: 0;
}

.result-item li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item li:last-child {
    border-bottom: none;
}

.risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 10px;
}

.risk-low { background: rgba(0, 255, 136, 0.2); color: var(--primary-color); }
.risk-medium { background: rgba(255, 170, 0, 0.2); color: var(--warning-color); }
.risk-high { background: rgba(255, 51, 102, 0.2); color: var(--danger-color); }
.risk-critical { background: var(--danger-color); color: white; }

.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.score-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.score-value {
    font-size: 48px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.score-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== Footer ==================== */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.footer p {
    margin: 8px 0;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }
    
    .analyst-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .expertise-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .score-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 20px;
        min-height: 200px;
    }
}
