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

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 16px;
}

.payment-form {
    margin-bottom: 30px;
}

.amount-section {
    margin-bottom: 30px;
}

.amount-section label {
    display: block;
    color: #555;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 500;
}

.amount-input {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0 15px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.amount-input:focus-within {
    border-color: #07c160;
}

.currency {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

#amount {
    flex: 1;
    border: none;
    outline: none;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    padding: 15px 0;
    background: transparent;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

#amount::-webkit-outer-spin-button,
#amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.amount-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.amount-btn {
    padding: 14px;
    border: 2px solid #07c160;
    background: white;
    color: #07c160;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.amount-btn:hover {
    background: #07c160;
    color: white;
}

.pay-button {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #07c160 0%, #05a048 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.3);
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}

.pay-button:active {
    transform: translateY(0);
}

.qrcode-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.qrcode-container {
    text-align: center;
}

.qrcode-container h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

#qrcode {
    display: inline-block;
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qrcode-tip {
    color: #ff6b6b;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.payment-info {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.payment-info p {
    margin: 8px 0;
    font-size: 16px;
    color: #555;
}

.payment-info span {
    font-weight: bold;
    color: #333;
}

.status-waiting {
    color: #ff9500 !important;
}

.status-success {
    color: #07c160 !important;
}

.refresh-button,
.back-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 5px;
}

.refresh-button {
    background: #007aff;
    color: white;
}

.back-button {
    background: #8e8e93;
    color: white;
}

.refresh-button:hover {
    background: #0056cc;
}

.back-button:hover {
    background: #6d6d71;
}

.instructions {
    margin-top: 30px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 10px;
    border-left: 4px solid #007aff;
}

.instructions h3 {
    color: #007aff;
    margin-bottom: 10px;
    font-size: 18px;
}

.instructions ol {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    color: #555;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #amount {
        font-size: 28px;
    }
    
    .pay-button {
        padding: 18px;
        font-size: 18px;
    }
    
    #qrcode canvas {
        width: 250px !important;
        height: 250px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .amount-buttons {
        grid-template-columns: 1fr;
    }
    
    #qrcode canvas {
        width: 200px !important;
        height: 200px !important;
    }
    
    .refresh-button,
    .back-button {
        width: 100%;
        margin: 5px 0;
    }
}

/* 防止横屏时字体过大 */
@media (orientation: landscape) and (max-height: 600px) {
    .container {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .container {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .header h1 {
        color: #e2e8f0;
    }
    
    .subtitle {
        color: #a0aec0;
    }
    
    .amount-section label {
        color: #cbd5e0;
    }
    
    .currency {
        color: #e2e8f0;
    }
    
    #amount {
        color: #e2e8f0;
        background: transparent;
    }
    
    .amount-input {
        border-color: #4a5568;
        background: #2d3748;
    }
    
    .qrcode-section {
        background: #2d3748;
    }
    
    .qrcode-container h3 {
        color: #e2e8f0;
    }
    
    .payment-info {
        background: #2d3748;
        color: #cbd5e0;
    }
    
    .payment-info span {
        color: #e2e8f0;
    }
    
    .instructions {
        background: #2d3748;
    }
}