:root {
    --primary-color: #2c5aa0;
    --primary-dark: #1e4278;
    --secondary-color: #4a90e2;
    --accent-color: #f0f4f8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e8eaed 0%, #c5c8cc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-dark);
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.upload-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--accent-color);
}

.header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.header .logo {
    height: 80px;
    width: auto;
    margin: 0 auto 15px;
    display: block;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.form-section {
    margin-bottom: 35px;
}

.form-section h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input:invalid {
    border-color: var(--error-color);
}

.form-group small {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
}

.upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--accent-color);
}

.upload-zone.has-files {
    padding: 25px 30px;
}

.upload-zone.has-files .upload-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

.upload-zone.has-files .upload-text {
    font-size: 1rem;
    margin-bottom: 5px;
}

.upload-zone.has-files .upload-hint {
    display: none;
}

.upload-zone:hover {
    border-color: var(--secondary-color);
    background-color: rgba(74, 144, 226, 0.05);
}

.upload-zone.dragover {
    border-color: var(--secondary-color);
    background-color: rgba(74, 144, 226, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--secondary-color);
    margin: 0 auto 20px;
}

.upload-text {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 10px;
}

.upload-hint {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 5px 0;
}

#fileInput {
    display: none;
}

.file-list {
    margin-top: 35px;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 10px;
}

.file-summary {
    color: var(--text-light);
    font-size: 0.9rem;
}

.remove-all-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.remove-all-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--accent-color);
    border-radius: 8px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
    position: relative;
    cursor: move;
    transition: all 0.2s ease;
}

.file-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.file-item.drag-over-top::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.file-item.drag-over-bottom::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.drag-handle {
    color: var(--text-light);
    font-size: 1.2rem;
    line-height: 1;
    margin-right: 8px;
    cursor: move;
    user-select: none;
    padding: 4px;
}

.drag-handle:hover {
    color: var(--primary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.file-preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-light);
}

.remove-file {
    background: var(--error-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    margin-top: 30px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-btn.loading {
    pointer-events: none;
}

.btn-icon {
    width: 24px;
    height: 24px;
}

.progress-section {
    margin: 30px 0;
}

.upload-progress {
    margin-top: 20px;
}

.progress-item {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.progress-filename {
    font-weight: 500;
    color: var(--text-dark);
}

.progress-percentage {
    color: var(--text-light);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-status {
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-status.success {
    color: var(--success-color);
}

.progress-status.error {
    color: var(--error-color);
}

.progress-status .error-message {
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.progress-status .error-details {
    color: var(--text-light);
    font-size: 0.8rem;
    display: block;
    margin-top: 4px;
}

.retry-btn {
    margin-top: 8px;
    padding: 6px 14px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.retry-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.overall-progress {
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.overall-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.overall-progress-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-details {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-light);
    gap: 15px;
}

.progress-speed,
.progress-eta {
    font-weight: 500;
}

.progress-item {
    position: relative;
    margin-bottom: 20px;
    padding-right: 40px;
}

.cancel-upload-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.cancel-upload-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.cancel-upload-btn:active {
    transform: scale(0.95);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.3s ease;
    position: relative;
}

.modal-close-x {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.modal-close-x:hover {
    background: var(--accent-color);
    color: var(--text-dark);
}

/* Fix scrollbar cutting off rounded corners */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 16px 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    color: var(--success-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.success-icon {
    width: 80px;
    height: 80px;
    color: var(--success-color);
    margin: 0 auto;
}

.error-icon {
    width: 80px;
    height: 80px;
    color: var(--error-color);
    margin: 0 auto;
}

.warning-icon {
    width: 80px;
    height: 80px;
    color: #f59e0b;
    margin: 0 auto;
}

.confirmation-details {
    background: var(--accent-color);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.confirmation-details h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.confirmation-details p {
    margin: 10px 0;
    color: var(--text-dark);
}

.confirmation-details strong {
    color: var(--primary-color);
}

.uploaded-files-list {
    margin-top: 20px;
}

.uploaded-files-list h4 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.uploaded-files-list ul {
    list-style: none;
}

.uploaded-files-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.uploaded-files-list li:last-child {
    border-bottom: none;
}

.success-section {
    background: rgba(16, 185, 129, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
    margin-bottom: 15px;
}

.error-section {
    background: rgba(239, 68, 68, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--error-color);
    margin-bottom: 15px;
}

.file-success {
    color: var(--success-color);
    font-weight: 500;
}

.file-failed {
    color: var(--error-color);
    font-weight: 500;
}

.close-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--primary-dark);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
    border-left: 4px solid #f59e0b;
    font-weight: 500;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Admin Link */
.admin-link-top {
    display: block;
    text-align: right;
    margin-bottom: 10px;
    padding: 6px 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 400;
}

.admin-link-top:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* reCAPTCHA disclosure (required when hiding badge) */
.recaptcha-disclosure {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 20px;
    padding: 15px;
}

.recaptcha-disclosure a {
    color: var(--primary-color);
    text-decoration: none;
}

.recaptcha-disclosure a:hover {
    text-decoration: underline;
}

