.prompt-page,
.prompt-page *,
.prompt-page *::before,
.prompt-page *::after {
    box-sizing: border-box;
}

.prompt-page {
    padding: 28px 0 56px;
    background:
        radial-gradient(circle at top left, rgba(91, 141, 255, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(120, 84, 255, 0.06), transparent 24%),
        #f6f8fc;
}

.prompt-page .main-content-full {
    width: 100% !important;
    float: none !important;
}

.prompt-header {
    margin-bottom: 26px;
    position: relative;
}

.prompt-header-text {
    padding: 8px 0 18px;
    border-bottom: 1px solid #e8edf5;
}

.prompt-header h1 {
    margin: 0 0 10px !important;
    font-size: 36px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    letter-spacing: -0.03em;
    color: #0f172a !important;
}

.prompt-header p {
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.9 !important;
    color: #64748b !important;
    max-width: 900px;
}

.prompt-filter-box {
    margin-bottom: 26px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(10px);
}

.prompt-filter-title {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.prompt-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.prompt-filter-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569 !important;
    text-decoration: none !important;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    transition: all 0.22s ease;
}

.prompt-filter-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(64, 101, 246, 0.08);
    color: #4065f6;
    font-size: 11px;
    font-weight: 800;
}

.prompt-filter-item:hover {
    color: #2449dd !important;
    background: #f5f8ff;
    border-color: #cdd9ff;
    transform: translateY(-1px);
}

.prompt-filter-item.active {
    color: #fff !important;
    background: linear-gradient(135deg, #4065f6, #7b61ff);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(64, 101, 246, 0.28);
}

.prompt-filter-item.active span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.prompt-grid {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.masonry-item,
.prompt-card,
.prompt-thumb-wrap {
    margin: 0 !important;
    padding: 0 !important;
}

.masonry-item {
    display: block;
    will-change: transform;
}

.prompt-card {
    position: relative;
    border-radius: 22px;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.32s ease;
}

.prompt-card:hover {
    z-index: 5;
}

.prompt-thumb-wrap {
    display: block;
    width: 100%;
}

.prompt-thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04);
    isolation: isolate;
}

.prompt-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}

.prompt-main-link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}

.prompt-thumb img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    vertical-align: top;
    transition: transform 0.6s cubic-bezier(.2,.7,.2,1), filter 0.45s ease;
    backface-visibility: hidden;
}

.prompt-card:hover .prompt-thumb img {
    transform: scale(1.045);
    filter: brightness(0.68) saturate(1.05);
}

.prompt-topbar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 8;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.prompt-topbar-left,
.prompt-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt-topbar-right {
    justify-content: flex-end;
}

.prompt-platform-badge,
.prompt-view-badge {
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 10px);
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prompt-platform-badge {
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.prompt-view-badge {
    color: #fff;
    background: rgba(64, 101, 246, 0.78);
    box-shadow: 0 6px 18px rgba(64, 101, 246, 0.24);
    flex-shrink: 0;
}

.prompt-icon-btn {
    pointer-events: auto;
    appearance: none;
    border: 0;
    outline: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-size: 15px;
    line-height: 1;
}

.prompt-icon-btn:hover {
    transform: translateY(-1px) scale(1.04);
    background: rgba(64, 101, 246, 0.88);
}

.prompt-fav-btn.active {
    background: linear-gradient(135deg, #ff4d6d, #ff758f);
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.28);
}

.prompt-fav-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.prompt-copy-btn.copied {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
}

.prompt-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.32s ease, visibility 0.32s ease;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.54) 42%, rgba(2, 6, 23, 0.08) 100%);
}

.prompt-card:hover .prompt-overlay {
    opacity: 1;
    visibility: visible;
}

.prompt-overlay-glow {
    position: absolute;
    inset: auto auto -20% -10%;
    width: 70%;
    height: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.28), transparent 68%);
    filter: blur(12px);
    pointer-events: none;
}

.prompt-overlay-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 18px;
    color: #fff;
}

.prompt-normal-info {
    display: block;
}

.prompt-compact-info {
    display: none;
}

.prompt-mini-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.prompt-mini-meta span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.prompt-title,
.prompt-compact-title {
    margin: 0 0 10px !important;
    color: #fff !important;
    font-size: 19px !important;
    line-height: 1.4 !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-desc {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 13px !important;
    line-height: 1.75 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.prompt-class-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.prompt-class-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
}

.prompt-bottom-bar,
.prompt-compact-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.prompt-author {
    min-width: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.5;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prompt-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f7cff, #7b61ff);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(79, 124, 255, 0.28);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prompt-card:hover .prompt-action {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(79, 124, 255, 0.34);
}

/* 高度低于250px：改成上下结构 */
.prompt-card.is-compact-card .prompt-overlay {
    align-items: flex-end;
    background:
        linear-gradient(to top, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.60) 52%, rgba(2, 6, 23, 0.10) 100%);
}

