/* ===================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =================================== */
:root {
    /* Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(45deg, #6c757d, #5a6268);
    --success-gradient: linear-gradient(135deg, #28a745, #20c997);
    --danger-gradient: linear-gradient(135deg, #dc3545, #c82333);
    --warning-gradient: linear-gradient(135deg, #ffc107, #e0a800);
    
    --primary-color: #667eea;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --secondary-color: #6c757d;
    
    --text-primary: #333;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --text-light: #666;
    
    --bg-light: #f8f9fa;
    --bg-lighter: #e9ecef;
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    
    /* Spacing */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.1);
}

/* ===================================
   CSS RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    padding: 20px;
}

/* ===================================
   LAYOUT COMPONENTS
   =================================== */
.container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

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

h1 {
    color: var(--text-primary);
    font-size: 2.5em;
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1em;
    margin-bottom: 15px;
}

/* ===================================
   INFORMATION SECTIONS
   =================================== */
.how-it-works-image {
    text-align: center;
    margin: 20px 0;
}

.how-it-works-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.upload-tips {
    background: #e8f4f8;
    border: 1px solid #bee5eb;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    font-size: 0.95em;
}

.upload-tips h3 {
    color: #0c5460;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.upload-tips ul {
    margin: 0;
    padding-left: 20px;
}

.upload-tips li {
    margin-bottom: 8px;
    color: #0c5460;
}

/* ===================================
   JOB STATUS COMPONENTS
   =================================== */
.active-job-banner {
    display: none;
    background: var(--success-gradient);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

.active-job-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
}

.active-job-subtitle {
    font-size: 1em;
    opacity: 0.9;
    margin-bottom: 15px;
}

/* Recent Jobs Section */
.recent-jobs-section {
    display: none;
    margin: 30px 0;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.recent-jobs-header {
    background: var(--bg-light);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.recent-jobs-header:hover {
    background: var(--bg-lighter);
}

.recent-jobs-title {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-secondary);
}

.recent-jobs-toggle {
    font-size: 1.2em;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.recent-jobs-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.recent-jobs-content.expanded {
    max-height: 500px;
}

.recent-job-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.recent-job-item:hover {
    background: var(--bg-light);
}

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

.recent-job-info {
    flex: 1;
}

.recent-job-name {
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.recent-job-meta {
    font-size: 0.9em;
    color: var(--text-muted);
}

.recent-job-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Job Status States */
.job-processing {
    background: #fff3cd !important;
    border-left: 4px solid var(--warning-color) !important;
}

.job-completed {
    background: #f8fff8 !important;
    border-left: 4px solid var(--success-color) !important;
}

/* ===================================
   EMAIL INPUT SECTION
   =================================== */
.email-input-section {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-light);
    border-radius: 15px;
    border: 2px solid var(--border-light);
    transition: var(--transition);
}

.email-input-section.signed-in {
    border-color: var(--success-color);
    background: #f8fff8;
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.email-label {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-secondary);
    margin: 0;
}

.current-user-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-user-text {
    color: var(--success-color);
    font-size: 0.9em;
}

.email-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.email-input-section.signed-in .email-input-container {
    display: none;
}

.email-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1em;
    transition: var(--transition);
    background: white;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.email-input:valid {
    border-color: var(--success-color);
}

.email-error {
    margin-top: 8px;
    color: var(--danger-color);
    font-size: 0.9em;
    font-weight: bold;
    display: none;
}

/* ===================================
   UPLOAD AREA COMPONENT
   =================================== */
.upload-area {
    position: relative;
    padding: 30px 30px 80px 30px;
    border: 3px dashed #ddd;
    border-radius: 15px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    cursor: pointer;
    transition: var(--transition);
    margin: 20px 0;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #e8f0ff;
    transform: scale(1.02);
}

.upload-area.has-file {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.upload-area.processing {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    cursor: default;
}

.upload-area.blocked {
    border-color: var(--danger-color);
    background: #f8d7da;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--text-muted);
    transition: var(--transition);
}

.upload-area.has-file .upload-icon,
.upload-area.processing .upload-icon {
    color: var(--success-color);
}

.upload-area.processing .upload-icon {
    color: var(--warning-color);
    animation: pulse 2s infinite;
}

.upload-text {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upload-area.processing .upload-text {
    color: #856404;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.upload-area.processing .upload-hint {
    color: #856404;
}

/* Upload Blocking Overlay */
.upload-blocked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    z-index: 20;
    backdrop-filter: blur(2px);
}

.upload-area.processing .upload-blocked-overlay {
    display: none !important;
    pointer-events: none !important;
}

.upload-area.blocked .upload-blocked-overlay {
    display: flex;
}

.upload-blocked-message {
    text-align: center;
    padding: 20px;
}

.upload-blocked-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.upload-blocked-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Upload Controls */
.upload-button-wrapper {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 100;
}

.remove-file-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--danger-gradient);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    z-index: 60;
}

.remove-file-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.processing-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 193, 7, 0.9);
    color: #856404;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: none;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.upload-area.processing .processing-indicator {
    display: block;
    animation: pulse 2s infinite;
}

