/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

header p {
    color: #7f8c8d;
}

/* Upload area styles */
.upload-area {
    background-color: white;
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.upload-area.highlight {
    border-color: #2980b9;
    background-color: #f0f9ff;
}

.upload-icon {
    margin-bottom: 1rem;
    color: #3498db;
}

.upload-button {
    color: #3498db;
    cursor: pointer;
    font-weight: 600;
}

.upload-button:hover {
    text-decoration: underline;
}

#file-input {
    display: none;
}

.file-list {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.file-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 150px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.file-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-item .file-name {
    font-size: 0.8rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.file-item .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.primary-btn, .secondary-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: #3498db;
    color: white;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.primary-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.secondary-btn {
    background-color: #ecf0f1;
    color: #7f8c8d;
}

.secondary-btn:hover {
    background-color: #dfe6e9;
}

.secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading spinner */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results table */
.results {
    display: none;
    margin-top: 2rem;
}

.results h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background-color: #3498db;
    color: white;
    font-weight: 500;
}

td img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.confidence-cell {
    position: relative;
}

.confidence-bar {
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background-color: #3498db;
}

.classification {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-block;
}

.positive {
    background-color: #e6f7ff;
    color: #0066cc;
}

.negative {
    background-color: #f6e6e6;
    color: #cc0000;
}

/* Summary section */
.summary {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.summary h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.summary p {
    margin-bottom: 0.5rem;
}

.summary span {
    font-weight: 600;
}

#export-btn {
    margin-top: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .file-item {
        width: 120px;
    }
    
    .file-item img {
        height: 100px;
    }
    
    th, td {
        padding: 0.75rem;
    }
}