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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #2c5530;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4CAF50;
}

input[type="file"] {
    padding: 5px;
}

/* Universal file upload styling */
.upload-container {
    position: relative;
    margin: 10px 0;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fafafa;
    cursor: pointer;
    position: relative;
    min-height: 80px;
    -webkit-tap-highlight-color: transparent;
}

.upload-area:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

.upload-area:active {
    border-color: #4CAF50;
    background: #e8f5e8;
    transform: scale(0.98);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: #e8f5e8;
    border-style: solid;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #666;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.upload-subtext {
    color: #666;
    font-size: 14px;
}

.file-input-hidden {
    display: none;
}

/* Responsive text display - Mobile first */
.desktop-text,
.desktop-subtext {
    display: none;
}

.mobile-text,
.mobile-subtext {
    display: block;
}

/* Desktop responsive behavior */
@media (min-width: 768px) {
    .upload-area {
        padding: 40px;
        min-height: 120px;
    }
    
    .upload-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .upload-text {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .upload-subtext {
        font-size: 14px;
    }
    
    /* Show desktop text, hide mobile text */
    .mobile-text,
    .mobile-subtext {
        display: none;
    }
    
    .desktop-text,
    .desktop-subtext {
        display: block;
    }
}

/* Mobile-specific improvements */
@media (max-width: 767px) {
    .upload-area {
        padding: 25px 15px;
        min-height: 60px;
    }
    
    .upload-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .upload-text {
        font-size: 16px; /* Prevent iOS zoom on focus */
        margin-bottom: 6px;
    }
    
    .upload-subtext {
        font-size: 13px;
    }
}

.file-info {
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 4px;
    font-size: 14px;
}

small {
    color: #666;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.4;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    margin-top: 2px; /* Align with first line of text */
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    margin-bottom: 0;
    flex: 1;
}

.checkbox-group label a {
    color: #2c5530;
    text-decoration: underline;
    font-weight: normal;
}

.checkbox-group label a:hover {
    color: #1a3320;
    text-decoration: none;
}

/* Mobile-specific checkbox improvements */
@media (max-width: 767px) {
    .checkbox-group {
        gap: 15px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        margin: 15px 0;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 24px;
        height: 24px;
        min-width: 24px;
        margin-top: 0;
        transform: scale(1.2); /* Make checkbox larger on mobile */
        accent-color: #4CAF50; /* Modern browsers checkbox color */
    }
    
    .checkbox-group label {
        font-size: 16px; /* Prevent iOS zoom */
        line-height: 1.5;
        padding-left: 4px;
    }
    
    /* Improve touch target by making the entire checkbox area tappable */
    .checkbox-group {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(76, 175, 80, 0.1);
    }
}

.submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #45a049;
}

/* Enhanced Loading System */
.loading {
    text-align: center;
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.loading-content {
    max-width: 500px;
    margin: 0 auto;
}

.loading-header {
    margin-bottom: 30px;
}

.loading-header h3 {
    color: #2c5530;
    font-size: 24px;
    margin: 15px 0 10px;
    font-weight: 600;
}

.loading-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

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

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

/* Progress Bar */
.progress-container {
    margin: 30px 0;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
    border-radius: 6px;
    transition: width 0.5s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
}

#progressPercent {
    font-weight: 600;
    color: #2c5530;
    font-size: 16px;
}

/* Progress Details */
.progress-details {
    margin-top: 20px;
    text-align: center;
}

.progress-step {
    font-weight: 600;
    color: #2c5530;
    font-size: 16px;
    margin-bottom: 5px;
}

.progress-description {
    color: #666;
    font-size: 14px;
}

.result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 5px;
}

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

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

.result h3 {
    margin-bottom: 10px;
}

.result a {
    color: #0066cc;
    text-decoration: none;
}

.result a:hover {
    text-decoration: underline;
}