/* Ensure buttons are always clickable in processing state */
.upload-area.processing .btn-mobile-danger,
.upload-area.processing .btn-mobile-primary {
    pointer-events: auto !important;
    z-index: 250 !important;
    position: relative !important;
}

/* ===================================
   BUTTON COMPONENTS
   =================================== */
/* Primary Mobile Button */
.btn-mobile-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    margin: 0;
    z-index: 140 !important;
}

.btn-mobile-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-mobile-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.btn-mobile-primary:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-mobile-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5);
}

/* Danger Mobile Button */
.btn-mobile-danger {
    background: var(--danger-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    z-index: 150 !important;
}

.btn-mobile-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
}

.btn-mobile-danger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.5);
}

/* Standard Buttons */
.btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: var(--transition);
    margin: 10px;
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn.secondary {
    background: var(--secondary-gradient);
}

.btn.success {
    background: var(--success-gradient);
}

/* Small Buttons */
.btn-small {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: var(--transition);
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-small.secondary {
    background: var(--secondary-gradient);
}

.btn-small.success {
    background: var(--success-gradient);
}

.btn-small.success:hover {
    background: linear-gradient(45deg, #1e7e34, #1ea87a);
}

.btn-small.danger {
    background: var(--danger-gradient);
}

/* Specific Action Buttons */
.btn-reconnect, .btn-load-jobs {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reconnect:hover, .btn-load-jobs:hover {
    background: white;
    color: var(--success-color);
}

.btn-load-jobs {
    background: var(--success-gradient);
    border: none;
    padding: 12px 18px;
    white-space: nowrap;
}

.btn-change-user {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
    transition: var(--transition);
}

.btn-change-user:hover {
    background: #545b62;
}

/* Job Action Buttons */
.btn-job-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-view {
    background: #007bff;
    color: white;
}

.btn-view:hover {
    background: #0056b3;
    color: white;
}

.btn-gallery {
    background: #20c997 !important;
    color: white !important;
}

.btn-gallery:hover {
    background: #1ea87a !important;
    color: white !important;
}

.btn-download {
    background: var(--secondary-color);
    color: white;
}

.btn-download:hover {
    background: #545b62;
    color: white;
}

.btn-delete {
    background: var(--danger-color) !important;
    color: white !important;
}

.btn-delete:hover {
    background: #c82333 !important;
    color: white !important;
}

.btn-delete:disabled {
    background: var(--secondary-color) !important;
    cursor: not-allowed !important;
}

/* Button Effects */
.btn-mobile-primary::before,
.btn-mobile-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-mobile-primary:hover::before,
.btn-mobile-danger:hover::before {
    left: 100%;
}

/* ===================================
   PROGRESS & STATUS COMPONENTS
   =================================== */
.progress-container {
    display: none;
    margin-top: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-lighter);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
    animation: shimmer 2s infinite;
}

.status {
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: 500;
}

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

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

.status.info {
    background: #e2f3ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* Step-by-step Progress */
.current-step-progress {
    padding: 25px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 15px;
}

.step-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

.step-counter {
    background: var(--primary-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.step-content {
    text-align: center;
    margin-bottom: 20px;
}

.step-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.step-description {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.4;
}

.step-message {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 15px;
}

/* Completion Progress */
.completion-progress {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 15px;
    border: 1px solid var(--success-color);
}

.completion-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 1s infinite;
}

.completion-title {
    font-size: 24px;
    font-weight: bold;
    color: #155724;
    margin-bottom: 8px;
}

.completion-subtitle {
    font-size: 16px;
    color: #155724;
    margin-bottom: 25px;
}

/* ===================================
   VIEWER COMPONENTS
   =================================== */
.embedded-viewer-container {
    display: none;
    background: white;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

.embedded-viewer-header {
    background: var(--success-gradient);
    color: white;
    padding: 20px;
    text-align: center;
}

.embedded-viewer-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

.embedded-viewer-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

.viewer-iframe-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: var(--bg-light);
}

.viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.viewer-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.viewer-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.viewer-controls {
    background: var(--bg-light);
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.viewer-info {
    font-size: 0.9em;
    color: var(--text-light);
}

.viewer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Notifications */
.viewer-ready-notification {
    display: none;
    background: var(--success-gradient);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    text-align: center;
    animation: slideIn 0.5s ease-out;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.notification-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.notification-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
}

.notification-subtitle {
    font-size: 1em;
    opacity: 0.9;
    margin-bottom: 0;
}

.gallery-link-display {
    animation: slideIn 0.5s ease-out;
}

/* ===================================
   MODAL COMPONENTS
   =================================== */
.delete-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.delete-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.delete-modal-header {
    background: var(--danger-gradient);
    color: white;
    padding: 25px 30px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    text-align: center;
}

.delete-modal-icon {
    font-size: 3em;
    margin-bottom: 10px;
    display: block;
}

.delete-modal-title {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.delete-modal-subtitle {
    font-size: 1em;
    opacity: 0.9;
    margin: 0;
    font-weight: normal;
}

.delete-modal-body {
    padding: 30px;
}

.delete-modal-filename {
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-family: monospace;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-secondary);
    word-break: break-all;
}

.delete-modal-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    color: #856404;
}

.delete-modal-warning-icon {
    font-size: 1.5em;
    margin-bottom: 8px;
    display: block;
}

.delete-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 0 30px 30px 30px;
}

.btn-delete-confirm {
    background: var(--danger-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

.btn-delete-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-delete-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-delete-cancel {
    background: var(--secondary-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
}

.btn-delete-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.jobs-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

.jobs-loading.active {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* Hidden Elements */
input[type="file"] {
    display: none;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    /* Layout */
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        border-radius: 15px;
    }
    
    /* Typography */
    h1 {
        font-size: 2em;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    .completion-icon {
        font-size: 36px;
    }
    
    .completion-title {
        font-size: 20px;
    }
    
    .completion-subtitle {
        font-size: 14px;
    }
    
    /* Upload Area */
    .upload-area {
        padding: 20px 20px 70px 20px;
        min-height: 180px;
    }
    
    .upload-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .upload-hint {
        font-size: 12px;
    }
    
    .upload-button-wrapper {
        bottom: 15px;
        padding: 0 15px;
        z-index: 200 !important;
    }
    
    .upload-button-wrapper .btn-mobile-primary,
    .upload-button-wrapper .btn-mobile-danger {
        min-width: 160px;
        padding: 12px 20px;
        font-size: 14px;
        z-index: 210 !important;
    }
    
    .btn-mobile-danger {
        z-index: 220 !important;
    }
    
    .upload-blocked-overlay {
        bottom: 70px;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        max-width: 300px;
        margin: 10px 0;
        padding: 18px 30px;
        font-size: 1.2em;
    }
    
    .btn-mobile-primary,
    .btn-mobile-danger {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        margin: 5px 0;
    }
    
    /* Remove File Button */
    .remove-file-btn {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    /* Email Section */
    .email-input-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .email-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .email-input-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .email-input {
        padding: 18px;
        font-size: 1.2em;
    }
    
    .btn-load-jobs {
        width: 100%;
        padding: 15px;
        font-size: 1em;
    }
    
    /* Recent Jobs */
    .recent-job-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recent-job-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Process Steps */
    .step-indicator {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Viewer */
    .viewer-iframe-container {
        height: 400px;
    }
    
    .viewer-controls {
        flex-direction: column;
        text-align: center;
    }
    
    .viewer-actions {
        justify-content: center;
    }

    .gallery-link-display strong {
    color: #000 !important;
    }
    
    /* Modal */
    .delete-modal {
        width: calc(100vw - 40px); /* Account for 20px padding on each side */
        max-width: 95vw; /* Ensure it never exceeds viewport */
        margin: 0; /* Remove margin that interferes with centering */
    }
    
    .delete-modal-overlay {
        padding: 20px;
        box-sizing: border-box;
    }
    
    .delete-modal-header {
        padding: 20px;
    }
    
    .delete-modal-body {
        padding: 20px;
    }
    
    .delete-modal-actions {
        flex-direction: column;
        padding: 0 20px 20px 20px;
    }
    
    .btn-delete-confirm,
    .btn-delete-cancel {
        width: 100%;
        margin: 5px 0;
    }
}