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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    position: relative;
    padding-bottom: 60px; /* Added space for footer links */
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.upload-area {
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: #667eea;
}

.upload-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #666;
    font-size: 0.9em;
}

#file-input {
    display: none;
}

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

.control-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    cursor: pointer;
}

.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

.btn:hover:before {
    left: 100%;
}

.preview-area {
    margin-top: 30px;
}

.image-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.image-wrapper {
    text-align: center;
}

.image-wrapper h3 {
    margin-bottom: 10px;
    color: #333;
}

.preview-image {
    max-width: 350px;
    max-height: 350px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.05);
}

.processing {
    text-align: center;
    padding: 20px;
    color: #667eea;
}

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

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

.face-count {
    background: rgba(102, 126, 234, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.queue-status {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #333;
}

.queue-status.processing {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
}

.queue-status.completed {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
}

.queue-status.failed {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: #f44336;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.download-btn {
    background: linear-gradient(45deg, #4caf50, #45a049);
    margin-left: 10px;
}

.download-btn:hover {
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.queue-stats {
    background: rgba(102, 126, 234, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

/* Footer links styling */
.footer-links {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}