/* AICoder Gym 广告小卡 — 题库列表 / 代码笔记详情 */

.ac-promo-card {
    --ac-cyan: #06b6d4;
    --ac-blue: #2563eb;
    --ac-grad: linear-gradient(135deg, #06b6d4, #2563eb);
    --ac-soft: rgba(6, 182, 212, 0.10);
    --ac-text: #1a1a1a;
    --ac-muted: #5c5c5c;
    --ac-bg: #fff;
    --ac-border: rgba(15, 23, 42, 0.08);
    --ac-ease: cubic-bezier(0.1, 0.9, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 20px;
    padding: 14px 40px 14px 18px;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 12px;
    background: var(--ac-bg);
    border: 1px solid var(--ac-border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 4px 16px rgba(15, 23, 42, 0.05);
}

.ac-promo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(220px 100px at 96% -20%, rgba(6, 182, 212, 0.12), transparent 60%),
        radial-gradient(180px 90px at 0% 120%, rgba(37, 99, 235, 0.07), transparent 60%);
    pointer-events: none;
}

.ac-promo-card__main,
.ac-promo-card__actions {
    position: relative;
    z-index: 1;
}

.ac-promo-card__main {
    min-width: 0;
    flex: 1;
}

.ac-promo-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ac-promo-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0891b2;
    background: var(--ac-soft);
    border: 1px solid rgba(6, 182, 212, 0.22);
}

.ac-promo-card__title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    background: var(--ac-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ac-promo-card__desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ac-muted);
}

.ac-promo-card__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.ac-promo-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s var(--ac-ease), box-shadow 0.15s var(--ac-ease), filter 0.15s ease, background 0.15s ease;
}

.ac-promo-card__btn:hover {
    transform: translateY(-1px);
}

.ac-promo-card__btn:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

.ac-promo-card__btn--primary {
    background: var(--ac-grad);
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(6, 182, 212, 0.28);
}

.ac-promo-card__btn--primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 5px 14px rgba(6, 182, 212, 0.36);
}

.ac-promo-card__btn--ghost {
    background: var(--ac-soft);
    color: #0891b2 !important;
    border: 1px solid rgba(6, 182, 212, 0.35);
}

.ac-promo-card__btn--ghost:hover {
    background: rgba(6, 182, 212, 0.16);
}

.ac-promo-card__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #8c8c8c;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.ac-promo-card__close:hover {
    color: #424242;
    background: rgba(0, 0, 0, 0.05);
}

.ac-promo-card__close:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

.ac-promo-card--list {
    max-width: 640px;
    width: 100%;
    margin: 0 auto 20px;
    padding: 16px 40px 16px 20px;
}

.ac-promo-card--list .ac-promo-card__title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ac-promo-card--note {
    margin: 0 0 20px;
}

.ac-promo-card--hidden {
    display: none !important;
}

.theme--dark .ac-promo-card {
    --ac-soft: rgba(6, 182, 212, 0.20);
    --ac-text: #f3f3f3;
    --ac-muted: #a0a0a0;
    --ac-bg: #1c1c1e;
    --ac-border: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 4px 16px rgba(0, 0, 0, 0.28);
}

.theme--dark .ac-promo-card__badge {
    color: #22d3ee;
    border-color: rgba(6, 182, 212, 0.35);
}

.theme--dark .ac-promo-card__close {
    color: #8b949e;
}

.theme--dark .ac-promo-card__close:hover {
    color: #e6edf3;
    background: rgba(255, 255, 255, 0.08);
}

.theme--dark .ac-promo-card__btn--ghost {
    color: #22d3ee !important;
    background: rgba(6, 182, 212, 0.18);
    border-color: rgba(6, 182, 212, 0.4);
}

.theme--dark .ac-promo-card__btn--ghost:hover {
    background: rgba(6, 182, 212, 0.28);
}

@media (max-width: 700px) {
    .ac-promo-card {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 36px 14px 14px;
    }

    .ac-promo-card__actions {
        flex-wrap: wrap;
    }

    .ac-promo-card__btn {
        flex: 1;
    }

    .ac-promo-card--list .ac-promo-card__title {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ac-promo-card__btn,
    .ac-promo-card__close {
        transition: none;
    }

    .ac-promo-card__btn:hover {
        transform: none;
    }
}
