* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.main-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.8em;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

/* Camera Section */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#cameraFeed {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.capture-guide {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* Camera Controls */
.camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.camera-info {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.camera-info p {
    margin: 5px 0;
    color: #666;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #e53e3e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.4);
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #dd6b20;
    transform: translateY(-2px);
}

.btn-info {
    background: #4299e1;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #3182ce;
    transform: translateY(-2px);
}

.btn-submit {
    background: #48bb78;
    color: white;
    padding: 15px 40px;
    font-size: 1.1em;
    width: 100%;
}

.btn-submit:hover:not(:disabled) {
    background: #38a169;
    transform: translateY(-2px);
}

/* Gallery */
.gallery-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    min-height: 100px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay span {
    color: white;
    font-weight: bold;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 30px;
}

/* Checklist */
.checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    background: white;
    border-radius: 5px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.checklist-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.checklist-item input {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checklist-item input:checked ~ span {
    color: #667eea;
    font-weight: 600;
}

.checklist-item span {
    flex: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

#previewImage {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-success {
    text-align: center;
}

.modal-success h3 {
    color: #48bb78;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.modal-success p {
    margin-bottom: 20px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .main-content {
        padding: 15px;
    }

    section {
        padding: 15px;
    }

    .camera-controls {
        flex-direction: column;
    }

    .btn {
        flex: 1;
        min-width: 100px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .checklist {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Status Messages */
.status-success {
    background: #c6f6d5;
    color: #22543d;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.status-error {
    background: #fed7d7;
    color: #742a2a;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.status-info {
    background: #bee3f8;
    color: #2c5282;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
}
