/* Children's Coloring Book Theme */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One:wght@400&family=Comic+Neue:wght@400;700&display=swap');

body {
    padding-top: 20px;
    background: linear-gradient(135deg, #FFE5F1 0%, #E5F3FF 50%, #F0FFE5 100%);
    font-family: 'Comic Neue', cursive;
    min-height: 100vh;
    position: relative;
}

/* Add fun background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 182, 193, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(173, 216, 230, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(144, 238, 144, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

h1 {
    font-family: 'Fredoka One', cursive;
    color: #FF6B9D;
    text-shadow: 3px 3px 0px #FFE5F1;
    font-size: 3rem;
    margin-bottom: 2rem;
}

/* Color picker styling */
#coverBackgroundColor {
    width: 60px;
    height: 40px;
    border: 3px solid #FF6B9D;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.3);
}

#coverBackgroundColor:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 157, 0.4);
    border-color: #FF4081;
}

.page-row {
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    border-radius: 20px;
    box-shadow: 
        0 8px 16px rgba(255, 107, 157, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    padding: 20px;
    padding-bottom: 70px;
    position: relative;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.page-row::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7);
    border-radius: 23px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-row:hover::before {
    opacity: 1;
}

.page-row:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 24px rgba(255, 107, 157, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.15);
}

.page-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FF6B9D, #FF8E9B);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
}

.page-side {
    position: absolute;
    top: 60px;
    right: 15px;
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(78, 205, 196, 0.3);
    transition: all 0.3s ease;
}

