:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --input-bg: #f1f5f9;
    --input-focus: #ffffff;
    --error-color: #ef4444;
    --success-color: #10b981;
    --font-family: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-x: hidden;
    position: relative;
}

/* Background light pattern */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.7;
}

.container {
    width: 100%;
    max-width: 800px;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

    .header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--text-main);
        margin-bottom: 0.5rem;
    }

    .header p {
        color: var(--text-muted);
        font-size: 1.1rem;
    }

.company-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 1rem;
    display: inline-block;
    border-radius: 8px; /* Optional for rounded corners on placeholder */
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: all 0.4s ease;
}

    .card h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: var(--primary-color);
    }

.subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Registration Form Header */
.form-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

    .form-header h2 {
        margin-bottom: 0;
    }

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

    .back-btn:hover {
        background: var(--input-bg);
        color: var(--primary-color);
    }

/* Sponsor Info Banner */
.sponsor-info-banner {
    background: rgba(37, 99, 235, 0.05);
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sponsor-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sponsor-name {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

    .form-row > .form-group {
        flex: 1;
        min-width: 200px;
    }

.form-group.full-width {
    flex: 100%;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input[type="text"], input[type="date"], input[type="tel"], input[type="email"], input[type="password"], select, textarea {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

    input:focus, select:focus, textarea:focus {
        background: var(--input-focus);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

textarea {
    resize: vertical;
}

fieldset {
    border: none;
    margin-bottom: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

    fieldset:first-of-type {
        border-top: none;
        padding-top: 0;
    }

legend {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    padding-bottom: 1.5rem;
}

.btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: var(--font-family);
}

    .btn:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
    }

    .btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.secondary-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

    .secondary-btn:hover {
        background: var(--input-bg);
        color: var(--text-main);
        transform: translateY(-2px);
        box-shadow: none;
    }

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}

.success-message {
    color: var(--success-color);
    font-size: 0.95rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Login Link Styles */
.login-link-container {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

    .login-link:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

/* Checkbox Styles */
.terms-container {
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    margin: 0;
}

    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 12px;
        cursor: pointer;
        accent-color: var(--primary-color);
    }

    .checkbox-label a {
        color: var(--primary-color);
        text-decoration: underline;
        font-weight: 600;
    }

.hidden {
    display: none !important;
}

/* Modal Styles */
.modal2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal2-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 2rem 1.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

    .modal2-content h2 {
        color: var(--primary-color);
        margin-bottom: 1.5rem;
    }

.modal2-body {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 1rem;
}

    .modal2-body p {
        margin-bottom: 1rem;
        line-height: 1.6;
        color: var(--text-muted);
    }

        .modal2-body p strong {
            color: var(--text-main);
        }

.close-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

    .close-btn:hover {
        color: var(--error-color);
    }

/* Success Modal specific */
.text-center {
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--success-color);
}

.activation-box {
    background: var(--input-bg);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

.charge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

    .charge-header h3 {
        color: var(--primary-color);
        font-size: 1.1rem;
        margin-bottom: 0;
    }

.charge-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
}

.modal2-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Account Details Box in Modal */
.account-details-box {
    background: var(--input-bg);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

    .account-details-box h3 {
        color: var(--primary-color);
        font-size: 1.1rem;
        margin-bottom: 1rem;
        text-align: center;
    }

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

    .detail-row:last-child {
        border-bottom: none;
    }

.detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    color: var(--text-main);
    font-weight: 600;
}

/* Gateway Modal Styles */
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gateway-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    color: var(--text-main);
}

    .gateway-card:hover {
        border-color: var(--primary-color);
        background: var(--card-bg);
        transform: translateY(-3px);
        box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.15);
    }

.gateway-icon {
    font-size: 2rem;
}

.gateway-card span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

.slide-down {
    animation: slideDown 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

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

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

/* Responsive */
@media (max-width: 640px) {
    .card {
        padding: 1.5rem;
    }

    .form-row {
        gap: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .modal2-actions {
        flex-direction: column-reverse; /* Put primary button on top */
    }

    .charge-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gateway-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Global Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

    .loader-overlay.hidden {
        opacity: 0;
        visibility: hidden;
        /* We keep display: flex via transition so it fades out smoothly */
    }

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loader-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

.alert {
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem
}

.alert-heading {
    color: inherit
}

.alert-link {
    font-weight: 700
}

.alert-dismissible .close {
    position: relative;
    top: -.75rem;
    right: -1.25rem;
    padding: .75rem 1.25rem;
    color: inherit
}

.alert-primary {
    color: #004085;
    background-color: #cce5ff;
    border-color: #b8daff
}

    .alert-primary hr {
        border-top-color: #9fcdff
    }

    .alert-primary .alert-link {
        color: #002752
    }

.alert-secondary {
    color: #464a4e;
    background-color: #e7e8ea;
    border-color: #dddfe2
}

    .alert-secondary hr {
        border-top-color: #cfd2d6
    }

    .alert-secondary .alert-link {
        color: #2e3133
    }

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb
}

    .alert-success hr {
        border-top-color: #b1dfbb
    }

    .alert-success .alert-link {
        color: #0b2e13
    }

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb
}

    .alert-info hr {
        border-top-color: #abdde5
    }

    .alert-info .alert-link {
        color: #062c33
    }

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba
}

    .alert-warning hr {
        border-top-color: #ffe8a1
    }

    .alert-warning .alert-link {
        color: #533f03
    }

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb
}

    .alert-danger hr {
        border-top-color: #f1b0b7
    }

    .alert-danger .alert-link {
        color: #491217
    }

.alert-light {
    color: #818182;
    background-color: #fefefe;
    border-color: #fdfdfe
}

    .alert-light hr {
        border-top-color: #ececf6
    }

    .alert-light .alert-link {
        color: #686868
    }

.alert-dark {
    color: #1b1e21;
    background-color: #d6d8d9;
    border-color: #c6c8ca
}

    .alert-dark hr {
        border-top-color: #b9bbbe
    }

    .alert-dark .alert-link {
        color: #040505
    }


/* ========================== Offer Cards Start ========================== */
.offer-cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.offer-card {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

    .offer-card:hover {
        border-color: var(--primary-color);
        background: var(--card-bg);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px -5px rgba(37, 99, 235, 0.15);
    }

    .offer-card.selected {
        border-color: var(--primary-color);
        background: rgba(37, 99, 235, 0.05);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

        .offer-card.selected .radio-indicator {
            background: var(--primary-color);
            border-color: var(--primary-color);
        }

            .offer-card.selected .radio-indicator::after {
                opacity: 1;
            }

.offer-info {
    flex: 1;
}

.offer-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.offer-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.offer-price-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.offer-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.offer-price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.discount-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Radio Indicator */
.radio-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .radio-indicator::after {
        content: '';
        width: 12px;
        height: 12px;
        background: white;
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

/* Exclusive Blink Badge */
.exclusive-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: blink 1.5s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    z-index: 10;
}

/* Selected Offer Display */
.selected-offer-display {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    display: none;
}

    .selected-offer-display.show {
        display: block;
    }

    .selected-offer-display p {
        margin: 0;
        color: var(--text-main);
        font-weight: 500;
    }

@media (max-width: 480px) {
    .offer-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .offer-price-section {
        align-items: flex-start;
        width: 100%;
        margin-top: 1rem;
    }

    .radio-indicator {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* ========================== Offer Cards End ========================== */