/* 记录页 */
.header {
    position: relative;
    z-index: 2;
}

.header-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 8px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-title {
    font-family: var(--display);
    letter-spacing: 0.16em;
    font-size: 22px;
    color: var(--gold-soft);
}

.back-btn, .withdrawal-btn {
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
    color: var(--ivory);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.withdrawal-btn {
    background: linear-gradient(180deg, #f6e7b0, #d4ae52);
    color: #3a140f;
    border: 0;
    font-weight: 700;
}

.stats-container {
    max-width: 1080px;
    margin: 20px auto 0;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.stat-icon { font-size: 26px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 800; color: var(--gold); }

.records-container {
    max-width: 1080px;
    margin: 20px auto;
    padding: 0 20px 80px;
    position: relative;
    z-index: 1;
}

.records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.records-header h2 { font-size: 16px; }

.filter-buttons {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.filter-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.filter-btn.active {
    background: var(--gold);
    color: #3a140f;
    font-weight: 700;
}

.records-list { display: grid; gap: 10px; }

.record-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 18px;
    cursor: pointer;
}

.record-item:hover { border-color: rgba(232, 195, 106, 0.45); }

.record-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #f6e7b0, #d4ae52);
    color: #9f1239;
    font-weight: 800;
}

.record-content { flex: 1; }
.record-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-bottom: 4px;
}
.record-code {
    font-size: 11px;
    font-family: ui-monospace, monospace;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--gold-soft);
}
.record-meta { font-size: 12px; color: var(--muted); }
.record-amount { font-size: 18px; font-weight: 800; color: var(--gold); }

.empty-state {
    text-align: center;
    padding: 56px 20px;
    border: 1px dashed var(--line);
    border-radius: 20px;
}

.empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-title { font-size: 18px; margin-bottom: 6px; }
.empty-desc { color: var(--muted); margin-bottom: 18px; }

.goto-lottery-btn {
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #f6e7b0, #d4ae52);
    color: #3a140f;
    font-weight: 700;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show { display: flex; }

.modal {
    width: min(400px, 92vw);
    background: #14121c;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
}

.modal-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    color: var(--gold-soft);
}

.close-modal {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ivory);
    cursor: pointer;
    font-size: 20px;
}

.modal-body { padding: 18px; color: var(--ivory); }
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.detail-item .label { color: var(--muted); }
.prize-amount { color: var(--gold) !important; }

.modal-footer {
    padding: 0 18px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn {
    padding: 9px 16px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(180deg, #f6e7b0, #d4ae52);
    color: #3a140f;
    font-weight: 700;
}
.btn-secondary {
    background: transparent;
    color: var(--ivory);
    border: 1px solid var(--line);
}

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--muted); }
.form-group input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--ivory);
    padding: 0 12px;
}
.login-error { color: #fda4af; font-size: 13px; }

.admin-entrance {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 2;
}
.admin-dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
}

@media (max-width: 640px) {
    .header-content { flex-wrap: wrap; }
    .page-title { width: 100%; text-align: center; order: -1; }
    .stats-container { grid-template-columns: 1fr; }
    .records-header { flex-direction: column; align-items: stretch; }
}
