/* MindGuard - 社交媒体心理预警系统样式 */

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4e8098;
    --warning-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.search-box {
    display: flex;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#uid-input {
    flex: 1;
    padding: 15px;
    border: none;
    font-size: 1rem;
    outline: none;
}

#analyze-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: var(--transition);
}

#analyze-btn:hover {
    background-color: var(--secondary-color);
}

.examples-container {
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.examples-container p {
    margin-bottom: 10px;
    color: var(--gray-color);
}

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.example-tag {
    padding: 8px 15px;
    background-color: var(--light-color);
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.example-tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.loading {
    display: none;
    text-align: center;
    margin: 30px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(74, 111, 165, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.result-container {
    display: none;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-top: 20px;
}

.result-container h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.user-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
}

.user-info .user-details h3 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.user-info .user-details p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.analysis-result {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.risk-level {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 10px;
}

.risk-level-0 {
    background-color: #28a745;
    color: white;
}

.risk-level-1 {
    background-color: #ffc107;
    color: #212529;
}

.risk-level-2 {
    background-color: #fd7e14;
    color: white;
}

.risk-level-3 {
    background-color: #dc3545;
    color: white;
}

.posts-container {
    margin-top: 20px;
}

.post {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-content {
    margin-bottom: 10px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.post-risk {
    font-weight: bold;
}

.post-risk.level-0 { color: #28a745; }
.post-risk.level-1 { color: #ffc107; }
.post-risk.level-2 { color: #fd7e14; }
.post-risk.level-3 { color: #dc3545; }

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        margin-bottom: 30px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    #uid-input {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    #analyze-btn {
        padding: 12px;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info img {
        margin-right: 0;
        margin-bottom: 15px;
    }
}