.collab-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.collab-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.collab-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 1.05rem;
    padding: 12px 4px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px; /* sit on top of the container border */
}

.collab-tab.active {
    color: var(--text-main);
    border-bottom-color: var(--primary);
}

.collab-tab:hover:not(.active) {
    color: var(--text-main);
}

.collab-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.collab-filter-select,
.collab-search-input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: var(--radius);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.collab-filter-select:focus,
.collab-search-input:focus {
    border-color: var(--primary);
}

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

.collab-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.collab-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.collab-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.collab-author-info {
    flex: 1;
    overflow: hidden;
}

.collab-author-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: var(--text-main);
    text-decoration: none;
}

.collab-author-name:hover {
    text-decoration: underline;
}

.collab-author-handle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.collab-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.collab-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.collab-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.collab-meta-item i {
    color: var(--primary);
}

.collab-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}

.collab-tag {
    background: rgba(169, 112, 255, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.collab-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.collab-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collab-badge-online-stream { background: #e91e63; color: white; }
.collab-badge-offline-fun { background: #9c27b0; color: white; }
.collab-badge-vod-recording { background: #2196f3; color: white; }
.collab-badge-gaming { background: #4caf50; color: white; }
.collab-badge-music { background: #ff9800; color: white; }
.collab-badge-chatting { background: #607d8b; color: white; }
.collab-badge-creative { background: #ff5722; color: white; }
.collab-badge-irl { background: #795548; color: white; }
.collab-badge-education { background: #009688; color: white; }
.collab-badge-any { background: var(--surface-hover); color: var(--text-main); }

.collab-badge-size {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.collab-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* My Collab Post Panel */
.my-collab-panel {
    background: linear-gradient(135deg, rgba(169, 112, 255, 0.1), rgba(145, 70, 255, 0.05));
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
}

.my-collab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.my-collab-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.requests-list {
    margin-top: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
}

.request-item {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.request-item:last-child {
    border-bottom: none;
}

.request-message {
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: var(--radius);
    margin: 8px 0;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title-text {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-main);
}

/* Wrap all collab content with consistent padding in default theme */
.collab-page-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Remove extra gap on tabs row since it has its own margin-bottom */
.collab-page-wrap .collab-tabs {
    margin-top: -8px; /* tighten gap between header and tabs */
}

/* Twitch Clean: strip glass from page-header, use border-bottom separator */
body.theme-twitch-clean .collab-board-header {
    padding: 20px 20px 20px 20px;
    margin: 0;
    border-bottom: 1px solid var(--border);
}

body.theme-twitch-clean .collab-page-wrap .collab-tabs {
    margin: 0;
    padding: 0 20px;
}

body.theme-twitch-clean .collab-page-wrap #exploreTabContent,
body.theme-twitch-clean .collab-page-wrap #mineTabContent {
    padding: 0 20px 20px;
}
