/* 容器卡片 */
.ios-card-container {
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background-color: var(--theme-palette-color-9);
    max-width: 64rem;
    width: 100%;
    overflow: hidden;
}

/* Flex布局 */
.ios-flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
}

.ios-flex-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

/* 图标 */
.ios-icon {
    width: 4rem;
    height: 4rem;
    flex-shrink: 0;
    border-radius: 1rem;
    background: linear-gradient(to bottom right, #60a5fa, #a78bfa);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

/* 文本 */
.ios-text-part {
    margin-left: 1rem;
    flex-grow: 1;
    min-width: 0;
}

.ios-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--theme-palette-color-4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ios-desc {
    font-size: 0.875rem;
    line-height: 1.3;
    color: var(--theme-palette-color-18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 按钮 */
.ios-button-part {
    flex-shrink: 0;
    margin-left: 1rem;
}

.ios-btn {
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.ios-btn-blue {
    background-color: #3b82f6;
    color: #fff;
}

.ios-btn-blue:hover {
    background-color: #2563eb;
}

.ios-btn-green {
    background-color: #22c55e;
    color: #fff;
}

.ios-btn-green:hover {
    background-color: #16a34a;
}

.ios-btn-yellow {
    background-color: #facc15;
    color: #000;
}

.ios-btn-yellow:hover {
    background-color: #eab308;
}

.ios-btn-text {
    background: transparent;
    color: #3b82f6;
}

/* 分割线 */
.ios-divider {
    height: 1px;
    background-color: var(--theme-palette-color-20);
}

.ios-divider-vertical {
    width: 1px;
    background-color: var(--theme-palette-color-20);
}

/* 表格列 */
.ios-scroll-wrapper {
    padding: 1rem 1.5rem;
    overflow-x: auto;
}

.ios-scroll-row {
    display: flex;
    gap: 2rem;
    min-width: max-content;
}

.ios-table-col {
    text-align: center;
    min-width: 100px;
}

.ios-table-header {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--theme-palette-color-18);
}

.ios-table-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--theme-palette-color-4);
}

/* 弹窗 */
.ios-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.ios-modal.hidden {
    display: none;
}

/* 背景遮罩 */
.ios-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    /* 初始透明 */
    transition: opacity 0.2s ease;
    /*  过渡 */
}

/* 显示状态 */
.ios-modal-bg.active {
    opacity: 1;
    /* 淡入 */
}

.ios-modal-content {
    border-radius: 1.5rem;
    width: 18rem;
    background-color: var(--theme-palette-color-9);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease-out;
    z-index: 10;
    backdrop-filter: blur(28px) saturate(180%);
}

.ios-modal-show {
    transform: scale(1);
    opacity: 1;
}

.ios-modal-body {
    padding: 1.5rem;
    text-align: center;
}

.ios-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--theme-palette-color-4);
}

.ios-modal-text {
    font-size: 0.875rem;
    color: var(--theme-palette-color-18);
}

.ios-bold {
    font-weight: 500;
    word-break: break-all;
}

.ios-modal-footer {
    display: flex;
    width: 100%;
}

.ios-modal-footer button {
    flex: 1;
    /* 每个按钮占据一半 */
    padding: 0.75rem 0;
    /* 上下留白 */
    font-weight: 600;
    text-align: center;
    border: none;
    background: transparent;
    cursor: pointer;
}

/* 单独设置圆角 */
#cancelBtn {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 24px;
}

#confirmBtn {
    border-bottom-left-radius: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    border-bottom-right-radius: 24px;
}

/* 小屏优化 */
@media (max-width: 500px) {
    .ios-responsive-stack {
        flex-direction: column;
        align-items: center;
    }

    .ios-flex-left {
        flex-direction: column;
        align-items: center;
    }

    .ios-text-part {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .ios-button-part {
        margin-left: 0;
        margin-top: 1rem;
        align-self: center;
    }

    .responsive-stack .text-part {
        margin-left: 0 !important;
        margin-top: 0.5rem;
        white-space: normal !important;
        /*  允许换行 */
        overflow: visible !important;
        /*  避免 truncate */
    }

    .ios-title {
        overflow: visible !important;
        white-space: normal !important;
        text-align: center;
    }

    .ios-desc {
        overflow: visible !important;
        white-space: normal !important;
        text-align: center;
    }
}

/* 隐藏滚动条 */
.ios-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.ios-modal-footer button:hover {
    background-color: rgba(0, 0, 0, 0.07);
}

/* 整个弹窗容器 */
#iosModal {
    z-index: 99999;
    /*  把容器本身放到顶层 */
}

/* 背景遮罩 */
.ios-modal-bg {
    z-index: 99999;
    /*  遮罩层 */
}

/* 弹窗内容 */
#modalContent {
    z-index: 100000;
    /*  保证内容层永远在遮罩之上 */
}


.mtios-card {
    background: var(--theme-palette-color-9);
}