/* 卡片广告位样式 —— 透明容器，卡片框架由外层 .card 提供，避免双层框 */
.io-adslot-box {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: -webkit-transform .3s ease, transform .3s ease;
}

.io-adslot-box:hover {
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

/* 广告角标 */
.io-adslot-tag {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    padding: 3px 10px 4px 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1px;
    border-bottom-left-radius: 8px;
    box-shadow: 0 2px 6px rgba(192,57,43,.35);
    pointer-events: none;
}

.io-adslot-square {
    aspect-ratio: 1 / 1;
    max-width: 260px;
    max-height: 260px;
    margin-left: auto;
    margin-right: auto;
}

.io-adslot-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 1;
    max-width: 100%;
    max-height: 160px;
}

.io-adslot-link {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.io-adslot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 占位卡片：现代两栏液态玻璃 */
.io-adslot-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    display: -webkit-flex;
    display: flex;
}

/* 左侧视觉区：粉色渐变 + 装饰圆 */
.io-adslot-ph-visual {
    -webkit-flex: 0 0 38%;
    flex: 0 0 38%;
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(245,180,180, calc(.62 + .2 * var(--io-glass-o))) 0%,
        rgba(230,150,162, calc(.62 + .2 * var(--io-glass-o))) 100%);
    overflow: hidden;
}

.io-adslot-ph-visual::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
}

.io-adslot-ph-visual::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
}

.io-adslot-ph-icon {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    margin-bottom: 8px;
    color: #fff;
    font-size: 15px;
}

.io-adslot-ph-label {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,.12);
}

body.io-black-mode .io-adslot-ph-visual {
    background: linear-gradient(135deg,
        rgba(190,95,105, calc(.45 + .2 * var(--io-glass-o))) 0%,
        rgba(165,72,82, calc(.45 + .2 * var(--io-glass-o))) 100%);
}

/* 右侧内容区 */
.io-adslot-ph-content {
    -webkit-flex: 1;
    flex: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 12px 14px;
    min-width: 0;
}

.io-adslot-ph-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--io-glass-tx, #1f2733);
    margin-bottom: 6px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.io-black-mode .io-adslot-ph-title {
    color: #e8eaf0;
}

/* 装饰预览条 */
.io-adslot-ph-bars {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.io-adslot-ph-bar {
    height: 5px;
    border-radius: 3px;
    background: var(--io-glass-bd, rgba(128,128,128,.2));
}

.io-adslot-ph-bar.gold {
    height: 6px;
    width: 55%;
    background: linear-gradient(90deg, #f0b429, #f1c40f);
}

.io-adslot-ph-bar.line1 { width: 85%; }
.io-adslot-ph-bar.line2 { width: 65%; }

.io-adslot-ph-price {
    display: block;
    font-size: 12.5px;
    color: var(--io-glass-tx, #888);
    opacity: .8;
    margin-bottom: 8px;
}

body.io-black-mode .io-adslot-ph-price {
    color: #aab0bc;
}

.io-adslot-buy-btn {
    -webkit-align-self: flex-start;
    align-self: flex-start;
    padding: 6px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: -webkit-transform .3s ease, transform .3s ease, box-shadow .3s ease;
    box-shadow: 0 3px 10px rgba(102,126,234,.35);
}

.io-adslot-buy-btn:hover {
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(102,126,234,.5);
}

/* 响应式：小屏优化 */
@media (max-width: 480px) {
    .io-adslot-ph-visual { -webkit-flex: 0 0 34%; flex: 0 0 34%; }
    .io-adslot-ph-content { padding: 10px 11px; }
    .io-adslot-ph-title { font-size: 13px; }
    .io-adslot-ph-price { font-size: 11.5px; }
    .io-adslot-buy-btn { padding: 5px 14px; font-size: 11.5px; }
}

/* 购买弹窗：玻璃态 */
.io-adslot-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.io-adslot-modal[hidden] {
    display: none;
}

.io-adslot-modal-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,18,25,.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.io-adslot-modal-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--io-glass-bg, rgba(255,255,255,.88));
    -webkit-backdrop-filter: blur(var(--io-glass-blur, 10px)) saturate(150%);
    backdrop-filter: blur(var(--io-glass-blur, 10px)) saturate(150%);
    border: 1px solid var(--io-glass-bd, rgba(255,255,255,.5));
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
}

body.io-black-mode .io-adslot-modal-box {
    background: rgba(30,34,44, calc(.82 * var(--io-glass-o)));
    border-color: rgba(255,255,255, calc(.08 * var(--io-glass-o)));
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

.io-adslot-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--io-glass-bd, rgba(128,128,128,.14));
    color: var(--io-glass-tx, #1f2733);
}

body.io-black-mode .io-adslot-modal-head {
    color: #e8eaf0;
    border-bottom-color: rgba(255,255,255, calc(.08 * var(--io-glass-o)));
}

.io-adslot-modal-title {
    font-size: 17px;
    font-weight: 600;
}

.io-adslot-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--io-glass-tx, #999);
    opacity: .7;
    cursor: pointer;
    transition: opacity .2s;
}

.io-adslot-modal-close:hover {
    opacity: 1;
}

.io-adslot-modal-body {
    padding: 20px 22px;
    max-height: calc(100vh - 220px);
    overflow: auto;
}

