body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f4f4f4;
}

header, footer {
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

main {
    min-height: 400px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.recharge-container {
    max-width: 550px;
    margin: 0 auto 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flow-title {
    text-align: center;
    color: #555;
    font-size: 32px;
    margin: 20px 0 30px;
    font-weight: 400;
}

.tabs {
    display: flex;
    margin-bottom: 15px;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tab.active {
    background: #00A9E0;
    color: #fff;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 169, 224, 0.3);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #00A9E0;
}

.tab.inactive {
    background: #f4f4f4;
    color: #999;
    border: 1px solid #eee;
}

.tab-icon {
    width: 20px;
    height: 20px;
}

.step-content {
    padding: 15px 40px;
}

.tab-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.step {
    display: none;
}

.step[style*="display: block"] {
    display: block;
}

.input-group {
    margin-bottom: 20px;
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: bold;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    border: 1px solid #999;
    border-radius: 8px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-wrapper.valid {
    border-color: #7ECA11;
    box-shadow: 0 0 0 1px #7ECA11;
}

.input-wrapper.invalid {
    border-color: #ff4d4d;
    box-shadow: 0 0 0 1px #ff4d4d;
}

.input-wrapper input {
    border: none;
    width: 100%;
    font-size: 16px;
    outline: none;
    color: #333;
    padding: 10px 0;
    background: transparent;
}

.input-wrapper .label-floating {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 14px;
    color: #999;
    pointer-events: none;
    transition: all 0.2s ease;
    background: white;
    padding: 0 5px;
}

.input-wrapper input:focus + .label-floating,
.input-wrapper input:not(:placeholder-shown) + .label-floating {
    top: -10px;
    left: 15px;
    font-size: 12px;
    color: #00A9E0;
}

.input-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.btn-primary {
    background: #7ECA11;
    color: #fff;
    border: none;
    padding: 12px 60px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    width: 100%;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #6ab00e;
}

.back-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00A9E0;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 16px;
}

.amount-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.amount-item {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s ease;
}

.amount-item:hover {
    border-color: #00A9E0;
    background: #eef9ff;
}

.amount-item.selected {
    border-color: #00A9E0;
    background: #eef9ff;
}

.summary-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-row span:last-child {
    font-weight: bold;
}

.payment-option {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.payment-option:hover {
    border-color: #00A9E0;
}

.payment-option .left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-details {
    font-size: 12px;
    color: #666;
}

.card-form {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.card-visual {
    perspective: 1000px;
    margin-bottom: 20px;
    height: 180px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-visual.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
    background: linear-gradient(135deg, #102B3F 0%, #1a3d5a 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-back {
    transform: rotateY(180deg);
    padding: 0;
}

.card-front .chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #FFD700 0%, #daa520 100%);
    border-radius: 6px;
    margin-bottom: 20px;
}

.card-front .number-display {
    font-size: 18px;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    height: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-front .bottom-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: absolute;
    bottom: 50px;
    left: 20px;
    right: 20px;
}

.card-front .name-display {
    font-size: 12px;
    text-transform: uppercase;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-front .expiry-display {
    font-size: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-front .brand-logo {
    position: absolute;
    bottom: 10px;
    right: 15px;
    width: 45px;
    height: 28px;
    transition: all 0.3s ease;
}

.card-front .brand-logo[src*="amex2.png"] {
    width: 40px !important;
    height: 25px !important;
}

.card-back .black-bar {
    background: #000;
    height: 35px;
    width: 100%;
    margin-top: 15px;
}

.card-back .signature-bar {
    background: #fff;
    height: 30px;
    width: 80%;
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
    font-style: italic;
    font-weight: bold;
}

.card-back .cvv-display {
    background: #fff;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 10px auto;
    width: fit-content;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

#payment-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #00A9E0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loader-logo {
    width: 100px;
    margin-bottom: 20px;
}

.loader-text {
    color: #003366;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
}

.loader-subtext {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#payment-success {
    display: none;
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: #7ECA11;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: 0 auto 15px;
}

#amex-cvv-container {
    margin-top: 0;
}

#amex-cvv-container .input-group {
    margin-bottom: 0;
}

.post-form-content {
    width: min(1120px, calc(100% - 32px));
    margin: 40px auto 30px;
    text-align: center;
}

.post-form-header {
    background: linear-gradient(135deg, #fff 0%, #eef9ff 100%);
    border: 1px solid rgba(0, 169, 224, 0.18);
    border-radius: 12px;
    padding: 28px 20px;
    box-shadow: 0 12px 30px rgba(0, 64, 96, 0.08);
}

.post-form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #00A9E0;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.post-form-header h2 {
    max-width: 760px;
    margin: 0 auto 12px;
    color: #003366;
    font-size: clamp(22px, 4vw, 34px);
    line-height: 1.12;
}

.post-form-header p {
    max-width: 760px;
    margin: 0 auto;
    color: #52616b;
    font-size: 15px;
    line-height: 1.75;
}

.post-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.post-card, .post-panel, .post-faq, .post-legal {
    background: #fff;
    border: 1px solid #e8eef2;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.post-card {
    min-height: 180px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 169, 224, 0.45);
    box-shadow: 0 12px 25px rgba(0, 169, 224, 0.12);
}

.post-card-icon {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: #7ECA11;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.post-card h3, .post-panel h2, .post-faq h2, .post-legal h2 {
    color: #003366;
    margin: 0;
}

.post-card h3 {
    font-size: 17px;
}

.post-card p {
    margin: 0;
    color: #60717d;
    line-height: 1.5;
}

.post-form-columns {
    display: grid;
    grid-template-columns: 1.4fr .95fr;
    gap: 18px;
    margin-bottom: 20px;
    text-align: left;
}

.post-panel, .post-faq, .post-legal {
    padding: 24px;
}

.post-steps {
    margin: 15px 0 0;
    padding-left: 20px;
    color: #44525c;
    line-height: 1.65;
}

.post-steps li {
    margin-bottom: 8px;
}

.post-benefits ul {
    list-style: none;
    margin: 15px 0 0;
    padding: 0;
}

.post-benefits li {
    position: relative;
    margin-bottom: 12px;
    padding-left: 24px;
    color: #44525c;
    line-height: 1.45;
}

.post-benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7ECA11;
    box-shadow: 0 0 0 3px rgba(126, 202, 17, 0.14);
}

.post-faq {
    margin-bottom: 20px;
    text-align: left;
}

.post-faq h2, .post-legal h2 {
    text-align: center;
    margin-bottom: 15px;
}

.post-faq-item {
    background: #fbfdff;
    border: 1px solid #edf1f4;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.post-faq-item summary {
    cursor: pointer;
    padding: 14px 16px;
    color: #003366;
    font-weight: 800;
    list-style: none;
    font-size: 15px;
}

.post-faq-item summary::-webkit-details-marker {
    display: none;
}

.post-faq-item summary::after {
    content: "+";
    float: right;
    color: #00A9E0;
    font-size: 18px;
    line-height: 1;
}

.post-faq-item[open] summary::after {
    content: "-";
}

.post-faq-item p {
    margin: 0;
    padding: 0 16px 16px;
    color: #52616b;
    line-height: 1.55;
}

.post-legal-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.post-legal-links a {
    padding: 11px 8px;
    color: #003366;
    background: #f4fbff;
    border: 1px solid #dbeff8;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.post-legal-links a:hover {
    color: #00A9E0;
    background: #fff;
    border-color: #00A9E0;
}

@media screen and (max-width: 768px) {
    .recharge-container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .flow-title {
        font-size: 20px;
        margin: 15px 0;
    }

    .post-form-content {
        width: calc(100% - 20px);
        margin-top: 30px;
    }

    .post-form-header, .post-panel, .post-faq, .post-legal {
        padding: 20px;
        border-radius: 10px;
    }

    .post-form-grid, .post-form-columns, .post-legal-links {
        grid-template-columns: 1fr;
    }

    .post-card {
        min-height: auto;
    }

    .card-visual {
        height: 160px;
        max-width: 280px;
    }
}