/* ===========================
   Home Page — Amount Selection
   风格：Cash App 卡片 + Lightning Wallet 绿
   =========================== */

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

html, body {
    height: 100%;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    color-scheme: light;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f5f5f7;
    min-height: 100vh;
}

button, input, select, textarea {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
}

/* ===========================
   页面 & 卡片容器
   =========================== */
.home-page {
    min-height: 100vh;
    background: #f5f5f7;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 24px;
}

.home-card {
    width: 100%;
    max-width: 28rem;
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 32px rgba(0, 0, 0, .08);
    padding: 20px;
    position: relative;
}

.home-card-handle {
    width: 48px;
    height: 4px;
    background: #d1d5db;
    border-radius: 999px;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
}

/* ===========================
   头部：收款人信息
   =========================== */
.home-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}

.home-payee-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.home-payee-label {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.home-payee-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.home-verified-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.home-shield {
    color: #00d54b;
    flex-shrink: 0;
}

.home-secure-text {
    font-size: 0.75rem;
    color: #00b341;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ===========================
   金额快捷按钮
   =========================== */
.home-amounts-section {
    margin-bottom: 16px;
}

.home-section-label {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.home-amounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.home-amt-btn {
    background: #f5f5f7;
    color: #111827;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    padding: 0.75rem 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    outline: none;
}

.home-amt-btn:hover {
    background: #ebfbf0;
    border-color: #00d54b;
    color: #00a336;
}

.home-amt-btn.active {
    background: #ebfbf0;
    border-color: #00d54b;
    color: #00a336;
    box-shadow: 0 0 0 1px #00d54b inset;
}

.home-amt-btn:active {
    transform: scale(0.97);
}

.home-toggle-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #00a336;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    letter-spacing: 0.02em;
    transition: color 0.15s;
    text-align: center;
}

.home-toggle-btn:hover {
    color: #007a28;
}

/* ===========================
   自定义金额输入
   =========================== */
.home-custom-section {
    margin-bottom: 20px;
}

.home-custom-input-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.15s;
    overflow: hidden;
}

.home-custom-input-wrap:focus-within {
    border-color: #00d54b;
}

.home-custom-dollar {
    padding: 12px 0 12px 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #9ca3af;
    user-select: none;
    flex-shrink: 0;
}

.home-custom-input {
    flex: 1;
    padding: 12px 16px 12px 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    border: none;
    background: transparent;
    outline: none;
    min-width: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.home-custom-input::placeholder {
    color: #d1d5db;
    font-weight: 500;
}

/* ===========================
   底部：合计 & 按钮
   =========================== */
.home-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

.home-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.home-total-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.04em;
}

.home-total-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: #00d54b;
    letter-spacing: -0.02em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.home-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #00d54b;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem;
    min-height: 3.5rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(0, 213, 75, 0.35);
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
}

.home-pay-btn:hover:not(.disabled) {
    background: #00c044;
    box-shadow: 0 0 28px rgba(0, 213, 75, 0.5);
}

.home-pay-btn:active:not(.disabled) {
    transform: scale(0.98);
}

.home-pay-btn.disabled {
    background: #d1d5db;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.home-powered {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 12px;
    font-weight: 500;
}

.home-powered strong {
    color: #6b7280;
}

/* ===========================
   Toast 提示
   =========================== */
.home-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(16px);
    max-width: calc(100vw - 32px);
    padding: 12px 20px;
    border-radius: 999px;
    background: #ffffff;
    color: #1a2332;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(15, 23, 42, 0.08);
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===========================
   响应式适配
   =========================== */
@media (max-width: 400px) {
    .home-page {
        padding: 32px 12px 16px;
    }

    .home-card {
        border-radius: 1.25rem;
        padding: 16px;
    }

    .home-amt-btn {
        font-size: 0.9375rem;
        padding: 0.625rem 4px;
    }

    .home-payee-name {
        font-size: 1.25rem;
    }
}

@media (min-width: 480px) {
    .home-amounts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