.prompt-card.is-compact-card .prompt-overlay-glow {
    inset: auto auto -12% -6%;
    width: 58%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.28), transparent 70%);
    filter: blur(14px);
}

.prompt-card.is-compact-card .prompt-overlay-inner {
    display: block;
    padding: 14px 16px;
}

.prompt-card.is-compact-card .prompt-normal-info {
    display: none !important;
}

.prompt-card.is-compact-card .prompt-compact-info {
    display: block;
}

.prompt-card.is-compact-card .prompt-compact-title {
    margin: 0 0 10px !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.prompt-card.is-compact-card .prompt-compact-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.prompt-toast {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%) translateY(8px);
    z-index: 12;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.22s ease;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.prompt-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.prompt-empty {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.prompt-empty h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #111827;
}

.prompt-empty p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.pagebar {
    margin-top: 38px;
    text-align: center;
}

.pagebar a,
.pagebar span {
    display: inline-block;
    padding: 9px 16px;
    margin: 0 4px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.pagebar a {
    color: #475569;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.pagebar a:hover {
    color: #4065f6;
    border-color: #d5ddff;
    background: #fff;
    transform: translateY(-1px);
}

.pagebar .now,
.pagebar .current {
    color: #fff;
    background: linear-gradient(135deg, #4065f6, #7b61ff);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(64, 101, 246, 0.26);
}

@media (max-width: 1100px) {
    .prompt-header h1 {
        font-size: 30px !important;
    }

    .prompt-title,
    .prompt-compact-title {
        font-size: 17px !important;
    }
}

@media (max-width: 768px) {
    .prompt-page {
        padding: 20px 0 38px;
    }

    .prompt-header {
        margin-bottom: 18px;
    }

    .prompt-header-text {
        padding-bottom: 14px;
    }

    .prompt-header h1 {
        font-size: 24px !important;
    }

    .prompt-header p {
        font-size: 14px !important;
    }

    .prompt-filter-box {
        margin-bottom: 18px;
        padding: 14px;
        border-radius: 16px;
    }

    .prompt-filter-list {
        gap: 8px;
    }

    .prompt-filter-item {
        font-size: 12px;
        padding: 8px 12px;
    }

    .prompt-topbar {
        top: 10px;
        left: 10px;
        right: 10px;
        gap: 6px;
    }

    .prompt-topbar-left,
    .prompt-topbar-right {
        gap: 6px;
    }

    .prompt-platform-badge,
    .prompt-view-badge {
        font-size: 11px;
        padding: 6px 9px;
    }

    .prompt-icon-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .prompt-overlay {
        opacity: 1;
        visibility: visible;
        background: linear-gradient(to top, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.48) 45%, rgba(2, 6, 23, 0.06) 100%);
    }

    .prompt-thumb img {
        filter: brightness(0.78);
    }

    .prompt-overlay-inner {
        padding: 14px;
    }

    .prompt-title,
    .prompt-compact-title {
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }

    .prompt-desc {
        font-size: 12px !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 10px;
    }

    .prompt-class-line {
        margin-bottom: 10px;
    }

    .prompt-class-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .prompt-author {
        font-size: 11px;
    }

    .prompt-action {
        padding: 8px 12px;
        font-size: 11px;
    }

    .prompt-card.is-compact-card .prompt-overlay-inner {
        padding: 12px 14px;
    }

    .prompt-card.is-compact-card .prompt-compact-title {
        font-size: 14px !important;
        line-height: 1.35 !important;
    }

    .prompt-card.is-compact-card .prompt-compact-bottom {
        gap: 10px;
    }

    .prompt-toast {
        font-size: 11px;
        padding: 9px 11px;
    }

    .pagebar a,
    .pagebar span {
        padding: 8px 12px;
        margin: 0 3px;
        font-size: 13px;
    }
}

@media (max-width: 520px) {
    .prompt-grid {
        min-height: auto;
        height: auto !important;
    }

    .masonry-item {
        position: relative !important;
        width: 100% !important;
        transform: none !important;
        margin: 0 0 16px 0 !important;
    }

    .prompt-thumb {
        border-radius: 18px;
    }

    .prompt-card {
        border-radius: 18px;
    }
}
