/* Payment Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --secondary-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: var(--font-family-inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--text-primary);
}

.payment-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

.payment-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.payment-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="25" cy="75" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="25" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.payment-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.payment-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.payment-subtitle {
    opacity: 0.9;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.payment-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* 防止iOS输入框缩放 */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .form-input {
        font-size: 16px;
    }
}

/* 数字输入框优化 */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
}

.input-icon .form-input {
    padding-left: 2.75rem;
}

.amount-input {
    position: relative;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--text-primary);
    z-index: 1;
}

.amount-input .form-input {
    padding-left: 2.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.language-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    margin: 0 0.25rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover, .lang-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.security-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.security-icon {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* 响应式设计 */
/* 平板设备 */
@media (max-width: 768px) {
    .payment-container {
        margin: 1rem;
        max-width: none;
    }
    
    .payment-header {
        padding: 2rem 1.5rem;
    }
    
    .payment-form {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
}

/* 手机设备 */
@media (max-width: 640px) {
    body {
        padding: 0.5rem;
    }
    
    .payment-container {
        margin: 0.5rem;
        border-radius: var(--radius-lg);
    }
    
    .payment-header {
        padding: 1.5rem 1rem;
    }
    
    .payment-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .payment-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .payment-subtitle {
        font-size: 0.875rem;
    }
    
    .payment-form {
        padding: 1.25rem 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .form-input {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .input-icon .form-input {
        padding-left: 2.5rem;
    }
    
    .amount-input .form-input {
        font-size: 1.1rem;
        padding-left: 2.25rem;
    }
    
    .currency-symbol {
        left: 0.875rem;
    }
    
    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 48px;
    }
    
    .language-switcher {
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        z-index: 1000;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        margin: 0 0.125rem;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .security-info {
        margin-top: 1rem;
        padding: 0.875rem;
        font-size: 0.8rem;
    }
}

/* 小屏手机设备 */
@media (max-width: 480px) {
    body {
        padding: 0.25rem;
    }
    
    .payment-container {
        margin: 0.25rem;
    }
    
    .payment-header {
        padding: 1.25rem 0.875rem;
    }
    
    .payment-icon {
        font-size: 2rem;
    }
    
    .payment-title {
        font-size: 1.25rem;
    }
    
    .payment-form {
        padding: 1rem 0.875rem;
    }
    
    .form-input {
        padding: 0.7rem 0.8rem;
    }
    
    .input-icon .form-input {
        padding-left: 2.3rem;
    }
    
    .input-icon i {
        left: 0.8rem;
        font-size: 0.9rem;
    }
    
    .amount-input .form-input {
        padding-left: 2rem;
    }
    
    .currency-symbol {
        left: 0.8rem;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 0.8rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .language-switcher {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 0.5rem;
    }
    
    .payment-container {
        max-width: 600px;
        margin: 0.5rem auto;
    }
    
    .payment-header {
        padding: 1rem 1.5rem;
    }
    
    .payment-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .payment-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .payment-subtitle {
        font-size: 0.8rem;
    }
    
    .payment-form {
        padding: 1rem 1.5rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .security-info {
        margin-top: 0.75rem;
        padding: 0.75rem;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .submit-btn:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .lang-btn:hover {
        transform: none;
    }
    
    .form-input:focus {
        transform: none;
    }
}

/* 触摸设备按钮优化 */
.submit-btn:active {
    transform: scale(0.98);
}

.lang-btn:active {
    transform: scale(0.95);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --border-color: #334155;
        --secondary-color: #1e293b;
    }
}
