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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upload-btn {
    background-color: #3498db;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

#csvFile {
    display: none;
}

#fileName {
    color: #ecf0f1;
    font-size: 0.9rem;
}

.container {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
    height: calc(100vh - 120px);
}

/* Left Panel - Component Analysis */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.component-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.component-card h3 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.component-status {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
}

.component-status.yes {
    background-color: #d4edda;
    color: #155724;
}

.component-status.no {
    background-color: #f8d7da;
    color: #721c24;
}

.component-explanation {
    font-size: 0.9rem;
    color: #555;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    min-height: 60px;
}

/* Main Panel - Paper Details */
.main-panel {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.paper-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.paper-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.paper-meta {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.paper-content {
    flex: 1;
    overflow-y: auto;
}

.paper-section {
    margin-bottom: 1.5rem;
}

.paper-section h3 {
    color: #34495e;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

#paperTitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: #e8f4f8;
    color: #2980b9;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #d4e9f2;
}

#paperAbstract {
    text-align: justify;
    color: #444;
    line-height: 1.8;
}

.navigation {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #ecf0f1;
}

.nav-btn {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.nav-btn:hover:not(:disabled) {
    background-color: #2c3e50;
}

.nav-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.decision-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.decision-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.decision-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.decision-btn.selected {
    border: 3px solid #2c3e50;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    font-weight: 700;
}

.decision-btn.inactive {
    opacity: 0.4;
    filter: grayscale(50%);
}

.include-btn {
    background-color: #27ae60;
}

.include-btn:hover {
    background-color: #229954;
}

.include-btn.selected {
    background-color: #1e8449;
}

.unsure-btn {
    background-color: #f39c12;
}

.unsure-btn:hover {
    background-color: #d68910;
}

.unsure-btn.selected {
    background-color: #ca6f1e;
}

.exclude-btn {
    background-color: #c0392b;
}

.exclude-btn:hover {
    background-color: #a93226;
}

.exclude-btn.selected {
    background-color: #922b21;
}

/* Right Panel - Screening Results */
.right-panel {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.screening-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.info-section h4 {
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-section p {
    color: #555;
    font-size: 0.95rem;
}

#modelName {
    background-color: #e8f4f8;
    padding: 0.6rem;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    font-weight: 600;
}

.decision-badge {
    display: inline-block;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

.decision-badge.include {
    background-color: #d4edda;
    color: #155724;
}

.decision-badge.exclude {
    background-color: #f8d7da;
    color: #721c24;
}

.decision-badge.uncertain {
    background-color: #fff3cd;
    color: #856404;
}

.confidence-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.confidence-meter {
    flex: 1;
    height: 24px;
    background-color: #ecf0f1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.confidence-bar {
    height: 100%;
    transition: width 0.5s ease, background-color 0.5s ease;
    border-radius: 12px;
}

.confidence-bar.high {
    background-color: #27ae60;
}

.confidence-bar.medium-high {
    background-color: #f1c40f;
}

.confidence-bar.medium {
    background-color: #e67e22;
}

.confidence-bar.low {
    background-color: #c0392b;
}

.confidence-value {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 40px;
    text-align: right;
}

.reasoning-text {
    background-color: #f8f9fa;
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.6;
    border-left: 3px solid #3498db;
}

.reviewer-opinion {
    padding: 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

.reviewer-opinion.agree {
    background-color: #d4edda;
    color: #155724;
}

.reviewer-opinion.disagree {
    background-color: #f8d7da;
    color: #721c24;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #7f8c8d;
    padding: 3rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .container {
        grid-template-columns: 280px 1fr 320px;
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .left-panel, .right-panel {
        max-height: none;
    }
}
