/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

main {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.validation-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.validation-info h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.validation-info ul {
    margin-left: 20px;
}

.validation-info li {
    margin-bottom: 5px;
}
/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background-color: #3498db;
    color: white;
}

/* Upload Section */
.upload-section {
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Info Section */
.info-section {
    margin-top: 40px;
}

.info-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.info-section h3 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
    color: #2c3e50;
}

.info-section ol {
    margin-left: 20px;
}

.info-section li {
    margin-bottom: 10px;
}

/* Status Section */
.status-section {
    max-width: 800px;
    margin: 0 auto;
}

.file-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.file-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.status-container {
    margin-bottom: 30px;
}

.status-message {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.status-message .error {
    color: #e74c3c;
}

.status-message .success {
    color: #27ae60;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-weight: 600;
}

.status-details {
    text-align: center;
    margin-bottom: 20px;
}

.status-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Result Section */
.result-section {
    max-width: 1000px;
    margin: 0 auto;
}

.summary {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.plagiarism-score {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.score-value {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
}

.stats {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-label {
    display: block;
    margin-bottom: 5px;
    color: #7f8c8d;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.sources-section {
    margin-bottom: 40px;
}

.sources-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.source-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.source-header h4 {
    font-size: 1.1rem;
    color: #2c3e50;
}

.source-percent {
    font-weight: bold;
    color: #e74c3c;
}

.source-url a {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
}

.source-url a:hover {
    text-decoration: underline;
}

.text-section {
    margin-bottom: 40px;
}

.text-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.text-analysis {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.text-normal {
    color: #333;
}

.text-plagiarized {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.text-plagiarized:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Error and success styles in status page */
.status-message .error {
    color: #e74c3c;
    font-weight: bold;
}

.status-message .success {
    color: #27ae60;
    font-weight: bold;
}
/* Responsive Styles */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .summary {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .status-actions, .result-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}