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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.upload-section {
    background: #f8f9fa;
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s;
}

.upload-section:hover {
    background: #e9ecef;
    border-color: #764ba2;
}

input[type="file"] {
    display: none;
}

.file-label {
    background: #667eea;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    font-size: 1.1em;
    transition: all 0.3s;
}

.file-label:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.file-info {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

label {
    font-weight: 600;
    color: #333;
}

input[type="number"] {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 80px;
    font-size: 1em;
}

button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
}

button:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

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

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

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

.results {
    display: none;
}

.topic-cluster {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.topic-cluster h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.paper-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.paper-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(5px);
}

.paper-title {
    color: #333;
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.paper-summary {
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
}

.stats {
    background: #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.stats span {
    display: inline-block;
    margin: 0 15px;
    font-weight: 600;
    color: #667eea;
}