:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(45deg, #ffd700, #ffed4e);
    --success-gradient: linear-gradient(45deg, #56ab2f, #a8e6cf);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 15px 35px rgba(0, 0, 0, 0.15);
    --border-radius: 20px;
    --border-radius-small: 15px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--primary-gradient);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(1deg); }
    66% { transform: translate(20px, -10px) rotate(-1deg); }
}

.container-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lucky-draw-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lucky-draw-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Header styles */
.header-section {
    text-align: center;
    margin-bottom: 2rem;
}

.lucky-icon {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
    margin-bottom: 1rem;
}

.main-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    letter-spacing: -0.025em;
}

.subtitle {
    color: #718096;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Receipt upload section */
.receipt-upload-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: var(--border-radius-small);
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.receipt-upload-section:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.7);
}

.receipt-upload-section.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-area {
    cursor: pointer;
    padding: 1rem;
}

.upload-icon {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.upload-text {
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.upload-subtext {
    color: #718096;
    font-size: 0.875rem;
}

.file-input {
    display: none;
}

.upload-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.upload-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #667eea;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

/* Image preview */
.image-preview {
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-light);
    margin-bottom: 0.5rem;
}

.remove-image {
    background: #f56565;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: #e53e3e;
    transform: scale(1.1);
}

/* Processing indicator */
.processing-indicator {
    display: none;
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--border-radius-small);
    color: #667eea;
}

.processing-indicator.show {
    display: block;
}

/* Form styles */
.form-floating {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-floating > .form-control {
    border-radius: var(--border-radius-small);
    border: 2px solid rgba(102, 126, 234, 0.1);
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-floating > .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.form-floating > label {
    padding-left: 3rem;
    color: #718096;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-floating > label i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    width: 16px;
    text-align: center;
}

/* Auto-filled fields styling */
.form-control.auto-filled {
    background: rgba(86, 171, 47, 0.1);
    border-color: rgba(86, 171, 47, 0.3);
}

/* Button styles */
.submit-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius-small);
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    color: white;
}

.submit-btn::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;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

