.collab-page {
    min-height: 100vh;
    background: var(--oraia-bg);
    color: var(--oraia-text-primary);
    padding-bottom: 4rem;
}

.collab-hero {
    position: relative;
    padding: 4.5rem 1.5rem 6rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8));
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.collab-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% -10%, rgba(56, 189, 248, 0.28), transparent 55%),
        radial-gradient(circle at 90% 0%, rgba(45, 212, 191, 0.25), transparent 52%);
    pointer-events: none;
}

.collab-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    text-align: center;
}

.collab-hero-text h1 {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #67e8f9, #22d3ee 45%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.collab-hero-text p {
    margin: 0;
    max-width: 720px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.75);
}

.collab-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: min(680px, 100%);
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(94, 234, 212, 0.28);
    border-radius: 14px;
    padding: 0.6rem 0.6rem 0.6rem 0.85rem;
    box-shadow: 0 24px 60px -30px rgba(14, 165, 233, 0.55);
    backdrop-filter: blur(12px);
    margin: 0 auto;
}

.collab-search svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: rgba(125, 211, 252, 0.9);
}

.collab-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--oraia-text-primary);
    padding: 0.2rem 0.4rem;
}

.collab-search input::placeholder {
    color: rgba(226, 232, 240, 0.6);
}

.collab-search input:focus {
    outline: none;
}

.collab-search .collab-chip {
    margin-left: auto;
}

.collab-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: none;
    background: rgba(148, 163, 184, 0.18);
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-chip:hover,
.collab-chip:focus-visible {
    background: rgba(94, 234, 212, 0.35);
    color: #0f172a;
    outline: none;
}

.collab-metrics {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.collab-metrics::-webkit-scrollbar {
    height: 6px;
}

.collab-metrics::-webkit-scrollbar-thumb {
    background: rgba(94, 234, 212, 0.35);
    border-radius: 999px;
}

.metric-card {
    padding: 1.25rem 1.4rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(94, 234, 212, 0.18);
    box-shadow: 0 20px 45px -32px rgba(56, 189, 248, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 200px;
    flex: 0 0 auto;
}

.metric-label {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.65);
}

.metric-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: #f8fafc;
}

.collab-body {
    max-width: 1320px;
    margin:22px auto 0;
    padding: 0 clamp(1rem, 3vw, 2.75rem);
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: clamp(1.75rem, 3vw, 2.75rem);
    align-items: flex-start;
}

.collab-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 110px;
    align-self: flex-start;
    min-width: 0;
}

.sidebar-section {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    padding: 1.6rem 1.5rem;
    box-shadow: 0 24px 50px -35px rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(14px);
}

.sidebar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.sidebar-heading h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.link-btn {
    border: none;
    background: transparent;
    color: rgba(94, 234, 212, 0.9);
    font-size: 0.85rem;
    cursor: pointer;
}

.link-btn:hover,
.link-btn:focus-visible {
    text-decoration: underline;
    outline: none;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.sidebar-group label {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.62);
}

.sidebar-group select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.65);
    color: var(--oraia-text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-group select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.favorite-item span {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.88);
}

.favorite-item button {
    border: none;
    background: rgba(59, 130, 246, 0.18);
    color: rgba(191, 219, 254, 0.95);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
}

.favorite-item button:hover,
.favorite-item button:focus-visible {
    background: rgba(59, 130, 246, 0.35);
    color: #0f172a;
    outline: none;
}

.favorites-empty {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.6);
}

.sidebar-insight {
    background: linear-gradient(140deg, rgba(15, 118, 110, 0.22), rgba(14, 165, 233, 0.18));
    border: 1px solid rgba(45, 212, 191, 0.35);
}

.insight-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.78);
}

.collab-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.collab-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    box-shadow: 0 20px 45px -35px rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(14px);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-toggle {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.view-btn {
    border: none;
    background: transparent;
    color: rgba(148, 163, 184, 0.9);
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

.view-btn.is-active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(59, 130, 246, 0.6));
    color: #0f172a;
    box-shadow: 0 12px 30px -18px rgba(56, 189, 248, 0.7);
}

