/* Base Styles */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Background image with overlay for readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/website_image.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;  /* Adjust this value: 0.1 = very faint, 0.3 = more visible */
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

header .subtitle {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Sections */
.section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

/* Upload Area */
.upload-area {
    margin-bottom: 1.5rem;
}

.filepond--root {
    font-family: inherit;
}

/* Config Panel */
.config-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.config-panel h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group select,
.form-group input[type="email"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input[type="email"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Invalid input styling */
.form-group input[type="email"]:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: normal;
    cursor: pointer;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

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

.btn.primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn.primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn.secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn.secondary:hover {
    background: #d1d5db;
}

.btn.large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.alert.warning {
    background: #fef3c7;
    color: #92400e;
}

.alert.info {
    background: #dbeafe;
    color: #1e40af;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Progress */
.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    width: 0%;
}

/* Indeterminate progress animation for queue waiting */
.progress-fill.indeterminate {
    width: 30%;
    animation: indeterminate 1.5s infinite ease-in-out;
}

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

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* Queue Info */
.queue-info {
    text-align: center;
    margin: 1rem 0;
}

.queue-info p {
    margin: 0.25rem 0;
}

/* Complete Section */
.complete-info {
    text-align: center;
}

.complete-info h2 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.complete-info p {
    margin: 0.5rem 0;
}

#download-btn {
    margin: 1.5rem 0;
}

#new-upload-btn {
    margin-top: 1rem;
}

/* Error Section */
.error-info {
    text-align: center;
}

.error-info h2 {
    color: var(--error-color);
    margin-bottom: 1rem;
}

#error-message {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    color: white;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.stats {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}
