* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.container {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: containerShimmer 3s infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes containerShimmer {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: headerShimmer 4s infinite;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: headerPulse 6s infinite;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    animation: titleGlow 3s infinite alternate;
}

@keyframes headerShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes headerPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes titleGlow {
    0% { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.2); }
    100% { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.4); }
}

.subheader {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.form-section {
    background: #f88c8c;
    padding: 40px;
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
}

/* Full Page Background Three Logo Watermark */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #ff8e8e 0%, #ffb3ba 100%);
    opacity: 0.2;
    z-index: -2;
}

/* Background Three Logo Watermark */
.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ff8e8e 0%, #ffb3ba 100%);
    border-radius: 0 0 20px 20px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 3;
}

.form-header h2 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.details-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 3;
}

.form-group {
    display: flex;
    flex-direction: column;
    animation: formGroupSlideIn 0.8s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

@keyframes formGroupSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group label {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #999;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.payment-logos {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    animation: logosFadeIn 1s ease-out 0.6s both;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-item:nth-child(1) { animation-delay: 0s; }
.logo-item:nth-child(2) { animation-delay: 0.5s; }
.logo-item:nth-child(3) { animation-delay: 1s; }

.logo-item i {
    font-size: 32px;
    color: #333;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-item span {
    font-size: 10px;
    font-weight: 600;
    color: #333;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-item:hover {
    transform: translateY(-5px);
}

.logo-item:hover i {
    opacity: 1;
    transform: scale(1.2);
    color: #007bff;
    text-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.logo-item:hover span {
    opacity: 1;
    color: #007bff;
}

@keyframes logosFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.info-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 0 0 20px 20px;
}

.order-summary {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.order-summary h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.business-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .label {
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.detail-item .value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.privacy-info {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.privacy-info h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.privacy-info ul {
    list-style: none;
    padding: 0;
}

.privacy-info li {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.privacy-info li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Card Input Container */
.card-input-container {
    position: relative;
}

.card-input-container input {
    padding-right: 200px; /* Make space for the indicator */
    position: relative;
    z-index: 2;
}

/* Card Type Indicator */
.card-type-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #007bff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 10;
    min-width: 120px;
}

.card-type-indicator.detecting {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    animation: indicatorPulse 0.6s ease-in-out infinite alternate;
}

.card-type-indicator.detected {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    animation: indicatorSuccess 0.8s ease-out;
}

.card-icon {
    font-size: 18px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.card-type-text {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Detection Dots */
.detection-dots {
    display: none;
    gap: 3px;
    align-items: center;
}

.detection-dots.show {
    display: flex;
}

.detection-dots .dot {
    width: 6px;
    height: 6px;
    background: #007bff;
    border-radius: 50%;
    animation: dotPulse 1.2s infinite ease-in-out both;
}

.detection-dots .dot:nth-child(1) { animation-delay: -0.24s; }
.detection-dots .dot:nth-child(2) { animation-delay: -0.12s; }
.detection-dots .dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.4;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes indicatorPulse {
    0% { transform: translateY(-50%) scale(1); }
    100% { transform: translateY(-50%) scale(1.05); }
}

@keyframes indicatorSuccess {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

/* Processing and Submitted Overlays */
.processing-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.processing-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: white;
}

.processing-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.submitted-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    animation: slideInUp 0.6s ease-out;
}

.submitted-content .success-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
    animation: successBounce 0.8s ease-out;
}

.submitted-content h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: white;
}

.submitted-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    line-height: 1.5;
}

.submitted-content .close-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submitted-content .close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

@keyframes successBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header {
        padding: 25px 20px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .payment-logos {
        gap: 15px;
    }
    
    .logo-item i {
        font-size: 28px;
    }
    
    .info-section {
        padding: 20px;
    }
}
