/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --nectr-yellow: #FFD100;
    --nectr-black: #000000;
    --nectr-white: #FFFFFF;
    --nectr-gray: #F5F5F5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--nectr-black);
    background-color: var(--nectr-white);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    min-height: 100vh;
    background-color: var(--nectr-white);
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    background-color: var(--nectr-yellow);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/yellow-texture.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 1;
}

.header>* {
    position: relative;
    z-index: 2;
}

.logo {
    margin-bottom: 30px;
}

.logo-img {
    height: 80px;
    width: auto;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--nectr-black);
    margin: 0;
}

/* Upload options */
.upload-options {
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 20px;
    width: 100%;
}

.upload-option {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-wrapper {
    background-color: var(--nectr-black);
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    transition: transform 0.3s ease;
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='-5 -5 110 110' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0C52.9 0 55.7 0.9 58.1 2.5L88.1 20.5C92.9 23.4 95.8 28.5 95.8 34V70C95.8 75.5 92.9 80.6 88.1 83.5L58.1 101.5C55.7 103.1 52.9 104 50 104C47.1 104 44.3 103.1 41.9 101.5L11.9 83.5C7.1 80.6 4.2 75.5 4.2 70V34C4.2 28.5 7.1 23.4 11.9 20.5L41.9 2.5C44.3 0.9 47.1 0 50 0Z' fill='black'/%3E%3C/svg%3E") center/100% 100%;
    mask: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='-5 -5 110 110' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0C52.9 0 55.7 0.9 58.1 2.5L88.1 20.5C92.9 23.4 95.8 28.5 95.8 34V70C95.8 75.5 92.9 80.6 88.1 83.5L58.1 101.5C55.7 103.1 52.9 104 50 104C47.1 104 44.3 103.1 41.9 101.5L11.9 83.5C7.1 80.6 4.2 75.5 4.2 70V34C4.2 28.5 7.1 23.4 11.9 20.5L41.9 2.5C44.3 0.9 47.1 0 50 0Z' fill='black'/%3E%3C/svg%3E") center/100% 100%;
}

.option-icon {
    width: 45px;
    height: 45px;
    transition: transform 0.3s ease;
}

.upload-btn {
    background-color: var(--nectr-yellow);
    color: var(--nectr-black);
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.2s;
    width: 100%;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Hover animations */
.upload-option:hover .icon-wrapper,
.upload-option:hover .upload-btn {
    transform: translateY(-5px);
}

.upload-option:hover .option-icon {
    transform: scale(1.1);
}

.upload-btn:hover {
    background-color: #FFE100;
}

/* Add a smooth transition back */
.upload-option .icon-wrapper,
.upload-option .upload-btn,
.upload-option .option-icon {
    transition: all 0.3s ease;
}

.arrow {
    font-size: 20px;
    line-height: 1;
}

.instruction-text {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 16px;
    margin: 0 auto 40px;
    max-width: 800px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#camera-container {
    background-color: white;
    border-radius: 12px;
    max-width: 90%;
    width: 800px;
    padding: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--nectr-yellow) 0%, #FFE100 100%);
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-title {
    margin: 0 0 10px 0;
    color: var(--nectr-black);
    font-size: 20px;
    font-weight: 600;
}

.capture-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.capture-counter {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--nectr-black);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}

.capture-status-text {
    color: var(--nectr-black);
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
}

#video,
#photo-preview {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    background-color: #000;
    margin: 0;
    display: block;
}

#photo-preview {
    display: none;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background-color: #f8f9fa;
}

.camera-btn {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 120px;
}

.camera-btn.primary {
    background-color: var(--nectr-yellow);
    color: var(--nectr-black);
}

.camera-btn.primary:hover {
    background-color: #FFE100;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 209, 0, 0.3);
}

.camera-btn.secondary {
    background-color: #28a745;
    color: white;
}

.camera-btn.secondary:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.camera-btn.tertiary {
    background-color: #6c757d;
    color: white;
}

.camera-btn.tertiary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.camera-btn:active {
    transform: translateY(0);
}

.camera-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.camera-instruction {
    margin: 0;
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
}

/* Status messages */
.status {
    padding: 15px;
    margin: 20px;
    border-radius: 8px;
    text-align: center;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
}

.status.success {
    background-color: #d4edda;
    color: #155724;
}