.sort-select {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.sort-select label {
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sort-select select {
    border: none;
    background: transparent;
    color: var(--oraia-text-primary);
    font-size: 0.85rem;
}

.sort-select select:focus {
    outline: none;
}

.results-label {
    font-size: 0.92rem;
    color: rgba(226, 232, 240, 0.75);
}

.collab-results {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    padding: clamp(1.3rem, 2vw, 1.75rem);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: clamp(1.25rem, 2.5vw, 1.8rem);
    min-height: 320px;
    box-shadow: 0 22px 55px -35px rgba(15, 23, 42, 0.85);
}

.collab-results.list-view {
    grid-template-columns: 1fr;
}

.collab-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.6rem 1.5rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(59, 130, 246, 0.28);
    box-shadow: 0 18px 40px -30px rgba(59, 130, 246, 0.6);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.collab-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.65);
    box-shadow: 0 25px 55px -28px rgba(96, 165, 250, 0.65);
}

.collab-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.collab-avatar {
    position: relative;
    flex-shrink: 0;
}

.collab-avatar img {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid rgba(94, 234, 212, 0.32);
    background: rgba(15, 23, 42, 0.9);
}

.favorite-toggle {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(94, 234, 212, 0.35);
    background: rgba(15, 23, 42, 0.95);
    color: rgba(226, 232, 240, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-toggle:hover,
.favorite-toggle:focus-visible {
    color: rgba(253, 224, 71, 0.95);
    outline: none;
}

.favorite-toggle.is-active {
    background: rgba(253, 224, 71, 0.92);
    border-color: rgba(253, 224, 71, 0.95);
    color: #0f172a;
}

.collab-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.collab-card-info h3 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 600;
    color: #f8fafc;
}

.collab-card-role {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(190, 227, 248, 0.9);
}

.collab-card-institution {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.68);
}

.collab-card-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.collab-summary {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.78);
}

.collab-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.collab-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.collab-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.8rem;
}

.collab-meta-item svg {
    width: 14px;
    height: 14px;
}

.collab-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.collab-tag {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(14, 165, 233, 0.18);
    color: #bae6fd;
    font-size: 0.78rem;
}

.collab-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
}

.collab-actions button {
    flex: 1;
    min-width: 130px;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
    border: none;
}

.collab-actions button svg {
    width: 16px;
    height: 16px;
}

.btn-outline {
    background: rgba(59, 130, 246, 0.16);
    color: rgba(191, 219, 254, 0.95);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: rgba(59, 130, 246, 0.35);
    color: #0f172a;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0f172a;
    box-shadow: 0 18px 35px -24px rgba(14, 165, 233, 0.75);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    box-shadow: 0 24px 45px -24px rgba(14, 165, 233, 0.9);
    outline: none;
}

.collab-card.list-view {
    flex-direction: row;
    align-items: stretch;
}

.collab-card.list-view .collab-card-header {
    flex: 0 0 210px;
    flex-direction: column;
    align-items: flex-start;
}

.collab-card.list-view .collab-card-main {
    flex: 1;
    padding-right: 0.75rem;
}

.collab-card.list-view .collab-actions {
    flex: 0 0 210px;
    flex-direction: column;
    justify-content: center;
}

.collab-card.list-view .collab-actions button {
    width: 100%;
}

.collab-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.95rem;
}

.collab-empty h3 {
    margin-bottom: 0.75rem;
    color: #e2e8f0;
}

.collab-empty p {
    margin: 0;
}

.collab-empty .loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(226, 232, 240, 0.18);
    border-top-color: rgba(94, 234, 212, 0.85);
    margin: 0 auto 1.2rem;
    animation: spin 1s linear infinite;
}

@media (max-width: 1080px) {
    .collab-body {
        grid-template-columns: 1fr;
        margin-top: 16px;
    }

    .collab-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-section {
        flex: 1 1 320px;
    }

    .collab-card.list-view {
        flex-direction: column;
    }

    .collab-card.list-view .collab-card-header,
    .collab-card.list-view .collab-actions {
        flex: none;
        width: auto;
    }
}

@media (max-width: 768px) {
    .collab-hero {
        padding: 3.5rem 1rem 4.5rem;
    }

    .collab-hero-content {
        gap: 2rem;
    }

    .collab-search {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.6rem;
    }

    .collab-search input {
        padding: 0.45rem 0.6rem;
    }

    .collab-metrics {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: hidden;
    }

    .metric-card {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: 160px;
    }

    .collab-sidebar {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar-section {
        padding: 1.2rem 1.1rem;
    }

    .collab-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .toolbar-right {
        justify-content: space-between;
        gap: 0.75rem;
    }

    .collab-results {
        grid-template-columns: 1fr;
        padding: 1.15rem;
    }

    .collab-actions {
        flex-direction: column;
    }

    .collab-actions button {
        width: 100%;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

