/* ============================================================
   礼物记录 gift.s1.css
   粉红玫瑰渐变主题 + 玻璃拟态，移动端自适应
   ============================================================ */

.gift-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(253,242,248,0.92));
    border: 1px solid rgba(244, 114, 182, 0.35);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(236, 72, 153, 0.10);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.gift-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(244,63,94,0.10), transparent 70%);
    pointer-events: none;
}
.gift-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(236,72,153,0.08), transparent 70%);
    pointer-events: none;
}
.gift-icon {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%) !important;
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.35);
    animation: gift-breath 3s ease-in-out infinite;
}
@keyframes gift-breath {
    0%, 100% { box-shadow: 0 6px 18px rgba(236,72,153,0.35); }
    50% { box-shadow: 0 6px 26px rgba(244,63,94,0.55); }
}

/* ---------- 登录引导 ---------- */
.gift-login-guide { text-align: center; padding: 34px 16px 26px; position: relative; z-index: 1; }
.gift-login-guide i { font-size: 40px; background: linear-gradient(135deg,#ec4899,#f43f5e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gift-login-guide h3 { margin: 12px 0 6px; font-size: 1.05rem; color: #1e293b; }
.gift-login-guide p { margin: 0 0 18px; font-size: 0.85rem; color: #64748b; }
.gift-login-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.gift-login-btns a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 26px; border-radius: 999px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all .25s ease;
}
.gift-login-btns a.main { background: linear-gradient(135deg,#ec4899,#f43f5e); color: #fff; box-shadow: 0 6px 16px rgba(236,72,153,0.35); }
.gift-login-btns a.main:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(244,63,94,0.45); }
.gift-login-btns a.ghost { border: 1.5px solid rgba(236,72,153,0.45); color: #db2777; background: rgba(255,255,255,0.7); }
.gift-login-btns a.ghost:hover { background: rgba(236,72,153,0.08); }

/* ---------- 统计卡 ---------- */
.gift-stats-card {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 16px; position: relative; z-index: 1;
}
.gift-stat-box {
    background: rgba(255,255,255,0.8); border-radius: 14px; padding: 14px;
    border: 1px solid rgba(244,114,182,0.18);
    display: flex; align-items: center; gap: 12px;
}
.gift-stat-box.received { background: linear-gradient(135deg, #d1fae5, #fff); }
.gift-stat-box.sent { background: linear-gradient(135deg, #fef3c7, #fff); }
.gift-stat-box.net { background: linear-gradient(135deg, #fce7f3, #fff); }
.gift-stat-ico {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #fff;
}
.gift-stat-box.received .gift-stat-ico { background: linear-gradient(135deg,#10b981,#059669); }
.gift-stat-box.sent .gift-stat-ico { background: linear-gradient(135deg,#f59e0b,#d97706); }
.gift-stat-box.net .gift-stat-ico { background: linear-gradient(135deg,#ec4899,#f43f5e); }
.gift-stat-info { flex: 1; min-width: 0; }
.gift-stat-label { font-size: 0.75rem; color: #64748b; margin-bottom: 2px; }
.gift-stat-num { font-size: 1rem; font-weight: 700; color: #1e293b; }
.gift-stat-money { font-size: 0.82rem; font-weight: 600; color: #94a3b8; margin-top: 2px; }
.gift-stat-money.big { font-size: 1.15rem; color: #db2777; font-weight: 800; }

/* ---------- 新增按钮 ---------- */
.gift-add-row { margin-bottom: 14px; position: relative; z-index: 1; }
.gift-add-btn {
    width: 100%; border: none; cursor: pointer;
    padding: 12px 20px; border-radius: 14px;
    font-size: 0.92rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg,#ec4899,#f43f5e);
    box-shadow: 0 6px 16px rgba(236,72,153,0.35);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s ease;
}
.gift-add-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(244,63,94,0.45); }

/* ---------- Tabs ---------- */
.gift-tabs {
    display: flex; gap: 5px; margin: 6px 0 16px;
    background: rgba(252,231,243,0.55); border: 1px solid rgba(244,114,182,0.28);
    padding: 5px; border-radius: 14px;
    position: relative; z-index: 1;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.gift-tabs::-webkit-scrollbar { display: none; }
.gift-tab {
    flex: 1 0 auto; border: none; background: transparent; cursor: pointer;
    padding: 9px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .22s ease; white-space: nowrap;
}
.gift-tab i { font-size: 0.8rem; }
.gift-tab:hover { color: #db2777; }
.gift-tab.active {
    background: linear-gradient(135deg,#ec4899,#f43f5e); color: #fff;
    box-shadow: 0 4px 14px rgba(236,72,153,0.35);
}

/* ---------- 列表 ---------- */
.gift-list-wrap { position: relative; z-index: 1; }
.gift-list { display: flex; flex-direction: column; gap: 10px; }
.gift-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(244,114,182,0.18);
    border-radius: 14px; padding: 14px;
    transition: all .2s;
}
.gift-item:hover { box-shadow: 0 6px 18px rgba(236,72,153,0.10); transform: translateY(-1px); }
.gift-item-dot {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff;
}
.gift-item-dot.received { background: linear-gradient(135deg,#10b981,#059669); }
.gift-item-dot.sent { background: linear-gradient(135deg,#f59e0b,#d97706); }
.gift-item-info { flex: 1; min-width: 0; }
.gift-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.gift-item-name { font-size: 0.95rem; font-weight: 700; color: #1e293b; }
.gift-item-dir {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.gift-item-dir.received { background: rgba(16,185,129,0.12); color: #059669; }
.gift-item-dir.sent { background: rgba(245,158,11,0.12); color: #d97706; }
.gift-item-meta { font-size: 0.78rem; color: #94a3b8; line-height: 1.5; }
.gift-item-meta span { margin-right: 10px; }
.gift-item-meta i { margin-right: 3px; color: #ec4899; }
.gift-item-note { font-size: 0.8rem; color: #64748b; margin-top: 4px; }
.gift-item-price {
    font-size: 1rem; font-weight: 800; color: #1e293b;
    flex-shrink: 0; text-align: right;
}
.gift-item-price.received { color: #059669; }
.gift-item-price.sent { color: #d97706; }
.gift-item-actions { display: flex; gap: 6px; margin-left: 8px; flex-shrink: 0; }
.gift-item-btn {
    border: none; background: rgba(236,72,153,0.08); color: #db2777;
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
    font-size: 0.8rem; transition: all .2s;
}
.gift-item-btn:hover { background: rgba(236,72,153,0.18); }
.gift-item-btn.del { color: #ef4444; background: rgba(239,68,68,0.08); }
.gift-item-btn.del:hover { background: rgba(239,68,68,0.18); }

.gift-empty { text-align: center; padding: 36px 16px; color: #94a3b8; }
.gift-empty i { font-size: 2.4rem; margin-bottom: 10px; opacity: 0.45; background: linear-gradient(135deg,#ec4899,#f43f5e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gift-empty div { font-size: 0.88rem; }

/* 分页 */
.gift-pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.gift-pager button {
    border: 1px solid rgba(244,114,182,0.3); background: #fff; color: #db2777;
    padding: 7px 14px; border-radius: 10px; cursor: pointer; font-size: 0.82rem;
    transition: all .2s;
}
.gift-pager button:hover:not(:disabled) { background: rgba(236,72,153,0.08); }
.gift-pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.gift-pager span { font-size: 0.82rem; color: #64748b; }

/* ---------- 表单弹窗 ---------- */
.gift-modal-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,0.45);
    z-index: 999998; display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: gift-fade .2s ease;
}
@keyframes gift-fade { from { opacity: 0; } to { opacity: 1; } }
.gift-modal {
    background: #fff; border-radius: 18px; max-width: 480px; width: 100%;
    padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: gift-pop .25s ease;
    max-height: 85vh; overflow-y: auto;
}
@keyframes gift-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.gift-modal-title {
    font-size: 1.05rem; font-weight: 700; color: #9d174d;
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.gift-modal-title i { color: #ec4899; }

.gift-field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.gift-field { flex: 1; min-width: 130px; margin-bottom: 14px; }
.gift-field label { display: block; font-size: 0.82rem; font-weight: 600; color: #475569; margin-bottom: 7px; }
.gift-field label i { color: #ec4899; margin-right: 4px; }
.gift-field input[type="text"], .gift-field input[type="date"], .gift-field input[type="number"] {
    width: 100%; padding: 10px 12px; border: 1.5px solid rgba(244,114,182,0.25);
    border-radius: 10px; font-size: 0.88rem; color: #1e293b;
    background: #fff; box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}
.gift-field input:focus { outline: none; border-color: #ec4899; box-shadow: 0 0 0 3px rgba(236,72,153,0.12); }

/* 方向选择 */
.gift-dir-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gift-dir-item {
    text-align: center; padding: 12px 8px;
    border: 1.5px solid rgba(244,114,182,0.25); border-radius: 12px;
    cursor: pointer; transition: all .2s; background: #fff;
    font-size: 0.88rem; font-weight: 600; color: #64748b;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.gift-dir-item i { font-size: 0.85rem; }
.gift-dir-item.active[data-dir="1"] { border-color: #10b981; background: rgba(16,185,129,0.08); color: #059669; }
.gift-dir-item.active[data-dir="2"] { border-color: #f59e0b; background: rgba(245,158,11,0.08); color: #d97706; }

/* 保存按钮 */
.gift-save-row { display: flex; gap: 10px; margin-top: 6px; }
.gift-save-btn {
    flex: 1; border: none; cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg,#ec4899,#f43f5e);
    box-shadow: 0 6px 16px rgba(236,72,153,0.35);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s ease;
}
.gift-save-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(244,63,94,0.45); }
.gift-cancel-btn {
    border: 1.5px solid rgba(244,114,182,0.4); cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #db2777; background: rgba(255,255,255,0.7);
    transition: all .2s;
}
.gift-cancel-btn:hover { background: rgba(236,72,153,0.08); }

/* ---------- Toast ---------- */
.gift-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: #fff; padding: 12px 20px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; font-weight: 500; z-index: 999999;
    border-left: 4px solid #ec4899;
    animation: gift-toast-in .3s ease;
    max-width: 90vw;
}
.gift-toast.success { border-left-color: #10b981; }
.gift-toast.error { border-left-color: #ef4444; }
.gift-toast.warning { border-left-color: #f59e0b; }
.gift-toast.info { border-left-color: #3b82f6; }
.gift-toast i { font-size: 1rem; }
.gift-toast.success i { color: #10b981; }
.gift-toast.error i { color: #ef4444; }
.gift-toast.warning i { color: #f59e0b; }
.gift-toast.info i { color: #3b82f6; }
@keyframes gift-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-15px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .gift-card { padding: 14px; border-radius: 16px; }
    .gift-stats-card { grid-template-columns: 1fr; gap: 8px; }
    .gift-tab { padding: 8px 10px; font-size: 0.78rem; }
    .gift-tab i { display: none; }
    .gift-item { flex-wrap: wrap; padding: 12px; }
    .gift-item-price { order: -1; width: 100%; text-align: right; }
    .gift-item-actions { margin-left: auto; }
    .gift-field-row { gap: 8px; }
}
