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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section {
    padding: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.section:last-child {
    border-bottom: none;
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
}

h3 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

input[type="checkbox"] {
    margin-right: 8px;
}

small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 14px;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.analysis-status {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.status-message {
    display: flex;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.results {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.result-section {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.verdict {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
    margin: 10px 0;
}

.verdict.strong { background: #d4edda; color: #155724; }
.verdict.moderate { background: #fff3cd; color: #856404; }
.verdict.weak { background: #f8d7da; color: #721c24; }
.verdict.no_evidence { background: #e0e0e0; color: #666; }
.verdict.inconclusive { background: #cce5ff; color: #004085; }

.confidence-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.history-list {
    margin-top: 20px;
}

.history-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.history-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.evidence-item {
    padding: 10px;
    background: white;
    border-radius: 5px;
    margin-bottom: 10px;
}

.evidence-item h4 {
    color: #667eea;
    margin-bottom: 8px;
}

.key-point {
    padding: 8px;
    background: #f0f4ff;
    border-left: 3px solid #667eea;
    margin: 8px 0;
}

.error-message {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    margin: 10px 0;
}

/* Literature Links (Simplified) */
.literature-links {
    margin-top: 10px;
}

.lit-link {
    margin-bottom: 8px;
    line-height: 1.5;
}

.lit-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.lit-link a:hover {
    text-decoration: underline;
    color: #5a67d8;
}

.pmid {
    color: #718096;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    background: #f7fafc;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 8px;
}