/* Success alert */
.success-alert {
    border-radius: var(--border-radius-small);
    border: none;
    background: var(--success-gradient);
    color: white;
    padding: 1rem;
    margin-top: 1.5rem;
    animation: slideIn 0.5s ease-out;
    box-shadow: var(--shadow-light);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin link */
.admin-link {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    z-index: 1000;
}

.admin-link:hover {
    background: rgba(255, 255, 255, 1);
    color: #764ba2;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Enhanced Warning and Alert Styles */
.validation-message {
    margin: 1rem 0;
    animation: fadeInSlide 0.4s ease-out;
}

.validation-message .alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.validation-message .alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #eab308, #f59e0b);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.validation-message .alert-warning {
    color: #92400e;
    font-weight: 500;
}

.validation-message .alert i {
    color: #f59e0b;
    font-size: 1.1em;
    margin-right: 0.75rem;
}

.validation-message strong {
    color: #78350f;
    font-weight: 600;
}

.validation-message small {
    display: block;
    margin-top: 0.5rem;
    color: #a16207;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Enhanced Need More Amount Button */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-warning::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 ease;
}

.btn-warning:hover::before {
    left: 100%;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #ca8a04 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-warning:disabled {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    opacity: 0.9;
    transform: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Minimum Spending Alert Box */
.minimum-spending-alert {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 1px solid #f59e0b;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.minimum-spending-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #eab308, #d97706);
}

.minimum-spending-alert .alert-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.minimum-spending-alert h5 {
    color: #78350f;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.minimum-spending-alert p {
    color: #92400e;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.spending-progress {
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.75rem 0;
}

.spending-progress .progress-bar {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.spending-progress .progress-fill {
    background: linear-gradient(90deg, #f59e0b, #eab308);
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.spending-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
    color: #78350f;
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Success Alert Enhancement */
.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
    border-left: 4px solid #059669;
    color: #065f46;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Error Alert Enhancement */
.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    border-left: 4px solid #dc2626;
    color: #7f1d1d;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Info Alert Enhancement */
.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #3b82f6;
    border-left: 4px solid #2563eb;
    color: #1e3a8a;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .validation-message .alert {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .minimum-spending-alert {
        padding: 1.25rem;
    }
    
    .minimum-spending-alert .alert-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .validation-message .alert {
        background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
        color: #fbbf24;
        border-left-color: #f59e0b;
    }
    
    .minimum-spending-alert {
        background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
        border-color: #f59e0b;
        color: #fbbf24;
    }
}

.lucky-draw-container {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border-radius: 20px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
        max-width: 500px; /* Increased from 400px */
        margin: 0 auto;
        padding: 1.5rem;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* Enhanced receipt upload section */
    .receipt-upload-section {
        margin-bottom: 1.5rem;
        padding: 1rem;
        border: 2px dashed rgba(102, 126, 234, 0.3);
        border-radius: 15px;
        text-align: center;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(10px);
    }

    .receipt-upload-section:hover {
        border-color: rgba(102, 126, 234, 0.5);
        background: rgba(255, 255, 255, 0.7);
    }

    .upload-area {
        cursor: pointer;
        padding: 1rem;
    }

    .upload-icon {
        color: #667eea;
        margin-bottom: 0.5rem;
    }

    .upload-text {
        color: #4a5568;
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

    .upload-subtext {
        color: #718096;
        font-size: 0.875rem;
    }

    .file-input {
        display: none;
    }

    .upload-buttons {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        margin-top: 1rem;
    }

    .upload-btn {
        background: rgba(102, 126, 234, 0.1);
        border: 1px solid rgba(102, 126, 234, 0.3);
        border-radius: 8px;
        padding: 0.5rem 1rem;
        color: #667eea;
        font-size: 0.875rem;
        font-weight: 500;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .upload-btn:hover {
        background: rgba(102, 126, 234, 0.2);
        border-color: rgba(102, 126, 234, 0.5);
    }

    /* Optimized receipts container */
    .receipts-container {
        max-height: 350px; /* Reduced from 400px */
        overflow-y: auto;
        margin-bottom: 1rem;
        border: 1px solid rgba(102, 126, 234, 0.1);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.3);
        scrollbar-width: thin;
        scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    }

    /* Custom scrollbar for webkit browsers */
    .receipts-container::-webkit-scrollbar {
        width: 6px;
    }

    .receipts-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .receipts-container::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 3px;
    }

    .receipts-container::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.5);
    }

    /* Compact receipt cards */
    .receipt-card {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(102, 126, 234, 0.15);
        border-radius: 10px;
        padding: 0.75rem; /* Reduced from 1rem */
        margin: 0.5rem; /* Reduced margin */
        transition: all 0.3s ease;
        animation: slideInUp 0.3s ease-out;
    }

    .receipt-card:hover {
        border-color: rgba(102, 126, 234, 0.4);
        background: rgba(255, 255, 255, 1);
        transform: translateY(-2px);
    }

    .receipt-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem; /* Reduced from 1rem */
    }

    .receipt-number-badge {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
        padding: 0.2rem 0.6rem; /* Reduced padding */
        border-radius: 15px;
        font-size: 0.8rem; /* Reduced font size */
        font-weight: 600;
    }

    .receipt-actions {
        display: flex;
        gap: 0.25rem; /* Reduced gap */
    }

    .action-btn {
        background: none;
        border: 1px solid rgba(245, 101, 101, 0.3);
        border-radius: 5px;
        padding: 0.2rem 0.4rem; /* Reduced padding */
        color: #e53e3e;
        font-size: 0.7rem; /* Reduced font size */
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .action-btn:hover {
        background: rgba(245, 101, 101, 0.1);
        border-color: rgba(245, 101, 101, 0.5);
    }

    /* Compact receipt preview */
    .receipt-preview {
        display: flex;
        gap: 0.75rem; /* Reduced gap */
        align-items: center;
    }

    .receipt-image {
        width: 60px; /* Reduced from 80px */
        height: 60px; /* Reduced from 80px */
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid rgba(102, 126, 234, 0.2);
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .receipt-image:hover {
        transform: scale(1.05);
    }

    .receipt-details {
        flex: 1;
        text-align: left;
    }

    .receipt-detail-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.3rem; /* Reduced from 0.5rem */
        font-size: 0.8rem; /* Reduced font size */
    }

    .detail-label {
        color: #718096;
        font-weight: 500;
        min-width: 70px; /* Ensure consistent alignment */
    }

    .detail-value {
        color: #2d3748;
        font-weight: 600;
        text-align: right;
        word-break: break-word;
    }

    /* Enhanced summary section */
    .receipts-summary {
        background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(102, 126, 234, 0.05));
        border-radius: 10px;
        padding: 0.75rem;
        margin: 0.5rem;
        text-align: center;
        color: #667eea;
        font-weight: 600;
        font-size: 0.85rem; /* Slightly smaller to accommodate token info */
        border: 1px solid rgba(102, 126, 234, 0.2);
        line-height: 1.4;
    }

    /* Improved continue button */
    .continue-btn {
        background: linear-gradient(45deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
        border: none;
        border-radius: 10px;
        padding: 0.75rem 1.5rem;
        color: white;
        font-weight: 600;
        transition: all 0.3s ease;
        width: calc(100% - 1rem);
        margin: 0.5rem;
        font-size: 0.9rem;
        position: sticky;
        bottom: 0;
        backdrop-filter: blur(10px);
    }

    .continue-btn:hover {
        background: linear-gradient(45deg, rgba(102, 126, 234, 1), rgba(118, 75, 162, 1));
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    }

    /* Processing indicator */
    .processing-indicator {
        display: none;
        text-align: center;
        padding: 0.75rem; /* Reduced padding */
        margin-top: 1rem;
        background: rgba(102, 126, 234, 0.1);
        border-radius: 10px;
        color: #667eea;
        border: 1px solid rgba(102, 126, 234, 0.2);
        font-size: 0.875rem;
        transition: all 0.3s ease;
    }

    .processing-indicator.show {
        display: block;
        animation: slideInUp 0.3s ease-out;
    }

    /* Compression success styling */
    .compressed-indicator {
        background: rgba(16, 185, 129, 0.1) !important;
        border-color: rgba(16, 185, 129, 0.2) !important;
        color: #10B981 !important;
    }

    /* Personal details section */
    .personal-details-section {
        display: none;
        animation: slideInUp 0.5s ease-out;
    }

    .personal-details-section.show {
        display: block;
    }

    .section-divider {
        border-top: 2px solid rgba(102, 126, 234, 0.2);
        margin: 1.5rem 0; /* Reduced margin */
        position: relative;
    }

    .section-divider::after {
        content: 'Personal Details';
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(255, 255, 255, 0.95);
        padding: 0 1rem;
        color: #667eea;
        font-weight: 600;
        font-size: 0.875rem;
    }

    /* Form styles */
    .form-floating {
        position: relative;
        margin-bottom: 1rem; /* Reduced from 1.25rem */
    }

    .form-floating > .form-control {
        border-radius: 12px; /* Reduced from 15px */
        border: 2px solid rgba(102, 126, 234, 0.1);
        padding: 0.875rem 0.875rem 0.875rem 2.5rem; /* Reduced padding */
        font-size: 0.95rem; /* Reduced font size */
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
    }

    .form-floating > .form-control:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        background: rgba(255, 255, 255, 0.95);
        transform: translateY(-1px);
    }

    .form-floating > label {
        padding-left: 2.5rem; /* Adjusted for reduced input padding */
        color: #718096;
        font-weight: 500;
        font-size: 0.8rem; /* Reduced font size */
    }

    .form-floating > label i {
        position: absolute;
        left: 0.875rem; /* Adjusted for reduced input padding */
        top: 50%;
        transform: translateY(-50%);
        color: #667eea;
        width: 16px;
        text-align: center;
    }

    /* Submit button */
    .submit-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        border-radius: 12px; /* Reduced from 15px */
        padding: 0.875rem 1.5rem; /* Reduced padding */
        font-weight: 600;
        font-size: 0.95rem; /* Reduced font size */
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
        width: 100%;
        position: relative;
        overflow: hidden;
        color: white;
    }

    .submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    }

    /* Success alert */
    .success-alert {
        border-radius: 12px; /* Reduced from 15px */
        border: none;
        background: linear-gradient(45deg, #56ab2f, #a8e6cf);
        color: white;
        padding: 0.875rem; /* Reduced padding */
        margin-top: 1rem; /* Reduced margin */
        animation: slideInUp 0.5s ease-out;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        font-size: 0.9rem;
    }

    /* Fixed image modal styles */
    .image-modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
    }

    .image-modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease-out;
        padding: 20px; /* Add padding to prevent touching edges */
    }

    .modal-content {
        object-fit: contain; /* Maintain aspect ratio */
        border-radius: 10px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        background: white;
    }

    .modal-close {
        position: absolute;
        top: 20px;
        right: 30px;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 1001; /* Ensure it's above the image */
    }

    .modal-close:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: scale(1.1);
    }

    /* Ensure receipt thumbnail maintains aspect ratio too */
    .receipt-image {
        width: 60px;
        height: 60px;
        object-fit: cover; /* This crops to fit the square */
        border-radius: 6px;
        border: 1px solid rgba(102, 126, 234, 0.2);
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .receipt-image:hover {
        transform: scale(1.05);
    }

    /* Mobile optimizations for modal */
    @media (max-width: 576px) {
        .image-modal.show {
            padding: 10px;
        }
        
        .modal-close {
            top: 10px;
            right: 15px;
            width: 35px;
            height: 35px;
            font-size: 1.5rem;
        }
    }

    /* Token usage styles */
    .token-usage-row {
        border-top: 1px solid rgba(102, 126, 234, 0.1);
        padding-top: 0.25rem;
        margin-top: 0.25rem;
    }
    
    .token-count {
        color: #667eea !important;
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    /* Token usage tooltip styles */
    .token-count[title]:hover {
        cursor: help;
    }

    /* Enhanced upload options styling */
    .upload-options {
        margin-top: 0.5rem;
        text-align: center;
        min-height: 1rem; /* Ensure space for estimate text */
    }
    
    #costEstimate {
        font-weight: 500;
        font-size: 0.75rem;
        transition: all 0.3s ease;
        display: inline-block;
        padding: 0.25rem 0.5rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(102, 126, 234, 0.2);
    }

    /* Countdown Timer Styles */
    .countdown-section {
        margin-top: 1.5rem;
        padding: 1rem;
        background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(255, 215, 0, 0.1));
        border-radius: 15px;
        border: 1px solid rgba(102, 126, 234, 0.2);
    }

    .countdown-label {
        color: #667eea;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .countdown-timer {
        display: flex;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .countdown-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 50px;
    }

    .countdown-number {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        font-size: 1.25rem;
        font-weight: 700;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
        min-width: 40px;
        text-align: center;
        box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
        animation: pulse 2s infinite;
    }

    .countdown-text {
        color: #718096;
        font-size: 0.7rem;
        font-weight: 500;
        margin-top: 0.25rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Pulse animation for countdown numbers */
    @keyframes pulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.05);
        }
    }

    /* Countdown expired state */
    .countdown-expired {
        background: linear-gradient(45deg, rgba(245, 101, 101, 0.1), rgba(245, 101, 101, 0.05)) !important;
        border-color: rgba(245, 101, 101, 0.2) !important;
    }

    .countdown-expired .countdown-label {
        color: #e53e3e !important;
    }

    .countdown-expired .countdown-number {
        background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%) !important;
    }

    /* Mobile responsiveness for countdown */
    @media (max-width: 576px) {
        .countdown-timer {
            gap: 0.5rem;
        }
        
        .countdown-item {
            min-width: 40px;
        }
        
        .countdown-number {
            font-size: 1rem;
            padding: 0.4rem 0.6rem;
            min-width: 35px;
        }
        
        .countdown-text {
            font-size: 0.65rem;
        }
    }

    /* Multi-step form styles */
    .step-indicator {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
        position: relative;
    }

    .step {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
        position: relative;
    }

    .step-number {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        background: rgba(102, 126, 234, 0.2);
        color: #667eea;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        transition: all 0.3s ease;
        border: 2px solid rgba(102, 126, 234, 0.2);
    }

    .step.active .step-number {
        background: #667eea;
        color: white;
        border-color: #667eea;
    }

    .step.completed .step-number {
        background: #10B981;
        color: white;
        border-color: #10B981;
    }

    .step-title {
        font-size: 0.75rem;
        font-weight: 500;
        color: #718096;
        text-align: center;
    }

    .step.active .step-title {
        color: #667eea;
        font-weight: 600;
    }

    .step.completed .step-title {
        color: #10B981;
    }

    .step-line {
        position: absolute;
        top: 17px;
        left: 50%;
        right: -50%;
        height: 2px;
        background: rgba(102, 126, 234, 0.2);
        z-index: -1;
    }

    .step:last-child .step-line {
        display: none;
    }

    .step.completed .step-line {
        background: #10B981;
    }

    /* Step content styles */
    .step-content {
        display: none;
        animation: slideInUp 0.5s ease-out;
    }

    .step-content.active {
        display: block;
    }

    .step-actions {
        display: flex;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .btn-back {
        background: rgba(102, 126, 234, 0.1);
        border: 1px solid rgba(102, 126, 234, 0.3);
        color: #667eea;
        border-radius: 12px;
        padding: 0.875rem 1.5rem;
        font-weight: 600;
        transition: all 0.3s ease;
        flex: 1;
    }

    .btn-back:hover {
        background: rgba(102, 126, 234, 0.2);
        border-color: rgba(102, 126, 234, 0.5);
    }

    .btn-next {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        border-radius: 12px;
        padding: 0.875rem 1.5rem;
        font-weight: 600;
        transition: all 0.3s ease;
        flex: 2;
    }

    .btn-next:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    }

    .btn-next:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    /* User status indicator */
    .user-status-indicator {
        background: rgba(16, 185, 129, 0.1);
        border: 1px solid rgba(16, 185, 129, 0.2);
        border-radius: 10px;
        padding: 0.75rem;
        margin-bottom: 1rem;
        color: #10B981;
        font-size: 0.875rem;
        font-weight: 500;
        text-align: center;
    }

    .new-user-indicator {
        background: rgba(102, 126, 234, 0.1) !important;
        border-color: rgba(102, 126, 234, 0.2) !important;
        color: #667eea !important;
    }

    /* Enhanced form styles for steps */
    .form-step {
        min-height: 200px;
    }

    .form-row {
        display: flex;
        gap: 1rem;
    }

    .form-row .form-floating {
        flex: 1;
    }

    /* Fix for interests section */
    .interests-container {
        border: 2px solid rgba(102, 126, 234, 0.1);
        border-radius: 12px;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.8);
        margin-bottom: 1rem;
    }

    .interests-label {
        color: #667eea;
        font-weight: 600;
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .interests-label i {
        font-size: 1rem;
    }

    .form-check {
        margin-bottom: 0.5rem;
    }

    .form-check-input {
        margin-top: 0.125rem;
    }

    .form-check-label {
        margin-left: 0.25rem;
        color: #374151;
        font-weight: 500;
    }

    /* Button warning state */
    .btn-warning {
        background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
        border: none !important;
        color: white !important;
        cursor: not-allowed !important;
    }

    /* Amount highlighting */
    .high-amount {
        color: #10B981 !important;
        font-weight: 600 !important;
    }
    
    .medium-amount {
        color: #F59E0B !important;
        font-weight: 600 !important;
    }

    /* Validation message */
    .validation-message {
        margin-top: 1rem;
        animation: slideInUp 0.5s ease-out;
    }

    .validation-message .alert {
        border-radius: 12px;
        border: 1px solid #F59E0B;
        background: rgba(245, 158, 11, 0.1);
        color: #92400E;
    }

    .validation-message .alert strong {
        color: #78350F;
    }

    /* Enhanced summary styling */
    #summaryText {
        transition: color 0.3s ease;
    }
    
    /* Updated logo styles - Made bigger */
    .logo-container {
        position: relative;
        display: inline-block;
        margin-bottom: 1.5rem; /* Increased margin for spacing */
    }

    .karamunsing-logo {
        width: 180px; /* Increased from 120px */
        height: auto;
        max-height: 120px; /* Increased from 80px */
        object-fit: contain;
        border-radius: 16px; /* Slightly larger border radius */
        padding: 16px; /* Increased padding */
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
        border: 3px solid rgba(102, 126, 234, 0.3); /* Thicker border */
        transition: all 0.3s ease;
        /* Dark background to complement the white text logo */
        background: linear-gradient(135deg, #2d3748, #4a5568);
    }

    .karamunsing-logo:hover {
        transform: translateY(-3px); /* More pronounced hover effect */
        box-shadow: 0 16px 45px rgba(0, 0, 0, 0.3);
        border-color: rgba(102, 126, 234, 0.5);
        background: linear-gradient(135deg, #1a202c, #2d3748);
    }

    /* Alternative styling if you prefer a cleaner look */
    .karamunsing-logo.clean-style {
        background: #2d3748;
        border: none;
        box-shadow: 0 8px 25px rgba(45, 55, 72, 0.4);
        padding: 12px 20px; /* Increased padding */
    }

    .karamunsing-logo.clean-style:hover {
        background: #1a202c;
        box-shadow: 0 12px 35px rgba(45, 55, 72, 0.5);
    }

    /* Keep the receipt counter positioning - adjusted for larger logo */
    .receipt-counter {
        position: absolute;
        top: -8px; /* Adjusted position for larger logo */
        right: -8px;
        background: linear-gradient(135deg, #ff6b6b, #ee5a52);
        color: white;
        border-radius: 50%;
        width: 28px; /* Slightly bigger counter */
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem; /* Slightly larger font */
        font-weight: 700;
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
        border: 3px solid white; /* Thicker border */
        animation: bounce 2s infinite;
        z-index: 10;
    }

    /* Fallback gift icon styling - also made bigger */
    .logo-fallback {
        display: none;
        color: #FFD700;
        filter: drop-shadow(0 6px 12px rgba(255, 215, 0, 0.4));
        animation: bounce 2s infinite;
        font-size: 4rem !important; /* Made fallback icon bigger too */
    }

    /* Mobile responsive adjustments */
    @media (max-width: 768px) {
        .karamunsing-logo {
            width: 140px; /* Larger on mobile too */
            max-height: 90px;
            padding: 12px 16px;
        }
        
        .receipt-counter {
            width: 24px;
            height: 24px;
            font-size: 0.7rem;
            top: -6px;
            right: -6px;
            border: 2px solid white;
        }

        .logo-fallback {
            font-size: 3rem !important; /* Smaller but still bigger on mobile */
        }
    }

    @media (max-width: 480px) {
        .karamunsing-logo {
            width: 200px; /* Still reasonable on very small screens */
            max-height: 75px;
            padding: 10px 14px;
        }

        .logo-fallback {
            font-size: 2.5rem !important;
        }
    }

    /* Dark theme compatibility */
    @media (prefers-color-scheme: dark) {
        .karamunsing-logo {
            border-color: rgba(255, 255, 255, 0.3);
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
        }
        
        .karamunsing-logo:hover {
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5);
        }
    }

    /* Enhanced header section spacing for bigger logo */
    .header-section {
        text-align: center;
        margin-bottom: 2rem;
    }

    .main-title {
        margin-top: 0.5rem; /* Added spacing after larger logo */
        font-size: 2.5rem;
        font-weight: 700;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 1rem;
    }

/* PDF Generation Styles */
.digital-ticket {
    background: white !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    width: 100% !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Ensure ticket content starts from top on mobile PDF */
@media screen and (max-width: 768px) {
    .digital-ticket {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .modal-body {
        padding: 0 !important;
    }
    
    #ticketContent {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        margin: 0 !important;
    }
}