/* =======================================================
   云盘分享页
   列表、筛选、提取码与复制反馈
   ======================================================= */

.share-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 26px;
}

.share-toolbar[hidden] {
    display: none;
}

.share-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.share-filter span {
    min-width: 20px;
    padding: 1px 6px;
    color: inherit;
    background: rgba(127, 127, 127, 0.12);
    border-radius: 999px;
    font-size: 0.66rem;
    text-align: center;
}

.share-filter:hover,
.share-filter.is-active {
    color: var(--bg-primary);
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.share-filter.is-active span,
.share-filter:hover span {
    background: rgba(255, 255, 255, 0.22);
}

.share-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.share-search:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(77, 107, 254, 0.12);
}

.share-search i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.share-search input {
    width: 220px;
    max-width: 54vw;
    padding: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.84rem;
    font-family: inherit;
}

.share-search input::placeholder {
    color: var(--text-secondary);
    opacity: 0.72;
}

.share-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.share-source-select {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.76rem;
}

.share-source-select select {
    padding: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: 0;
    font-family: inherit;
    font-size: 0.76rem;
    cursor: pointer;
}

.share-result-count {
    padding: 6px 10px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.72rem;
    white-space: nowrap;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.share-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.share-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0.8;
}

.share-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--glow);
}

.share-card.is-expired {
    opacity: 0.72;
}

.share-card.is-expired:hover {
    transform: none;
    box-shadow: none;
}

.share-card.is-planned {
    border-style: dashed;
}

.share-card.is-planned::before {
    opacity: 0.35;
}

.share-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.share-platform {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    color: var(--primary-color);
    background: rgba(127, 127, 127, 0.08);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.share-platform i {
    font-size: 0.74rem;
}

.share-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.share-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

.share-status.is-active {
    color: #16a34a;
}

.share-status.is-expired {
    color: #ef4444;
}

.share-status.is-planned {
    color: #d97706;
}

body.theme-dark .share-status.is-active {
    color: #4ade80;
}

body.theme-dark .share-status.is-expired {
    color: #f87171;
}

body.theme-dark .share-status.is-planned {
    color: #fbbf24;
}

.share-card h3 {
    margin: 14px 0 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.45;
}

.share-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.share-badge {
    padding: 3px 8px;
    color: var(--text-secondary);
    background: rgba(127, 127, 127, 0.07);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.66rem;
    line-height: 1.5;
}

.share-source.is-original {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.22);
}

.share-source.is-repost {
    color: #d97706;
    background: rgba(217, 119, 6, 0.09);
    border-color: rgba(217, 119, 6, 0.24);
}

body.theme-dark .share-source.is-original {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.24);
}

body.theme-dark .share-source.is-repost {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.24);
}

.share-credit {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.6;
}

.share-credit i {
    margin-right: 4px;
    color: var(--primary-color);
}

.share-credit a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.share-desc {
    margin: 0 0 14px;
    color: var(--text-secondary);
    font-size: 0.87rem;
    line-height: 1.75;
}

.share-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 14px;
    padding: 10px 12px;
    list-style: none;
    background: rgba(127, 127, 127, 0.06);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.share-files li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.share-files li i {
    flex: 0 0 auto;
    color: var(--primary-color);
    font-size: 0.7rem;
}

.share-files li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-files .share-file-more {
    color: var(--text-secondary);
    font-size: 0.72rem;
    opacity: 0.8;
}

.share-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.share-tags span {
    padding: 3px 8px;
    color: var(--text-secondary);
    background: rgba(127, 127, 127, 0.07);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.68rem;
}

.share-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.share-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.share-meta i {
    color: var(--primary-color);
    opacity: 0.8;
}

.share-code {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 9px 11px;
    background: rgba(127, 127, 127, 0.06);
    border: 1px dashed var(--border-light);
    border-radius: 10px;
}

.share-code-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    white-space: nowrap;
}

.share-code-label i {
    color: var(--primary-color);
}

.share-code code {
    flex: 1;
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-code button,
.share-copy {
    flex: 0 0 auto;
    padding: 5px 10px;
    color: var(--primary-color);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.share-code button:hover,
.share-copy:hover {
    color: var(--bg-primary);
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.share-note-line {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 0.74rem;
}

.share-note-line i {
    margin-right: 5px;
    color: var(--accent-color);
}

.share-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--border-light);
}

.share-actions .btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    text-align: center;
}

.share-actions .share-open.is-disabled,
.share-actions .share-open:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.share-actions .share-copy {
    padding: 9px 12px;
}

.share-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 62px 24px;
    text-align: center;
    background: var(--card-bg);
    border: 1px dashed var(--border-light);
    border-radius: 20px;
}

.share-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    color: var(--primary-color);
    background: rgba(127, 127, 127, 0.08);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 1.4rem;
}

.share-empty h3 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 1.15rem;
}

.share-empty p {
    max-width: 520px;
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.8;
}

.share-empty-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-bottom: 22px;
}

.share-empty-tags span {
    padding: 4px 10px;
    color: var(--text-secondary);
    background: rgba(127, 127, 127, 0.07);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.72rem;
}

.share-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.share-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.share-info-card {
    padding: 22px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
}

.share-info-card > i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    color: var(--primary-color);
    background: rgba(127, 127, 127, 0.08);
    border-radius: 11px;
}

.share-info-card h3 {
    margin: 0 0 7px;
    color: var(--text-primary);
    font-size: 1rem;
}

.share-info-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.75;
}

.fee-resource-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.fee-resource-card:hover {
    opacity: 1;
    transform: translateY(-3px);
    border-color: #2f8f4e;
    box-shadow: 0 16px 40px rgba(47, 143, 78, 0.14);
}

.fee-resource-icon {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
}

.fee-resource-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fee-resource-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.fee-resource-badge {
    color: #2f8f4e;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fee-resource-copy strong {
    color: var(--text-primary);
    font-size: 1.12rem;
    line-height: 1.4;
}

.fee-resource-copy small {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.7;
}

.fee-resource-link {
    flex: 0 0 auto;
    color: #2f8f4e;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.fee-resource-link i {
    margin-left: 4px;
    transition: transform 0.25s ease;
}

.fee-resource-card:hover .fee-resource-link i {
    transform: translateX(4px);
}

body.theme-dark .fee-resource-badge,
body.theme-dark .fee-resource-link {
    color: #4ade80;
}

.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    z-index: 2100;
    padding: 11px 18px;
    color: var(--bg-primary);
    background: var(--text-primary);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.share-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 768px), (orientation: portrait) {
    .share-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .share-toolbar-right {
        width: 100%;
    }

    .share-search {
        flex: 1 1 100%;
        width: 100%;
    }

    .share-search input {
        width: 100%;
        max-width: none;
    }

    .share-grid {
        grid-template-columns: 1fr;
    }

    .fee-resource-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .fee-resource-link {
        width: 100%;
        padding-left: 82px;
    }
}

@media (max-width: 480px) {
    .share-card {
        padding: 19px;
    }

    .fee-resource-card {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .fee-resource-link {
        padding-left: 0;
    }

    .share-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .share-actions .share-copy {
        width: 100%;
    }

    .share-empty {
        padding: 48px 18px;
    }
}
