/* ===== 全局重置 & 基础布局 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #e9eff5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 通用卡片容器（用于登录、注册、会员中心） */
.card {
    max-width: 440px;
    width: 100%;
    background: white;
    border-radius: 28px;
    box-shadow: 0 25px 40px -14px rgba(6, 28, 45, 0.25);
    padding: 30px 24px;
    border: 1px solid rgba(15, 58, 92, 0.08);
}

/* 管理后台专用容器 */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    box-shadow: 0 25px 40px -14px rgba(6, 28, 45, 0.25);
    padding: 30px;
}

/* 会员中心卡片稍宽 */
.member-card {
    max-width: 480px;
}

h1 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0a2a3b;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

h1 i {
    color: #0f3a5c;
}

/* ===== 通用输入框 ===== */
.input-box {
    display: flex;
    align-items: center;
    background: #fafcfd;
    border-radius: 16px;
    border: 2px solid #cbd6e3;
    transition: border 0.18s, background 0.2s, box-shadow 0.2s;
    padding: 6px 18px;
    min-height: 70px;
    margin-bottom: 12px;
}

.input-box.valid {
    border-color: #1d6f42 !important;
    background: #f0f9f2;
    box-shadow: 0 0 0 3px rgba(29, 111, 66, 0.08);
}

.input-box i {
    color: #54708f;
    font-size: 22px;
    width: 28px;
    margin-right: 14px;
    text-align: center;
    flex-shrink: 0;
}

.input-box input,
.input-box select {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 20px;
    padding: 14px 0;
    color: #0a2a3b;
    outline: none;
    width: 100%;
    font-weight: 450;
    min-width: 0;
}

.input-box input::placeholder {
    color: #8fa5bd;
    font-size: 20px;
    font-weight: 400;
}

/* ===== 密码行（带眼睛） ===== */
.password-row {
    display: flex;
    align-items: center;
    min-height: 70px;
    gap: 8px;
}

.password-row i {
    color: #54708f;
    font-size: 22px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.password-row input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 20px;
    padding: 14px 0;
    color: #0a2a3b;
    outline: none;
    min-width: 0;
}

.password-row input::placeholder {
    color: #8fa5bd;
    font-size: 20px;
}

.password-toggle {
    background: transparent;
    border: none;
    padding: 12px 6px;
    color: #54708f;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.password-toggle:hover {
    color: #0f3a5c;
}

/* 双行密码组合（注册页用） */
.password-group {
    background: #fafcfd;
    border-radius: 16px;
    border: 2px solid #cbd6e3;
    transition: border 0.18s, background 0.2s;
    padding: 0 18px;
    margin-bottom: 12px;
}

.password-group.valid {
    border-color: #1d6f42 !important;
    background: #f0f9f2;
    box-shadow: 0 0 0 3px rgba(29, 111, 66, 0.08);
}

.password-group .password-row:first-child {
    border-bottom: 1.5px solid #dbe3ec;
}

/* ===== 性别选择器 ===== */
.gender-selector {
    display: flex;
    flex: 1;
    gap: 12px;
    padding: 6px 0;
}

.gender-option {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 20px;
    font-weight: 550;
    color: #0a2a3b;
    background: white;
    border: 2px solid #cbd6e3;
    border-radius: 60px;
    transition: all 0.15s;
    cursor: pointer;
    user-select: none;
}

.gender-option.active {
    background: #0f3a5c;
    border-color: #0f3a5c;
    color: white;
}

.input-box.valid .gender-option.active {
    background: #1d6f42;
    border-color: #1d6f42;
}

/* ===== 下拉框 ===== */
.select-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.select-wrapper select {
    width: 100%;
    padding-right: 40px !important;
    padding-left: 8px !important;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #0a2a3b;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    text-align: left;
    min-width: 0;
}

.select-wrapper select:invalid {
    color: #8fa5bd;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #0f3a5c;
    font-size: 22px;
    pointer-events: none;
    flex-shrink: 0;
}