.status.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .upload-options {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    h1 {
        font-size: 24px;
    }

    .icon-wrapper {
        width: 80px;
        height: 80px;
    }

    .option-icon {
        width: 35px;
        height: 35px;
    }

    .upload-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .thumbnail-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .thumbnail-image {
        height: 80px;
    }
}

/* Info panel for query parameters */
.info-panel {
    background-color: #f1f8ff;
    border: 1px solid #b3d7ff;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 20px;
}

.info-panel p {
    margin: 5px 0;
}

/* Camera container */
.camera-container {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

video,
#photo-preview {
    width: 100%;
    display: block;
    background-color: #000;
    border-radius: 4px;
}

.camera-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
}

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

textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: translateY(1px);
}

.primary {
    background-color: #3498db;
    color: white;
}

.primary:hover {
    background-color: #2980b9;
}

.primary:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.secondary {
    background-color: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #ddd;
}

.secondary:hover {
    background-color: #dfe6e9;
}

/* File upload styling */
.file-upload {
    margin: 15px 0;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-upload label {
    display: inline-block;
    cursor: pointer;
}

#selected-file {
    margin-left: 10px;
    font-style: italic;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Remove the previous animation */
@keyframes honeycombFloat {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 0;
    }
}

/* Thumbnail gallery styles */
.thumbnail-gallery {
    position: relative;
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background-color: rgba(245, 245, 245, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    border: 2px solid var(--nectr-yellow);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--nectr-yellow);
}

.gallery-header h3 {
    margin: 0;
    color: var(--nectr-black);
    font-size: 18px;
    font-weight: 600;
}

.image-counter {
    background-color: var(--nectr-yellow);
    color: var(--nectr-black);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.thumbnail-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
}

.thumbnail-item {
    position: relative;
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.thumbnail-item.selected {
    border: 2px solid var(--nectr-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 209, 0, 0.4);
}

.thumbnail-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 6px;
}

.thumbnail-item:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-info {
    color: white;
    font-size: 10px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.thumbnail-delete {
    background-color: rgba(255, 0, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.thumbnail-delete:hover {
    background-color: rgba(255, 0, 0, 1);
}

.thumbnail-delete:active {
    transform: scale(0.95);
}

.gallery-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    grid-column: 1 / -1;
    font-size: 14px;
}

.gallery-actions {
    margin-top: 10px;
    text-align: center;
}

.gallery-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-btn.danger {
    background-color: #dc3545;
    color: white;
}

.gallery-btn.danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Responsive design for thumbnail gallery */
@media (max-width: 768px) {
    .thumbnail-gallery {
        bottom: 10px;
        max-width: 95%;
        padding: 12px;
    }

    .gallery-header h3 {
        font-size: 16px;
    }

    .thumbnail-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        max-height: 150px;
    }

    .thumbnail-image {
        height: 70px;
    }
}

@media (max-width: 480px) {
    .thumbnail-gallery {
        bottom: 5px;
        max-width: 98%;
        padding: 10px;
    }

    .thumbnail-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
        max-height: 120px;
    }

    .thumbnail-image {
        height: 60px;
    }

    .gallery-header h3 {
        font-size: 14px;
    }

    .image-counter {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Progress indicator styles */
.upload-progress {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.progress-message {
    font-weight: 600;
    color: var(--nectr-black);
    margin-bottom: 10px;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--nectr-yellow) 0%, #FFE100 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Enhanced status message styles */
.status {
    padding: 15px;
    margin: 20px;
    border-radius: 8px;
    text-align: center;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 500px;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

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

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

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

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

/* Camera limit warning styles */
.camera-limit-warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 5px;
    border: 1px solid #ffeaa7;
}

/* Enhanced camera button states */
.camera-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.camera-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive adjustments for progress indicators */
@media (max-width: 768px) {
    .status {
        margin: 10px;
        min-width: 280px;
        max-width: calc(100% - 20px);
        bottom: 10px;
    }

    .upload-progress {
        padding: 12px;
    }

    .progress-message {
        font-size: 13px;
    }

    .progress-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .status {
        min-width: 250px;
        padding: 12px;
        font-size: 14px;
    }

    .upload-progress {
        padding: 10px;
    }

    .progress-message {
        font-size: 12px;
    }
}