* {
    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;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 30px;
    max-width: 1000px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.upload-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px dashed #ddd;
    transition: all 0.3s ease;
}

.upload-section.dragover {
    border-color: #4CAF50;
    background: #e8f5e8;
}

.upload-area {
    text-align: center;
    padding: 40px;
}

.upload-icon {
    font-size: 4em;
    color: #666;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.multiple-files-info {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    display: none;
}

.progress-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-weight: 600;
}

.progress-stat {
    padding: 5px 10px;
    border-radius: 5px;
    background: white;
    border: 1px solid #ddd;
}

.progress-stat.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.progress-stat.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.progress-stat.processing {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.failed-images {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    display: none;
}

.failed-image-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

.failed-image-name {
    flex: 1;
    font-weight: 600;
    color: #721c24;
}

.failed-image-error {
    color: #721c24;
    font-size: 14px;
}

.batch-results {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    display: none;
}

.batch-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.summary-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.summary-label {
    color: #666;
    font-weight: 600;
}

.summary-card.success .summary-number {
    color: #4CAF50;
}

.summary-card.error .summary-number {
    color: #f44336;
}

.summary-card.total .summary-number {
    color: #2196F3;
}

.upload-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.image-preview {
    margin: 20px 0;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.face-detection-overlay {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.face-box {
    position: absolute;
    border: 3px solid #4CAF50;
    border-radius: 10px;
    background: rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #4CAF50;
    font-size: 14px;
    pointer-events: none;
    box-sizing: border-box;
}

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

.face-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.face-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 3px solid #4CAF50;
}

.face-info {
    flex: 1;
}

.face-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.face-confidence {
    color: #666;
    font-size: 14px;
}

.action-buttons {
    text-align: center;
    margin-top: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 10px;
}

.btn-primary {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-secondary {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: white;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.status-message {
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.navigation {
    text-align: center;
    margin-top: 30px;
}

.navigation a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #2196F3;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 5px;
}

.navigation a:hover {
    background: #2196F3;
    color: white;
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

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

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

