:root {
    --primary-blue: #007aff;
    --primary-orange: #ff9500;
    --danger: #ff3b30;
    --success: #34c759;
    --bg-color: #f2f2f7;
    --card-bg: #ffffff;
    --text-main: #1c1c1e;
    --text-sub: #8e8e93;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 20px 16px;
    padding-bottom: 80px;
}

/* 顶部标题 */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* 分段切换控制器 (Tabs) */
.segmented-control {
    display: flex;
    background: rgba(118, 118, 128, 0.12);
    border-radius: 9px;
    padding: 2px;
    margin-bottom: 24px;
    position: relative;
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    border-radius: 7px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.tab-btn.active {
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
}

/* 容器动画 */
.system-container {
    display: none;
    animation: fadeIn 0.3s ease;
}

.system-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 表单元素 */
.input-group {
    margin-bottom: 12px;
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    font-size: 16px;
    background: #f9f9f9;
    transition: border-color 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--primary-blue);
    background: #fff;
}

.row {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
}

button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-orange {
    background: var(--primary-orange);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-sub);
    font-size: 14px;
    margin-top: 10px;
}

/* 验证码图片 */
.captcha-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

#captcha-img {
    height: 46px;
    border-radius: 8px;
    background-color: #eee;
    cursor: pointer;
}

/* 状态栏 */
.status-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.label {
    font-size: 14px;
    color: var(--text-sub);
}

.value {
    font-size: 16px;
    font-weight: 600;
}

.value.money {
    color: var(--primary-orange);
    font-size: 20px;
}

/* 隐藏工具类 */
.hidden {
    display: none !important;
}

/* 充值网格 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.grid-3 button {
    padding: 10px;
    font-size: 14px;
}

/* ================= iOS 风格开关样式 ================= */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e5ea;
    /* 未选中颜色 */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--success);
    /* 选中后的绿色 */
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.hint-text {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 5px;
    line-height: 1.4;
}