* {
    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;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

.left-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 40px;
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.description {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.form-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.photo-section {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-section.dragover {
    border-color: #667eea;
    background-color: #f0f4ff;
    transform: scale(1.02);
}

.drag-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 10px;
    font-style: italic;
}

.photo-preview {
    max-width: 150px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
    border: 2px solid #667eea;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.photo-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin: 5px;
    transition: background 0.3s;
    font-size: 14px;
}

.photo-button:hover {
    background: #5a6fd8;
}

.photo-button.secondary {
    background: #6b7280;
}

.photo-button.secondary:hover {
    background: #4b5563;
}

.submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.3s;
}

.submit-button:hover {
    transform: translateY(-2px);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.webcam-container {
    display: none;
    text-align: center;
    margin-top: 15px;
}

.webcam-video {
    width: 240px;
    height: 300px;
    border-radius: 8px;
    border: 2px solid #667eea;
    transform: scaleX(-1);
    object-fit: cover;
}

.webcam-controls {
    margin-top: 10px;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message, .error-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.photo-captured {
    background: #f0fdf4;
    border-color: #22c55e;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .left-panel {
        padding: 30px;
    }
    
    .form-panel {
        padding: 30px;
    }
}