* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 600;
}
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #34495e;
}
input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}
input:focus {
    outline: none;
    border-color: #3498db;
}
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}
.btn:hover {
    background-color: #2980b9;
}
.btn:active {
    transform: scale(0.98);
}
#camera {
    max-width: 100%;
    width: 100%;
    border-radius: 10px;
    margin: 20px 0;
    display: none;
    background-color: #ecf0f1;
}
.photo-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.photo-wrapper {
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.captured-photo {
    width: 100%;
    height: auto;
    object-fit: cover;
}
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    input, .btn {
        font-size: 16px;
    }
}

.toggle-btn {
    margin-bottom: 15px;
}

.collapsible-content {
    margin-bottom: 20px;
    display: none;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.small-btn {
    flex: 1;
    padding: 10px;
}

.spinner-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

/* Card-based layout */
.card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
    margin-bottom: 18px;
    padding: 18px 18px 12px 18px;
    position: relative;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 10px;
}
.badge {
    background: #eafaf1;
    color: #27ae60;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.95em;
    margin-left: 8px;
    font-weight: 500;
}
.icon-btn {
    background: none;
    border: none;
    color: #3498db;
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.icon-btn:hover {
    background: #f0f6fa;
}
.input-with-status {
    display: flex;
    align-items: center;
    gap: 8px;
}
.spinner-small {
    width: 22px;
    height: 22px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
.camera-preview {
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    margin: 0 auto 18px auto;
    display: block;
    background: #ecf0f1;
}
.camera-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.photo-thumbnails {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 4px;
}
.photo-thumbnails .photo-wrapper {
    min-width: 80px;
    max-width: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(44, 62, 80, 0.08);
}
.photo-thumbnails .captured-photo {
    width: 100%;
    height: auto;
    object-fit: cover;
}
@media (max-width: 600px) {
    .container {
        padding: 8px;
    }
    .card {
        padding: 12px 8px 8px 8px;
    }
    h1 {
        font-size: 1.3em;
    }
    .camera-preview {
        max-width: 100%;
    }
}
