@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(160deg, #1a237e 0%, #283593 40%, #3949ab 100%);
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-overflow-scrolling: touch;
}

.main {
    position: absolute;
    top: 0.24rem;
    left: 0.24rem;
    right: 0.24rem;
    bottom: 0.24rem;
    background: #fff;
    border-radius: 0.24rem;
    box-shadow: 0 0.16rem 0.48rem rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.main::before {
    content: '';
    display: block;
    height: 0.06rem;
    flex-shrink: 0;
    background: linear-gradient(90deg, #00c853, #3949ab, #ff6f00);
}

.pay-header {
    text-align: center;
    padding: 0.32rem 0.32rem 0;
    flex-shrink: 0;
}

.pay-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.08rem;
    padding: 0.08rem 0.2rem;
    background: #f0f4ff;
    border-radius: 0.32rem;
    font-size: 0.22rem;
    font-weight: 600;
    color: #3949ab;
    letter-spacing: 0.01rem;
    text-transform: uppercase;
}

.pay-header-badge svg {
    width: 0.24rem;
    height: 0.24rem;
}

.amount {
    margin: 0.24rem 0 0;
    font-size: 0.28rem;
    font-weight: 500;
    text-align: center;
    color: #6b7280;
    flex-shrink: 0;
}

.amount span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 0.04rem;
    letter-spacing: -0.01rem;
    line-height: 1.1;
}

.pay-desc {
    margin: 0.08rem 0 0;
    font-size: 0.24rem;
    color: #9ca3af;
    text-align: center;
    flex-shrink: 0;
}

.pay-select {
    margin: 0.36rem 0.32rem 0;
    font-size: 0.28rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.wait2 {
    float: none;
    margin: 0;
    font-weight: 600;
    font-size: 0.24rem;
    color: #00a844;
}

.pay-type {
    flex: 1;
    min-height: 0;
    margin: 0 0.24rem;
    padding: 0 0.08rem;
    overflow: hidden;
}

.pay-type ul {
    margin-top: 0.12rem;
    list-style: none;
    padding: 0;
}

.pay-type li {
    list-style: none;
    min-height: 0.96rem;
    border: 0.02rem solid #e5e7eb;
    border-radius: 0.16rem;
    margin-top: 0.16rem;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.16rem 0.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.pay-type li:active {
    transform: scale(0.98);
}

.pay-type li img {
    width: 0.64rem;
    height: 0.64rem;
    padding: 0;
    border-radius: 0.1rem;
    flex-shrink: 0;
    object-fit: contain;
}

.pay-type li span {
    font-size: 0.3rem;
    font-weight: 500;
    margin-left: 0.2rem;
    color: #374151;
    flex: 1;
}

.pay-type .circle {
    width: 0.36rem;
    height: 0.36rem;
    border: 0.02rem solid #d1d5db;
    border-radius: 50%;
    position: static;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.pay-type .check {
    background: #f0f7ff;
    border: 0.02rem solid #3949ab;
    border-radius: 0.16rem;
}

.pay-type .check span {
    color: #3949ab;
    font-weight: 600;
}

.pay-type .check .circle {
    border-color: #3949ab;
    background-color: #3949ab;
    background-image: url(/images/check.png);
    background-size: 60% 60%;
    background-position: center;
    background-repeat: no-repeat;
}

.pay-button {
    flex-shrink: 0;
    height: 0.96rem;
    background: linear-gradient(135deg, #00c853, #00a844);
    border-radius: 0.18rem;
    font-size: 0.32rem;
    font-weight: 600;
    color: #fff;
    line-height: 0.96rem;
    text-align: center;
    margin: 0.24rem 0.32rem 0;
    cursor: pointer;
    box-shadow: 0 0.06rem 0.2rem rgba(0, 168, 68, 0.35);
    transition: all 0.2s ease;
    letter-spacing: 0.01rem;
}

.pay-button:active {
    transform: scale(0.98);
    box-shadow: 0 0.04rem 0.12rem rgba(0, 168, 68, 0.3);
}

.pay-button-display {
    flex-shrink: 0;
    height: 0.96rem;
    background: #d1d5db;
    border-radius: 0.18rem;
    font-size: 0.32rem;
    font-weight: 600;
    color: #fff;
    line-height: 0.96rem;
    text-align: center;
    margin: 0.24rem 0.32rem 0;
    box-shadow: none;
    cursor: not-allowed;
}

.pay-button span {
    padding-left: 0.12rem;
    font-weight: 700;
}

.pay-footer {
    text-align: center;
    margin-top: 0.2rem;
    padding: 0 0.32rem 0.28rem;
    flex-shrink: 0;
}

.pay-footer-text {
    font-size: 0.2rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.06rem;
}

.pay-footer-text svg {
    width: 0.22rem;
    height: 0.22rem;
    flex-shrink: 0;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #1a237e 0%, #283593 40%, #3949ab 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    gap: 0.24rem;
}

.loading-overlay::after {
    content: 'Processing payment...';
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.28rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.spinner {
    width: 0.72rem;
    height: 0.72rem;
    border: 0.04rem solid rgba(255, 255, 255, 0.2);
    border-top: 0.04rem solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Legacy modal styles */
.shawdow {
    display: none;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.shawdow .msg {
    width: 5.8rem;
    height: auto;
    min-height: 1.6rem;
    background-color: #fff;
    border-radius: 0.16rem;
    position: relative;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wait {
    display: none;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.wait .content {
    width: 6.4rem;
    height: 2.22rem;
    background-color: #fff;
    border-radius: 0.16rem;
    position: relative;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.wait .time {
    font-size: 0.72rem;
    font-weight: 600;
    color: #3949ab;
    line-height: 0.72rem;
    padding-top: 0.74rem;
}

.wait .msg {
    font-size: 0.4rem;
    color: #3949ab;
    line-height: 0.4rem;
    margin-top: 0.54rem;
}

.success {
    display: none;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.success .content {
    width: 6.4rem;
    height: 4.22rem;
    background-color: #fff;
    border-radius: 0.16rem;
    position: relative;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.success .time {
    font-size: 0.72rem;
    font-weight: 600;
    color: #3949ab;
    line-height: 0.72rem;
    padding-top: 0.74rem;
}

.success .msg {
    font-size: 0.4rem;
    color: #3949ab;
    line-height: 0.4rem;
    margin-top: 0.54rem;
}

@media only screen and (min-width: 750px) {
    body {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        width: 7.02rem;
        height: auto;
        min-height: 10rem;
        max-height: 90vh;
    }
}

@media only screen and (min-width: 990px) {
    .footer-copyright {
        width: 5.8rem;
        margin: 0 auto;
        font-size: 28px;
    }
}

@media only screen and (max-width: 990px) {
    .footer-copyright {
        width: 6.8rem;
        margin: 0 auto;
    }
}
