/* 重置浏览器默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 1rem;
    color: #4a4a4a;
}

h2 {
    margin: 15px 0 10px;
    font-size: 1.2em;
    color: #555;
}

/* 运营商选择样式 */
.operator-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.operator-btn {
    flex: 1;
    padding: 12px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.operator-btn:hover {
    background-color: #e0e0e0;
}

.operator-btn:active {
    background-color: #d0d0d0;
}

.operator-btn.selected {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* 手机号输入样式 */
.phone-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.country-code-display {
    padding: 12px 14px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    white-space: nowrap;
}

#phone-number {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.phone-help {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 10px;
}

/* 金额选择样式 */
.amount-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.amount-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    min-height: 68px;
}

.amount-label {
    font-size: 1.15em;
    font-weight: 700;
    color: #333;
}

.amount-note {
    font-size: 0.95em;
    color: #d4af37;
    margin-top: 4px;
}

.amount-btn:hover {
    background-color: #e0e0e0;
}

.amount-btn:active {
    background-color: #d0d0d0;
}

.amount-btn.selected {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.total-amount {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    color: #333;
}

.submit-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #ff5722;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-button:hover {
    background-color: #e64a19;
}

.submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 支付页面样式 */
.payment-page {
    text-align: center;
}

.payment-page .qr-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.payment-page .qr-code {
    max-width: 100%;
    width: 240px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.payment-page .submit-button {
    max-width: 260px;
    margin: 0 auto;
}

.success-page {
    text-align: center;
}

.success-page .checkmark {
    margin: 30px auto 20px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background-color: #e6f2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.08);
}

.success-page .checkmark svg {
    width: 56px;
    height: 56px;
    color: #2196f3;
}

.success-page .checkmark {
    animation: pop 0.35s ease-out;
}

.success-page .checkmark path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw 0.45s ease-out 0.15s forwards;
}

@keyframes pop {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

.success-page .success-text {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 10px;
}

.success-page .success-subtext {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.success-button {
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 15px 0;
    width: 100%;
    max-width: 260px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.success-button:hover {
    background-color: #1a78d7;
}

.light-blue-button {
    background-color: #5dade2;
    color: white;
}

.light-blue-button:hover {
    background-color: #4a90d9;
}

/* Hero (homepage poster) */
.hero {
    position: fixed;
    inset: 0;
    background-image: url('haibao.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.15));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8vh;
}
.poster-inner {
    position: relative;
    width: 100%;
    display: inline-block;
}
.promo-box {
    position: absolute;
    top: 92%;
    left: 50%;
    transform: translate(-50%, -50%);   
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blinking-btn {
    background: #e53935;
    color: #fff;
    padding: 14px 38px;
    min-width: 140px;
    min-height: 44px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.25);
    animation: pulse-red 0.55s ease-in-out infinite alternate;
}

.blinking-btn { white-space: nowrap; }

.blinking-btn:hover {
    background: #d32f2f;
}

.blinking-btn:focus { outline: none; }

@keyframes pulse-red {
    from {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(229, 57, 53, 0.25);
    }
    to {
        transform: scale(1.16);
        box-shadow: 0 8px 20px rgba(229, 57, 53, 0.45);
    }
}


/* Hide hero when .hidden is added (for simple JS toggle) */
.hero.hidden { display: none; }

/* Poster image inside .container should match container width and be responsive */
.poster-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Reduce hero size on small screens to avoid fullscreen overflow */
@media (max-width: 600px) {
    .hero { background-size: contain; background-position: center top; }
    .promo-box { padding: 12px 16px; }
    .blinking-btn { padding: 10px 28px; font-size: 0.95em; min-width: 160px; white-space: nowrap; }
}