/* ===== 拼图验证 ===== */
.slider-block {
    margin: 24px 0 24px;
    background: #fafcfd;
    border-radius: 16px;
    padding: 20px 24px;
    border: 2px solid #cbd6e3;
    transition: border 0.2s, background 0.2s, box-shadow 0.2s;
}

.slider-block.verified {
    border-color: #1d6f42 !important;
    background: #f0f9f2;
    box-shadow: 0 0 0 3px rgba(29, 111, 66, 0.08);
}

.slider-row {
    margin-bottom: 20px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-message {
    font-size: 19px;
    font-weight: 550;
    color: #0a2a3b;
    line-height: 1.2;
    white-space: nowrap;
}

.puzzle-track {
    position: relative;
    width: 100%;
    height: 60px;
    background: #e9f0f5;
    border-radius: 16px;
    margin-bottom: 8px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
}

.puzzle-gap {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0b8cc;
    border: 2px dashed #0f3a5c;
    border-radius: 12px;
    background: rgba(15, 58, 92, 0.02);
    pointer-events: none;
}

.puzzle-gap i {
    font-size: 32px;
    color: #7d99b3;
}

.puzzle-piece {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(0, -50%);
    width: 48px;
    height: 48px;
    background: #0f3a5c;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(15, 58, 92, 0.25);
    transition: background 0.2s, transform 0.1s;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.puzzle-piece:active {
    cursor: grabbing;
    transform: translate(0, -50%) scale(1.05);
}

.slider-block.verified .puzzle-piece {
    background: #1d6f42;
    cursor: default;
}

.slider-block.verified .puzzle-piece:active {
    transform: translate(0, -50%);
}

.puzzle-piece i {
    font-size: 28px;
    color: white;
    pointer-events: none;
}

/* ===== 按钮 ===== */
.login-btn,
.register-btn,
.transfer-btn,
.btn {
    background: linear-gradient(145deg, #0f3a5c, #0a2a3b);
    border: none;
    border-radius: 60px;
    padding: 20px 28px;
    font-size: 24px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    box-shadow: 0 14px 26px -6px rgba(10, 42, 59, 0.4);
    transition: all 0.15s;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 16px;
}

.login-btn:enabled:active,
.register-btn:enabled:active,
.transfer-btn:active,
.btn:active {
    transform: scale(0.97);
}

.login-btn:disabled,
.register-btn:disabled {
    opacity: 0.45;
    filter: grayscale(0.7);
    box-shadow: none;
    cursor: not-allowed;
    background: #6c859c;
}

/* 小号按钮（用于管理后台） */
.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
    display: inline-flex;
    margin: 2px;
}

.btn-danger {
    background: #b33;
}

.btn-danger:hover {
    background: #992222;
}

.btn-warning {
    background: #f59e0b;
}

.btn-warning:hover {
    background: #d97706;
}

/* ===== 消息提示 ===== */
.message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    font-size: 18px;
    text-align: center;
    display: none;
}

.message.success,
.message.error {
    display: block;
}

.message.success {
    background: #e1f7e1;
    color: #1d6f42;
    border: 1px solid #1d6f42;
}

.message.error {
    background: #ffe6e6;
    color: #b33;
    border: 1px solid #b33;
}

/* ===== 会员中心特有样式 ===== */
.info-card {
    background: #f0f5fa;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    border: 2px solid #cbd6e3;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    padding: 10px 0;
    border-bottom: 1px solid #dbe3ec;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #54708f;
    width: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-value {
    font-weight: 600;
    color: #0a2a3b;
}

.wealth-value {
    color: #f59e0b;
    font-weight: 700;
}

.target-name {
    margin: 8px 0 16px;
    padding: 12px;
    background: #f0f5fa;
    border-radius: 60px;
    font-size: 20px;
    color: #0f3a5c;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #cbd6e3;
}

.target-name i {
    color: #f59e0b;
}

.transfer-btn {
    padding: 16px 28px;
    font-size: 22px;
    font-weight: 600;
    margin-top: 8px;
}

.logout-btn {
    background: #f0f5fa;
    border: 2px solid #cbd6e3;
    border-radius: 60px;
    padding: 16px;
    font-size: 20px;
    color: #0f3a5c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 24px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.logout-btn:hover {
    background: #e1eaf2;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #0a2a3b;
    margin: 30px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #cbd6e3;
    padding-bottom: 8px;
}

.profile-form,
.password-form {
    background: #f0f5fa;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
}

/* 交易记录表格 */
.trans-table {
    width: 100%;
    border-collapse: collapse;
    background: #fafcfd;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #cbd6e3;
}

.trans-table th {
    background: #0f3a5c;
    color: white;
    padding: 12px;
    font-size: 16px;
}

.trans-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dbe3ec;
    text-align: center;
}

.trans-table tr:last-child td {
    border-bottom: none;
}

.in {
    color: #1d6f42;
    font-weight: 600;
}

.out {
    color: #b33;
    font-weight: 600;
}

/* ===== 管理后台特有样式 ===== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* 管理后台表格最小宽度，保证小屏可横向滚动 */
.admin-table {
    min-width: 800px;
    border-collapse: collapse;
}

/* 单元格边框与居中 */
.admin-table th,
.admin-table td {
    border: 1px solid #dbe3ec;
    text-align: center;
    vertical-align: middle;
    padding: 12px 10px;
}

/* 操作列按钮居中，消除左密右疏 */
.admin-table td:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px; /* 适当减小内边距以适应边框 */
}