.io-adslot-modal-tip {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(47,111,228,.08);
    border: 1px solid rgba(47,111,228,.18);
    color: #2f6fe4;
    font-size: 12.5px;
    line-height: 1.7;
}

body.io-black-mode .io-adslot-modal-tip {
    background: rgba(47,111,228, calc(.16 * var(--io-glass-o)));
    border-color: rgba(110,150,255, calc(.28 * var(--io-glass-o)));
    color: #9cb8ff;
}

.io-adslot-form-group {
    margin-bottom: 15px;
}

.io-adslot-form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--io-glass-tx, #1f2733);
}

body.io-black-mode .io-adslot-form-label {
    color: #f2f4f8;
}

.io-adslot-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(128,128,128,.22);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255,255,255,.65);
    color: #1f2733;
    transition: border-color .2s, background .2s;
}

body.io-black-mode .io-adslot-form-input {
    background: rgba(40,44,58, calc(.7 * var(--io-glass-o)));
    border-color: rgba(255,255,255, calc(.1 * var(--io-glass-o)));
    color: #f2f4f8;
}

.io-adslot-form-input:focus {
    outline: none;
    border-color: #667eea;
}

.io-adslot-upload-area {
    border: 1.5px dashed rgba(128,128,128,.35);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
    color: var(--io-glass-tx, #888);
    font-size: 13px;
}

body.io-black-mode .io-adslot-upload-area {
    border-color: rgba(255,255,255, calc(.16 * var(--io-glass-o)));
}

.io-adslot-upload-area:hover {
    border-color: #667eea;
}

.io-adslot-upload-preview {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

/* 图片裁剪器 */
.io-adslot-cropper {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(128,128,128,.22);
    border-radius: 8px;
    background: rgba(128,128,128,.06);
}

body.io-black-mode .io-adslot-cropper {
    background: rgba(255,255,255, calc(.04 * var(--io-glass-o)));
    border-color: rgba(255,255,255, calc(.1 * var(--io-glass-o)));
}

.io-adslot-cropper-tip {
    font-size: 12.5px;
    color: #e67e22;
    margin-bottom: 8px;
    line-height: 1.6;
}

body.io-black-mode .io-adslot-cropper-tip { color: #ffb74d; }

.io-adslot-cropper-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0a0c10;
    border-radius: 6px;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

.io-adslot-cropper-img {
    display: block;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
    pointer-events: none;
}

.io-adslot-cropper-box {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.55);
    cursor: move;
    box-sizing: border-box;
}

.io-adslot-cropper-handle {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid #333;
    border-radius: 50%;
    cursor: nwse-resize;
    box-sizing: border-box;
}

.io-adslot-cropper-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.io-adslot-cropper-actions button {
    padding: 7px 16px;
    border: 1px solid rgba(128,128,128,.3);
    border-radius: 6px;
    background: rgba(255,255,255,.85);
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}

body.io-black-mode .io-adslot-cropper-actions button {
    background: rgba(40,44,58, calc(.7 * var(--io-glass-o)));
    border-color: rgba(255,255,255, calc(.1 * var(--io-glass-o)));
    color: #e8eaf0;
}

.io-adslot-cropper-actions button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.io-adslot-cropper-actions button:hover { opacity: .9; }

.io-adslot-pay-methods {
    display: flex;
    gap: 10px;
}

.io-adslot-pay-item {
    flex: 1;
    padding: 11px 8px;
    border: 1px solid rgba(128,128,128,.22);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    color: var(--io-glass-tx, #333);
    font-size: 13px;
    display: block;
}

body.io-black-mode .io-adslot-pay-item {
    background: rgba(40,44,58, calc(.55 * var(--io-glass-o)));
    border-color: rgba(255,255,255, calc(.1 * var(--io-glass-o)));
    color: #e8eaf0;
}

.io-adslot-pay-item.on {
    border-color: #667eea;
    background: rgba(102,126,234,.1);
}

body.io-black-mode .io-adslot-pay-item.on {
    background: rgba(102,126,234, calc(.2 * var(--io-glass-o)));
}

.io-adslot-pay-item small {
    display: block;
    font-size: 11px;
    opacity: .65;
    margin-top: 2px;
}

.io-adslot-modal-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--io-glass-bd, rgba(128,128,128,.14));
    display: flex;
    gap: 12px;
}

body.io-black-mode .io-adslot-modal-foot {
    border-top-color: rgba(255,255,255, calc(.08 * var(--io-glass-o)));
}

.io-adslot-btn-cancel,
.io-adslot-btn-submit {
    flex: 1;
    padding: 11px;
    border: none;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.io-adslot-btn-cancel {
    background: rgba(128,128,128,.12);
    color: var(--io-glass-tx, #666);
}

body.io-black-mode .io-adslot-btn-cancel {
    background: rgba(255,255,255, calc(.08 * var(--io-glass-o)));
    color: #aab0bc;
}

.io-adslot-btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.io-adslot-btn-submit:hover {
    opacity: .92;
}

.io-adslot-btn-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 480px) {
    .io-adslot-pay-methods {
        flex-direction: column;
    }
    .io-adslot-modal-body {
        max-height: calc(100vh - 200px);
    }
}
