/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100vh;
}

/* ========================================
   BACKGROUND IFRAME
   ======================================== */
#background-iframe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 0;
    pointer-events: none;
}

/* Fallback gradient if iframe is blocked */
#background-iframe:not([src]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    z-index: -1;
}

/* ========================================
   MODAL OVERLAY (UNCLOSEABLE)
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========================================
   MODAL CONTENT
   ======================================== */
.modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
    padding: 32px 24px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   MODAL HEADER
   ======================================== */
.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.2;
}

.modal-subtitle {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

/* ========================================
   CARDS CONTAINER
   ======================================== */
.cards-container {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

/* ========================================
   LOAN CARD
   ======================================== */
.loan-card {
    flex: 1;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.loan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #3b82f6;
}

/* ========================================
   BADGE
   ======================================== */
.badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.4);
}

/* ========================================
   CARD HEADER
   ======================================== */
.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: 8px;
    text-align: center;
}

.logo-container {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

/* ========================================
   CARD DETAILS
   ======================================== */
.card-details {
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0;
}

.detail-text {
    font-size: 14px;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.4;
}



.checkmark {
    color: #10b981;
    font-size: 18px;
    flex-shrink: 0;
}

/* ========================================
   APPROVAL TIME (Under Banner)
   ======================================== */
.approval-time {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    padding: 8px 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 6px;
    text-align: center;
    width: 100%;
}

/* ========================================
   FEATURES LIST
   ======================================== */
.features-list {
    margin-bottom: 16px;
    padding: 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item .checkmark {
    color: #10b981;
    font-size: 16px;
    flex-shrink: 0;
}

.feature-item .feature-text {
    font-size: 14px;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.4;
}

/* ========================================
   CTA BUTTON (WITH SHAKE ANIMATION)
   ======================================== */
.cta-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.5);
}

/* Shake Animation */
@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shake-btn {
    animation: shake 1.5s infinite;
}

/* ========================================
   MODAL FOOTER
   ======================================== */
.modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.modal-footer p {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN (MOBILE-FIRST)
   ======================================== */
@media (max-width: 768px) {
    .modal-content {
        padding: 16px 12px;
        border-radius: 16px;
        max-height: 95vh;
    }

    .modal-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .modal-subtitle {
        font-size: 13px;
    }

    .modal-header {
        margin-bottom: 20px;
    }

    /* Stack cards vertically on mobile */
    .cards-container {
        flex-direction: column;
        gap: 16px;
    }

    .loan-card {
        width: 100%;
        padding: 12px;
    }

    .logo-container {
        height: 100px;
        margin-bottom: 6px;
    }

    .logo-container img {
        padding: 12px;
    }

    .brand-name {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .approval-time {
        font-size: 13px;
        padding: 6px 12px;
    }

    .card-details {
        margin-bottom: 10px;
    }

    .detail-item {
        margin-bottom: 6px;
    }

    .detail-text {
        font-size: 13px;
    }

    .checkmark {
        font-size: 16px;
    }

    .feature-item {
        margin-bottom: 5px;
    }

    .feature-item .checkmark {
        font-size: 14px;
    }

    .feature-item .feature-text {
        font-size: 13px;
    }

    .features-list {
        margin-bottom: 12px;
    }

    .cta-button {
        padding: 12px 20px;
        font-size: 14px;
    }

    .modal-footer {
        padding-top: 16px;
    }

    .modal-footer p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 8px;
    }

    .modal-content {
        padding: 12px 10px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-header {
        margin-bottom: 16px;
    }

    .cards-container {
        gap: 12px;
    }

    .loan-card {
        padding: 10px;
    }

    .logo-container {
        height: 90px;
    }

    .logo-container img {
        padding: 10px;
    }

    .brand-name {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .approval-time {
        font-size: 12px;
        padding: 5px 10px;
    }

    .detail-text {
        font-size: 12px;
    }

    .feature-item .feature-text {
        font-size: 12px;
    }

    .badge {
        font-size: 10px;
        padding: 4px 12px;
    }
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}