.page-row:hover .page-number {
    transform: scale(1.1);
    background: linear-gradient(135deg, #FF8E9B, #FFB6C1);
}

.page-row:hover .page-side {
    transform: scale(1.05);
    background: linear-gradient(135deg, #44A08D, #4ECDC4);
}

.preview-img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border: 4px solid #FFE5F1;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Cover preview container for dynamic background and title overlay */
.cover-preview-box {
    width: 100%;
    height: 220px;
    border: 4px solid #FFE5F1;
    border-radius: 15px;
    background: #FFFFFF;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cover-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.cover-title-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    font-family: 'Fredoka One', cursive;
    color: #333;
    font-size: 1.4rem;
}

.preview-img:hover {
    border-color: #FF6B9D;
    box-shadow: 0 6px 12px rgba(255, 107, 157, 0.2);
}

/* Make previews indicate click-to-zoom */
.page-row .preview-img {
    cursor: zoom-in;
}

/* Image modal responsive image */
.image-modal-img {
    max-height: 90vh;
    width: auto;
    height: auto;
}

/* Dark modal background for better contrast */
#imageModal .modal-content {
    background: #000;
}

.prompt-area {
    width: 100%;
    height: 120px;
    resize: none;
    border: 3px solid #E5F3FF;
    border-radius: 15px;
    padding: 15px;
    font-family: 'Comic Neue', cursive;
    font-size: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

.prompt-area:focus {
    border-color: #45B7D1;
    box-shadow: 0 0 0 0.3rem rgba(69, 183, 209, 0.25);
    background: #ffffff;
}

.move-buttons {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.page-row:hover .move-buttons {
    opacity: 1;
    left: -25px;
}

.move-btn {
    padding: 8px 12px;
    margin: 3px;
    background: linear-gradient(135deg, #96CEB4, #FFEAA7);
    border: none;
    color: #333;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(150, 206, 180, 0.3);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #FFEAA7, #96CEB4);
    box-shadow: 0 4px 8px rgba(150, 206, 180, 0.4);
}

.cover-page {
    border: 4px solid #FFD93D;
    position: relative;
    background: linear-gradient(135deg, #FFF9E6 0%, #ffffff 100%);
}

.cover-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #FFD93D, #FFED4E);
    color: #333;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(255, 217, 61, 0.3);
    font-family: 'Fredoka One', cursive;
}

.upload-area {
    border: 4px dashed #FF6B9D;
    padding: 40px;
    text-align: center;
    border-radius: 25px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #FFE5F1 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '🎨';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.upload-area h4 {
    color: #FF6B9D;
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.upload-area:hover {
    border-color: #FF8E9B;
    background: linear-gradient(135deg, #FFE5F1 0%, #ffffff 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(255, 107, 157, 0.2);
}

.upload-area.bg-light {
    background: linear-gradient(135deg, #FFB6C1 0%, #FFE5F1 100%) !important;
    border-color: #FF6B9D;
}

.blank-page-checkbox {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 229, 241, 0.5);
    border-radius: 10px;
}

.action-buttons {
    position: absolute;
    bottom: 15px;
    right: 15px;
    left: auto;
    top: auto;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.page-row:hover .action-buttons {
    opacity: 1;
}

.delete-page {
    background: linear-gradient(135deg, #FF6B9D, #FF8E9B);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(255, 107, 157, 0.3);
}

.delete-page:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #FF8E9B, #FFB6C1);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.4);
}

.btn {
    border-radius: 20px;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #45B7D1, #4ECDC4);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4ECDC4, #45B7D1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(69, 183, 209, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #96CEB4, #FFEAA7);
    color: #333;
}

.btn-success:hover {
    background: linear-gradient(135deg, #FFEAA7, #96CEB4);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(150, 206, 180, 0.3);
}

/* Attention state for Update Cover button when title changed */
.btn-attention {
    animation: lightBounce 1.6s ease-in-out infinite;
}

@keyframes lightBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.btn-secondary {
    background: linear-gradient(135deg, #E0E0E0, #F5F5F5);
    color: #666;
}

.btn-outline-primary {
    border: 2px solid #45B7D1;
    color: #45B7D1;
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #45B7D1, #4ECDC4);
    color: white;
    transform: translateY(-2px);
}

.regenerate-btn {
    background: linear-gradient(135deg, #FF6B9D, #FF8E9B);
    color: white;
}

.regenerate-btn.btn-danger {
    background: var(--bs-danger);
}

.regenerate-btn:hover {
    background: linear-gradient(135deg, #FF8E9B, #FFB6C1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 157, 0.3);
}

.processing-status {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 15px;
    padding: 5px 12px;
    font-weight: bold;
    font-size: 12px;
}

.blank-page {
    background: linear-gradient(135deg, #F0FFE5 0%, #ffffff 100%);
    border: 3px solid #96CEB4;
}

/* Page Counter Styles - Children's Theme */
.page-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.page-counter .badge {
    font-size: 1.1rem;
    padding: 0.7rem 1rem;
    border-radius: 20px;
    font-family: 'Fredoka One', cursive;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #45B7D1, #4ECDC4) !important;
    box-shadow: 0 3px 6px rgba(69, 183, 209, 0.3);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #96CEB4, #FFEAA7) !important;
    color: #333 !important;
    box-shadow: 0 3px 6px rgba(150, 206, 180, 0.3);
}

#bookStatus {
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-family: 'Fredoka One', cursive;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.badge.bg-warning {
    background: linear-gradient(135deg, #FFD93D, #FFED4E) !important;
    color: #333 !important;
    box-shadow: 0 3px 6px rgba(255, 217, 61, 0.3);
}

.badge.bg-success {
    background: linear-gradient(135deg, #96CEB4, #FFEAA7) !important;
    color: #333 !important;
    box-shadow: 0 3px 6px rgba(150, 206, 180, 0.3);
}

.progress {
    height: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.progress-bar {
    border-radius: 20px;
    transition: width 0.5s ease-in-out;
    background: linear-gradient(90deg, #FF6B9D, #45B7D1, #4ECDC4, #96CEB4);
    background-size: 200% 100%;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, #FFD93D, #FFED4E) !important;
    animation: none;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, #96CEB4, #FFEAA7, #4ECDC4) !important;
    background-size: 200% 100%;
    animation: success-glow 2s ease infinite;
}

@keyframes success-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Book Type Selection Card - Children's Theme */
.card {
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border-radius: 25px;
    box-shadow: 
        0 8px 16px rgba(255, 107, 157, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    background-clip: padding-box;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '📚✨';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.3;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 24px rgba(255, 107, 157, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 2rem;
}

.form-select {
    border: 3px solid #E5F3FF;
    border-radius: 15px;
    padding: 12px 16px;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    font-size: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #45B7D1;
    box-shadow: 0 0 0 0.3rem rgba(69, 183, 209, 0.25);
    background: #ffffff;
}

.form-label {
    font-family: 'Fredoka One', cursive;
    color: #FF6B9D;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

h5 {
    font-family: 'Fredoka One', cursive;
    color: #4ECDC4;
    margin-bottom: 15px;
}

.form-control, textarea {
    border: 3px solid #E5F3FF;
    border-radius: 15px;
    padding: 12px 16px;
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

.form-control:focus, textarea:focus {
    border-color: #45B7D1;
    box-shadow: 0 0 0 0.3rem rgba(69, 183, 209, 0.25);
    background: #ffffff;
}

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

.processing-status.bg-info {
    background: linear-gradient(135deg, #45B7D1, #4ECDC4) !important;
    animation: bounce 2s infinite;
}

/* Fun decorative elements */
.container::before {
    content: '🎨 🖍️ ✏️ 🌈';
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    opacity: 0.3;
    z-index: 1000;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .page-row {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .preview-img {
        height: 180px;
        border-radius: 10px;
    }
    
    .prompt-area {
        height: 100px;
        border-radius: 10px;
    }
    
    .move-buttons {
        position: static;
        flex-direction: row;
        justify-content: center;
        transform: none;
        margin-top: 15px;
        opacity: 1;
    }
    
    .page-number, .page-side {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
        margin-right: 10px;
    }
    
    .action-buttons {
        position: static;
        text-align: center;
        margin-bottom: 15px;
        opacity: 1;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .upload-area h4 {
        font-size: 1.5rem;
    }
}

/* Checkout Modal Styles - Children's Theme */
.modal-xl {
    max-width: 1200px;
}

.modal-content {
    border-radius: 25px;
    border: 3px solid #FF6B9D;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    box-shadow: 0 12px 24px rgba(255, 107, 157, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #FFE5F1 0%, #E5F3FF 100%);
    border-bottom: 3px solid #FF6B9D;
    border-radius: 22px 22px 0 0;
}

.modal-title {
    font-family: 'Fredoka One', cursive;
    color: #FF6B9D;
    font-size: 1.5rem;
}

.btn-close {
    background-size: 1.2em;
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* PDF Preview Styles */
.pdf-preview-container {
    border: 3px solid #E5F3FF;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
    position: relative;
    min-height: 400px;
}

.pdf-preview-loading {
    background: linear-gradient(135deg, #FFE5F1 0%, #E5F3FF 100%);
    border-radius: 12px;
    color: #FF6B9D;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
}

.pdf-preview {
    border: none;
    border-radius: 12px;
    background: white;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Book Details Card */
.book-details .card {
    border: 3px solid #96CEB4;
    border-radius: 15px;
    background: linear-gradient(135deg, #F0FFE5 0%, #ffffff 100%);
    box-shadow: 0 4px 8px rgba(150, 206, 180, 0.2);
}

.book-details .card-title {
    color: #4ECDC4;
    font-family: 'Fredoka One', cursive;
}

.book-details .card-text {
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    color: #333;
}

/* Checkout Options */
.checkout-option .card {
    border: 3px solid transparent;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkout-option .card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4, #45B7D1, #96CEB4);
    border-radius: 23px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkout-option .card:hover::before {
    opacity: 1;
}

.checkout-option .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.checkout-option .card-title {
    font-family: 'Fredoka One', cursive;
    color: #FF6B9D;
    margin-bottom: 8px;
}

.checkout-option .card-text {
    font-family: 'Comic Neue', cursive;
    color: #333;
    margin-bottom: 5px;
}

.price {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #4ECDC4;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Shipping Form Styles */
.shipping-form {
    background: linear-gradient(135deg, #F0FFE5 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #96CEB4;
}

.shipping-form h6 {
    color: #4ECDC4;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
}

.shipping-form .form-label {
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.shipping-form .form-control,
.shipping-form .form-select {
    border: 2px solid #E5F3FF;
    border-radius: 10px;
    padding: 10px 15px;
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

.shipping-form .form-control:focus,
.shipping-form .form-select:focus {
    border-color: #4ECDC4;
    box-shadow: 0 0 0 0.25rem rgba(78, 205, 196, 0.25);
    background: #ffffff;
}

.shipping-form .btn-success {
    background: linear-gradient(135deg, #96CEB4, #4ECDC4);
    border: none;
    border-radius: 15px;
    padding: 12px 20px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    box-shadow: 0 4px 8px rgba(150, 206, 180, 0.3);
    transition: all 0.3s ease;
}

.shipping-form .btn-success:hover {
    background: linear-gradient(135deg, #4ECDC4, #96CEB4);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(150, 206, 180, 0.4);
}

/* Modal Footer */
.modal-footer {
    border-top: 3px solid #FFE5F1;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border-radius: 0 0 22px 22px;
}

.modal-footer .btn-secondary {
    background: linear-gradient(135deg, #E0E0E0, #F5F5F5);
    border: none;
    border-radius: 15px;
    color: #666;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
}

.modal-footer .btn-secondary:hover {
    background: linear-gradient(135deg, #F5F5F5, #E0E0E0);
    transform: translateY(-1px);
}

/* Animation for form reveal */
.shipping-form {
    animation: slideDown 0.5s ease-out;
}

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

/* Responsive modal adjustments */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .modal-body .row {
        flex-direction: column;
    }
    
    .pdf-preview-container {
        min-height: 300px;
        margin-bottom: 20px;
    }
    
    .checkout-option .card-body {
        padding: 15px;
    }
    
    .price {
        font-size: 1.3rem;
    }
    
    .shipping-form {
        padding: 15px;
    }
}

/* Loading animations */
.loading-pulse {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

.processing-status.bg-primary {
    background: linear-gradient(135deg, #45B7D1, #4ECDC4) !important;
    color: white;
    animation: statusGlow 2s ease-in-out infinite;
}

@keyframes statusGlow {
    0% {
        box-shadow: 0 2px 4px rgba(69, 183, 209, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(69, 183, 209, 0.6);
    }
    100% {
        box-shadow: 0 2px 4px rgba(69, 183, 209, 0.3);
    }
}

/* Spinner improvements */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Upload area loading state */
.upload-area .spinner-border {
    border-color: #0d6efd;
    border-right-color: transparent;
}

/* Pulse animation for highlighting physical book option */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Wizard Progress Styles */
.wizard-progress {
    padding: 20px 0;
}

.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E5F3FF 0%, #FFE5F1 100%);
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E0E0E0, #F5F5F5);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step-label {
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #FF6B9D, #FF8E9B);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(255, 107, 157, 0.3);
}

.step.active .step-label {
    color: #FF6B9D;
    font-weight: bold;
}

.step.completed .step-number {
    background: linear-gradient(135deg, #96CEB4, #4ECDC4);
    color: white;
    box-shadow: 0 4px 8px rgba(150, 206, 180, 0.3);
}

.step.completed .step-label {
    color: #4ECDC4;
}

.step.completed .step-number::after {
    content: '✓';
    font-size: 1rem;
}

/* Wizard Step Animations */
.wizard-step {
    animation: fadeInSlide 0.5s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Payment Form Styles */
.payment-form {
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border-radius: 20px;
    padding: 30px;
    border: 3px solid #E5F3FF;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.payment-form h6 {
    color: #4ECDC4;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Stripe Payment Element Styling */
#payment-element {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid #E5F3FF;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

#payment-element:focus-within {
    border-color: #4ECDC4;
    box-shadow: 0 0 0 0.25rem rgba(78, 205, 196, 0.25);
}

#payment-errors {
    border-radius: 15px;
    border: none;
    background: linear-gradient(135deg, #FFE5E5, #FFF0F0);
    color: #D32F2F;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
}

/* Order Summary Card */
.payment-form .card {
    border: 3px solid #96CEB4;
    border-radius: 15px;
    background: linear-gradient(135deg, #F0FFE5 0%, #ffffff 100%);
    box-shadow: 0 4px 8px rgba(150, 206, 180, 0.2);
}

.payment-form .card-title {
    color: #4ECDC4;
    font-family: 'Fredoka One', cursive;
}

/* Success Message Styles */
.success-message {
    padding: 40px;
    background: linear-gradient(135deg, #F0FFE5 0%, #ffffff 100%);
    border-radius: 25px;
    border: 3px solid #96CEB4;
    box-shadow: 0 12px 24px rgba(150, 206, 180, 0.3);
}

.success-message h2 {
    font-family: 'Fredoka One', cursive;
    color: #4ECDC4;
    margin-bottom: 20px;
}

.success-message .alert-success {
    background: linear-gradient(135deg, #96CEB4, #FFEAA7);
    border: none;
    border-radius: 15px;
    color: #333;
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
}

/* Responsive wizard adjustments */
@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        padding: 10px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .payment-form,
    .shipping-form {
        padding: 20px;
    }
    
    .success-message {
        padding: 30px 20px;
    }
}

/* Mobile desktop tip toast */
.mobile-tip-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    max-width: 92%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

@media (min-width: 769px) {
    .mobile-tip-toast {
        display: none;
    }
}