/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

.header-content h1 {
    color: white;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2em;
    font-weight: 300;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.5em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafafa;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: white;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    background: #f3f4f6;
    color: #374151;
    margin-top: 8px;
}

.btn-small:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Disable date/time picker buttons for keyboard navigation only */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    pointer-events: auto;
    opacity: 1;
    tab-index: -1;
}

/* Firefox specific */
input[type="date"]::-moz-calendar-picker-indicator,
input[type="time"]::-moz-calendar-picker-indicator {
    pointer-events: auto;
    opacity: 1;
    tab-index: -1;
}

/* Ensure the input fields themselves are still interactive */
input[type="date"],
input[type="time"] {
    pointer-events: auto;
}

/* Keyboard Navigation Help */
.keyboard-help {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #0c4a6e;
}

.keyboard-help p {
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keyboard-help ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.keyboard-help li {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.keyboard-help li:last-child {
    margin-bottom: 0;
}

.keyboard-help i {
    color: #0ea5e9;
    font-size: 16px;
}

.keyboard-help kbd {
    background: #1e293b;
    color: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #475569;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Make the input fields more keyboard-friendly */
input[type="date"]:focus,
input[type="time"]:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Configuration Section */
.config-section h3 {
    color: #374151;
    margin-bottom: 20px;
    font-size: 1.2em;
}

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

.upload-item {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.upload-item:hover {
    border-color: #4f46e5;
}

.upload-item label {
    cursor: pointer;
    font-weight: 500;
    justify-content: center;
    margin-bottom: 10px;
}

.upload-item small {
    color: #6b7280;
    font-size: 12px;
}

.image-preview {
    margin-top: 15px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.image-preview img {
    display: block;
    margin: 0 auto 10px;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-preview p {
    margin: 0;
    text-align: center;
    color: #6b7280;
}

.cover-toggle {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cover-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #374151;
}

.cover-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.text-config {
    border-top: 1px solid #e5e7eb;
    padding-top: 30px;
}



/* Progress Indicator */
.progress {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 4px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; transform: translateX(-100%); }
    50% { width: 100%; transform: translateX(0%); }
    100% { width: 100%; transform: translateX(100%); }
}

.progress-text {
    color: #374151;
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: rgba(255,255,255,0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content h1 {
        font-size: 2em;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
}

/* Animation for config toggle */
.config-toggle-animation {
    transition: transform 0.3s ease;
}

.config-toggle-animation.rotated {
    transform: rotate(180deg);
}

/* File input styling */
input[type="file"] {
    background: white;
    cursor: pointer;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.toast:hover {
    transform: translateX(0) translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
}

.toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.toast.success .toast-icon {
    background: #10b981;
    color: white;
}

.toast.error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast.info .toast-icon {
    background: #3b82f6;
    color: white;
}

.toast.warning .toast-icon {
    background: #f59e0b;
    color: white;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1f2937;
}

.toast-message {
    font-size: 13px;
    line-height: 1.4;
    color: #6b7280;
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 12px;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #374151;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    transition: width linear;
}

.toast.success .toast-progress {
    background: #10b981;
}

.toast.error .toast-progress {
    background: #ef4444;
}

.toast.info .toast-progress {
    background: #3b82f6;
}

.toast.warning .toast-progress {
    background: #f59e0b;
}

/* Toast animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive toast design */
@media (max-width: 768px) {
    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
} 