:root {
    --primary-color: #007aff;
    --primary-color-light: #58aFFF;
    --background-gradient-start: #f4f6f9; /* No longer used for body, but keep for consistency */
    --background-gradient-end: #e7ecf3;   /* No longer used for body, but keep for consistency */
    --text-color: #333;
    --text-color-light: #666;
    --container-bg: rgba(255, 255, 255, 0.85); /* 85% opacity */
    --border-color: #d1d8e0;
    --success-color: #28a745;
    --error-color: #dc3545;
}

body {
    font-family: 'Poppins', sans-serif;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=1920&q=80'); /* Cool cloud background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
    color: var(--text-color);
}

.container {
    background-color: var(--container-bg); /* Use the new transparent background */
    padding: 2rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    text-align: center;
    width: 100%;
    max-width: 650px;
    transition: all 0.3s ease;
}

h1 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h2 {
    font-weight: 300;
    color: var(--text-color-light);
    margin-top: 0;
    margin-bottom: 2rem;
}

#drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fcfdff;
}

#drop-zone.dragover {
    background-color: #eaf5ff;
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.drop-zone-icon svg {
    color: var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

#drop-zone.dragover .drop-zone-icon svg {
    color: var(--primary-color);
    transform: scale(1.1);
}

#drop-zone p {
    margin: 0;
    color: var(--text-color-light);
    font-weight: 300;
}

#preview {
    margin-top: 1.5rem;
    text-align: left;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0;
    background-color: #f8f9fa;
}

.preview-item {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-item:last-child {
    border-bottom: none;
}

#captcha {
    margin-top: 2rem;
}

#captcha p {
    color: var(--text-color);
    font-weight: 300;
}

#captcha-answer {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-top: 0.5rem;
    width: 50%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#captcha-answer:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

#upload-button {
    background-image: linear-gradient(45deg, var(--primary-color), var(--primary-color-light));
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 400;
    margin-top: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
}

#upload-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
}

#upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#status-container {
    margin-top: 1.5rem;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#status {
    color: var(--error-color);
    margin: 0;
}

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

/* Spinner Animation */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none; /* Hidden by default */
}

body.uploading .spinner {
    display: block;
}

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

/* Reward Modal Styles */
#reward-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

#reward-modal.is-visible {
    display: flex; /* Shown with this class */
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideIn 0.4s ease-out;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

#reward-image {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 10px;
    margin-bottom: 1rem;
}

#reward-message {
    color: var(--text-color-light);
    font-size: 1.1rem;
    margin: 0;
}

@keyframes fadeIn {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.6); }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
