/* Custom styles for the Book Quote Citation Creator */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
    background: linear-gradient(135deg, #218838 0%, #1db584 100%);
}

#book-preview {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

#book-preview:not(:empty) {
    border-color: #667eea;
    border-style: solid;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 10px;
}

.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    color: #721c24;
}

/* Preview sections */
#quote-preview, #citation-preview {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #667eea;
}

#quote-preview .text-primary {
    font-style: italic;
    line-height: 1.6;
}

#citation-preview .text-success {
    font-weight: 500;
    line-height: 1.5;
}

/* Form text helper */
.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        margin-top: 2rem;
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn-success {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Loading animation for book preview */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Enhanced card hover effects */
.card:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* Custom scrollbar for textarea */
textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}