.admin-table td:last-child form {
    display: inline-flex;
    margin: 0;
}

.batch-actions {
    background: #f0f5fa;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-link {
    margin-left: auto;
    font-size: 18px;
    background: #0f3a5c;
    color: white;
    padding: 8px 16px;
    border-radius: 60px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== 返回登录链接 ===== */
.back-login {
    text-align: center;
    margin-top: 16px;
    font-size: 16px;
}

.back-login a {
    color: #0f3a5c;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-login i {
    font-size: 14px;
}

/* ===== 页脚链接 ===== */
.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    font-size: 18px;
}

.footer-links a {
    color: #0f3a5c;
    text-decoration: none;
    font-weight: 550;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: #1d6f42;
}

.footer-links i {
    font-size: 18px;
}

/* ===== 小屏幕适配 ===== */
@media (max-width: 600px) {
    .card, .container {
        padding: 24px 16px;
    }

    .input-box {
        padding: 6px 12px;
        min-height: 64px;
    }

    .input-box i {
        margin-right: 10px;
        font-size: 20px;
        width: 24px;
    }

    .input-box input,
    .input-box select {
        font-size: 18px;
        padding: 12px 0;
    }

    .password-row {
        min-height: 64px;
        gap: 6px;
    }

    .password-row i {
        font-size: 20px;
        width: 24px;
    }

    .password-row input {
        font-size: 18px;
        padding: 12px 0;
    }

    .password-toggle {
        padding: 10px 4px;
        font-size: 20px;
    }

    .login-btn,
    .register-btn {
        padding: 18px 24px;
        font-size: 22px;
    }

    .footer-links {
        font-size: 16px;
    }

    .slider-block {
        padding: 16px 18px;
        margin: 20px 0;
    }

    .slider-message {
        font-size: 17px;
    }

    .puzzle-track {
        height: 56px;
    }

    .puzzle-gap,
    .puzzle-piece {
        width: 44px;
        height: 44px;
    }

    .puzzle-gap i,
    .puzzle-piece i {
        font-size: 26px;
    }

    .info-row {
        font-size: 18px;
    }

    .info-label {
        width: 80px;
    }

    .trans-table {
        font-size: 14px;
    }

    /* 管理后台批量操作在窄屏时堆叠 */
    .batch-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-actions input,
    .batch-actions button {
        width: 100%;
    }

    /* 小屏时操作列按钮可换行 */
    .admin-table td:last-child {
        gap: 4px;
    }
}