/* ================================================================
   SDK H5 全局样式
   自研游戏统一发行SDK - H5业务层
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* ---- 通用容器 ---- */
.sdk-page {
    min-height: 100vh;
    padding: 20px 16px 30px;
    max-width: 500px;
    margin: 0 auto;
}

.sdk-header {
    text-align: center;
    padding: 30px 0 20px;
}

.sdk-header h1 {
    font-size: 22px;
    color: #1976D2;
    font-weight: 700;
}

.sdk-header p {
    font-size: 13px;
    color: #999;
    margin-top: 6px;
}

/* ---- 卡片 ---- */
.sdk-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.sdk-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* ---- 表单 ---- */
.sdk-form-group {
    margin-bottom: 14px;
}

.sdk-form-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.sdk-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.sdk-input:focus {
    border-color: #1976D2;
}

.sdk-input.error {
    border-color: #f44336;
}

.sdk-input-row {
    display: flex;
    gap: 8px;
}

.sdk-input-row .sdk-input {
    flex: 1;
}

/* ---- 按钮 ---- */
.sdk-btn {
    display: inline-block;
    width: 100%;
    height: 46px;
    line-height: 46px;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sdk-btn:active {
    opacity: 0.85;
}

.sdk-btn-primary {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    color: #fff;
}

.sdk-btn-secondary {
    background: #fff;
    color: #1976D2;
    border: 1px solid #1976D2;
}

.sdk-btn-ghost {
    background: transparent;
    color: #999;
    height: auto;
    line-height: 1.5;
    font-size: 13px;
}

.sdk-btn-sm {
    height: 34px;
    line-height: 34px;
    font-size: 13px;
    flex: 0 0 auto;
    padding: 0 16px;
    width: auto;
}

.sdk-btn-danger {
    background: #f44336;
    color: #fff;
}

.sdk-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- 列表 ---- */
.sdk-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

.sdk-list-item:last-child {
    border-bottom: none;
}

.sdk-list-item.active {
    background: #e3f2fd;
    margin: 0 -16px;
    padding: 12px 16px;
    border-radius: 8px;
}

/* ---- 标签 ---- */
.sdk-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.sdk-tag-default {
    background: #1976D2;
    color: #fff;
}

.sdk-tag-success {
    background: #4CAF50;
    color: #fff;
}

.sdk-tag-warning {
    background: #FF9800;
    color: #fff;
}

.sdk-tag-gray {
    background: #e0e0e0;
    color: #666;
}

/* ---- 协议 ---- */
.sdk-agreement {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    padding: 0 4px;
}

.sdk-agreement input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

.sdk-agreement a {
    color: #1976D2;
    text-decoration: none;
}

/* ---- 提示/错误 ---- */
.sdk-tip {
    font-size: 12px;
    color: #999;
    text-align: center;
    padding: 10px 0;
}

.sdk-error {
    font-size: 12px;
    color: #f44336;
    margin-top: 4px;
}

/* ---- 倒计时 ---- */
.sdk-countdown {
    font-size: 24px;
    font-weight: 700;
    color: #1976D2;
    text-align: center;
    padding: 20px 0;
}

/* ---- 空状态 ---- */
.sdk-empty {
    text-align: center;
    padding: 40px 0;
    color: #ccc;
    font-size: 14px;
}

/* ---- 金额 ---- */
.sdk-amount {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    text-align: center;
    padding: 16px 0;
}

.sdk-amount-unit {
    font-size: 16px;
    font-weight: 400;
    color: #999;
}

/* ---- 加载 ---- */
.sdk-loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* ---- 历史账号列表 ---- */
.sdk-history-list {
    margin-top: 16px;
}

.sdk-history-item {
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.sdk-history-item:active {
    background: #e3f2fd;
}

.sdk-history-item .account {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.sdk-history-item .arrow {
    color: #ccc;
    font-size: 16px;
}

/* ---- 横屏适配 ---- */
@media screen and (orientation: landscape) {
    .sdk-page {
        padding: 8px 16px 16px;
        max-width: 500px;
    }

    .sdk-header {
        padding: 12px 0 8px;
    }

    .sdk-header h1 {
        font-size: 18px;
    }

    .sdk-header p {
        font-size: 12px;
        margin-top: 2px;
    }

    .sdk-card {
        padding: 12px 14px;
        margin-bottom: 8px;
    }

    .sdk-card-title {
        font-size: 14px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .sdk-form-group {
        margin-bottom: 8px;
    }

    .sdk-form-group label {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .sdk-input {
        height: 36px;
        font-size: 14px;
        padding: 0 10px;
    }

    .sdk-btn {
        height: 38px;
        line-height: 38px;
        font-size: 14px;
    }

    .sdk-agreement {
        margin-top: 8px;
        font-size: 11px;
    }

    .sdk-tip {
        padding: 4px 0;
        font-size: 11px;
    }

    .sdk-empty {
        padding: 20px 0;
    }

    .sdk-history-item {
        padding: 8px 12px;
        margin-bottom: 4px;
    }

    .sdk-history-item .account {
        font-size: 13px;
    }
}
