/* Book Club CSS Stylesheet */

/* Style native slider thumb color dynamically using accent-color */
#progress-slider {
    accent-color: var(--bc-user-color, gray) !important;
}
/* Progress Bar Markers */
#bc-progress-markers {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Wrapper: absolutely positioned at exact pixel X */
.bc-progress-dot-wrapper {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Single member dot */
.bc-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid Canvas;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.bc-progress-dot-wrapper:hover .bc-progress-dot {
    transform: scale(1.4);
}

/* Stack (multiple members close together) */
.bc-progress-stack {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Each ring in the stack — concentric circles */
.bc-progress-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid Canvas;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.bc-progress-stack:hover .bc-progress-ring {
    transform: scale(1.3);
}

/* Badge showing member count */
.bc-progress-badge {
    position: relative;
    z-index: 20;
    font-size: 0.6rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
    pointer-events: none;
    line-height: 1;
}

/* Tooltip label */
.bc-progress-dot-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: Canvas;
    color: CanvasText;
    font-size: 0.65rem;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    border: 1px solid rgba(128,128,128,0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    font-family: inherit;
    z-index: 30;
}

.bc-progress-dot-wrapper:hover .bc-progress-dot-label,
.bc-progress-stack:hover .bc-progress-dot-label {
    opacity: 1;
}


/* Tab Layout */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    background: Canvas;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    color: GrayText;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    outline: none;
}

.tab-btn:hover {
    color: CanvasText;
    background: var(--active-bg);
}

.tab-btn.active {
    color: CanvasText;
    border-bottom: 2px solid currentColor;
}

.tab-content {
    display: none;
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Utilities */
.bc-btn {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 8px 12px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    background: Canvas;
    color: CanvasText;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bc-btn:hover {
    background: var(--active-bg);
}

.bc-btn-primary {
    background: CanvasText;
    color: Canvas;
    border-color: transparent;
}

.bc-btn:disabled,
.bc-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bc-btn-primary:hover {
    opacity: 0.9;
}

.bc-btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.bc-card {
    background: var(--active-bg);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.bc-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: GrayText;
    font-size: 0.8rem;
    margin: 16px 0;
}

.bc-divider::before,
.bc-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.bc-divider span {
    padding: 0 10px;
}

/* Setup Panel */
#bc-setup-panel h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

#bc-setup-panel p {
    color: GrayText;
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 16px;
}

.bc-join-form {
    display: flex;
    gap: 8px;
}

.bc-join-form input,
.bc-input-group input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    background: Canvas;
    color: CanvasText;
    border-radius: 6px;
    font-family: inherit;
}

/* Room Panel */
.bc-info-card {
    background: var(--active-bg);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid currentColor;
}

.bc-room-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    color: GrayText;
}

.bc-room-id-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#bc-room-id-val {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
}

#bc-copy-link-btn {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    text-decoration: underline;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bc-input-group {
    display: flex;
    gap: 8px;
}

/* Color picker row */
.bc-color-picker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.bc-color-picker-row label {
    font-size: 0.8rem;
    color: GrayText;
    white-space: nowrap;
}

/* Preset color swatches */
.bc-color-presets {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
}

.bc-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    flex-shrink: 0;
}

.bc-color-swatch:hover {
    transform: scale(1.2);
}

.bc-color-swatch.selected {
    border-color: CanvasText;
    transform: scale(1.15);
}

/* Color Dropdown Selector */
.bc-color-dropdown-container {
    position: relative;
    display: inline-block;
}

.bc-color-dropdown-trigger {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    background-color: var(--my-color, #ff0055);
    outline: none;
    padding: 0;
    transition: transform 0.15s ease;
    display: block;
}

.bc-color-dropdown-trigger:hover {
    transform: scale(1.1);
}

.bc-color-dropdown-menu {
    display: none; /* Controlled dynamically by JS */
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #232428;
    border: 1px solid #3f4147;
    border-radius: 8px;
    padding: 8px;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    width: max-content;
}

.bc-color-dropdown-menu.show {
    display: grid;
}

.bc-section-title {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    color: GrayText;
    margin-bottom: 8px;
    margin-top: 16px;
    letter-spacing: 0.5px;
}

/* Members List */
.bc-members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bc-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--active-bg);
    font-size: 0.9rem;
}

.bc-member-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bc-avatar {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.bc-member-name {
    font-weight: 500;
}

.bc-member-progress {
    font-size: 0.75rem;
    color: GrayText;
}

.bc-teleport-btn {
    background: none;
    border: none;
    color: GrayText;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: underline;
    padding: 0;
}

.bc-teleport-btn:hover {
    color: CanvasText;
}

/* Comment Thread & Highlights */
.bc-placeholder-text {
    font-size: 0.85rem;
    color: GrayText;
    text-align: center;
    padding: 16px;
    border: 1px dashed rgba(128, 128, 128, 0.3);
    border-radius: 8px;
}

.bc-highlight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.bc-highlight-author {
    font-size: 0.75rem;
    color: GrayText;
}

.bc-delete-btn {
    background: none;
    border: none;
    color: #ff5e5e;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: underline;
    padding: 0;
}

.bc-highlight-quote {
    font-style: italic;
    font-size: 0.85rem;
    border-left: 2px solid currentColor;
    padding-left: 8px;
    color: GrayText;
    margin-bottom: 12px;
    max-height: 80px;
    overflow-y: auto;
}

.bc-comments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    padding-bottom: 12px;
}

.bc-comment-item {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(128, 128, 128, 0.1);
    padding: 6px 8px;
    border-radius: 6px;
}

.bc-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    color: GrayText;
}

.bc-comment-user {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bc-comment-text {
    word-break: break-word;
}

.bc-comment-form textarea {
    width: 100%;
    height: 50px;
    padding: 6px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    background: Canvas;
    color: CanvasText;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    resize: none;
    box-sizing: border-box;
    margin-bottom: 6px;
}

/* Floating Selection Menu */
.bc-selection-menu {
    position: absolute;
    z-index: 9999;
    background: Canvas;
    color: CanvasText;
    border: 1px solid rgba(128, 128, 128, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
    display: flex;
    gap: 2px;
    align-items: center;
    pointer-events: auto;
}

/* Floating Comment Composer */
.bc-floating-composer {
    position: absolute;
    z-index: 10000;
    width: 280px;
    background: Canvas;
    color: CanvasText;
    border: 1px solid rgba(128, 128, 128, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
}

.bc-floating-composer textarea {
    width: 100%;
    height: 70px;
    padding: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 6px;
    background: Canvas;
    color: CanvasText;
    resize: none;
    outline: none;
    box-sizing: border-box;
}

.bc-floating-composer textarea:focus {
    border-color: var(--my-color, CanvasText);
}

.bc-composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* Floating Hover Popover */
.bc-hover-popover {
    position: absolute;
    z-index: 9998;
    max-width: 320px;
    width: 280px;
    background: Canvas;
    color: CanvasText;
    border: 1px solid rgba(128, 128, 128, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.bc-hover-popover.show {
    opacity: 1;
    transform: translateY(0);
}

.bc-popover-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: GrayText;
    border-bottom: 1px solid rgba(128,128,128,0.15);
    padding-bottom: 4px;
}

.bc-popover-author-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.bc-popover-author {
    font-weight: bold;
}

.bc-popover-quote {
    font-size: 0.8rem;
    font-style: italic;
    color: GrayText;
    border-left: 2px solid rgba(128,128,128,0.3);
    padding-left: 6px;
    margin: 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bc-popover-comments {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.bc-popover-comment {
    font-size: 0.8rem;
    line-height: 1.35;
    background: rgba(128,128,128,0.06);
    padding: 6px 8px;
    border-radius: 6px;
}

.bc-popover-comment-user {
    font-weight: bold;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.bc-popover-comment-text {
    word-break: break-word;
}


.bc-menu-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.15s;
    color: CanvasText;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.bc-menu-btn:hover {
    background: rgba(128, 128, 128, 0.12);
}

.bc-menu-btn-primary {
    background: CanvasText;
    color: Canvas;
    font-weight: 600;
}

.bc-menu-btn-primary:hover {
    background: CanvasText;
    opacity: 0.85;
}

.bc-menu-btn-ghost {
    padding: 5px 7px;
    opacity: 0.5;
}

.bc-menu-btn-ghost:hover {
    opacity: 1;
    background: rgba(128, 128, 128, 0.12);
}

/* Shake animation when a color is already taken */
@keyframes bc-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.bc-color-taken-shake {
    animation: bc-shake 0.4s ease;
}

/* Activity Feed Panel & Cards */
#bc-feed-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 6px;
}

.bc-activity-feed {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
    max-height: 420px;
}

.bc-feed-card {
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.15);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bc-feed-card:hover {
    background: rgba(128, 128, 128, 0.14);
    border-color: rgba(128, 128, 128, 0.3);
}

.bc-feed-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.bc-feed-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.bc-feed-author {
    font-weight: 600;
}

.bc-feed-time {
    color: GrayText;
    margin-left: auto;
}

.bc-feed-quote {
    font-size: 0.8rem;
    font-style: italic;
    color: GrayText;
    border-left: 2px solid rgba(128, 128, 128, 0.25);
    padding-left: 6px;
    margin: 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bc-feed-comments-preview {
    font-size: 0.75rem;
    color: GrayText;
    margin-top: 2px;
}

/* Discord Login Classic Button (embedded inside the original Foliate welcome screen) */
.bc-discord-login-btn-classic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #5865F2; /* Official Discord color */
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.2);
    font-family: inherit;
    cursor: pointer;
}

.bc-discord-login-btn-classic:hover {
    background-color: #4752C4;
    opacity: 0.95;
}

.bc-discord-login-btn-classic:active {
    transform: scale(0.98);
}

/* Profile Card & Avatar inside Sidebar */
.bc-profile-card {
    padding: 12px !important;
}

.bc-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bc-profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--bc-user-color, #5865F2);
    background-color: rgba(128, 128, 128, 0.15);
    object-fit: cover;
}

.bc-profile-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bc-profile-username {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--bc-user-color, inherit);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.bc-logout-link-btn {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0;
    text-align: left;
    width: fit-content;
    text-decoration: underline;
    transition: color 0.15s ease;
}

.bc-logout-link-btn:hover {
    color: #ff2222;
}



/* ── About Modal Overlay ─────────────────────────────────────── */
#help-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: help-overlay-in 0.2s ease;
}

@keyframes help-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#help-modal {
    background: #1e1f23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: min(480px, 92vw);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
    animation: help-modal-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes help-modal-in {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header */
#help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#help-modal-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #fff;
}

#help-modal-logo svg {
    color: #7c8cf8;
    flex-shrink: 0;
}

#help-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.45);
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.15s, background 0.15s;
}

#help-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Body */
#help-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#help-modal-version-badge {
    display: inline-block;
    background: rgba(124, 140, 248, 0.15);
    border: 1px solid rgba(124, 140, 248, 0.35);
    color: #9aa8ff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    width: fit-content;
}

#help-modal-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    line-height: 1.5;
}

.help-modal-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.35);
    margin: 0 0 8px;
}

.help-modal-section p,
.help-modal-section ul {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.help-modal-section a {
    color: #7c8cf8;
    text-decoration: none;
}

.help-modal-section a:hover {
    text-decoration: underline;
}

.help-credits-list {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-credits-list li {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    line-height: 1.5;
}

.help-credit-sub {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.help-credit-sub a {
    color: rgba(124, 140, 248, 0.8);
}

.help-tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.help-tech-pills span {
    font-size: 0.76rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Footer */
#help-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

#help-issue-btn,
#help-github-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

#help-issue-btn {
    background: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff7070;
}

#help-issue-btn:hover {
    background: rgba(255, 68, 68, 0.22);
    transform: translateY(-1px);
}

#help-github-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
}

#help-github-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* ── Home Shelf Modal Overlay ─────────────────────────────────── */
#bc-shelf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: none; /* Flex when opened */
    align-items: center;
    justify-content: center;
}

#bc-shelf-modal {
    max-width: 440px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #1e1f23;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: bc-modal-fade 0.2s ease-out;
}

#bc-shelf-modal-body {
    padding: 16px 20px 24px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

#your-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px;
    box-sizing: border-box;
}

/* Home Shelf Button Hover Effects */
#bc-home-shelf-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

#bc-home-shelf-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.your-room-card {
    margin-bottom: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 10px;
    padding: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    cursor: pointer;
    text-align: left;
    position: relative;
    box-sizing: border-box;
}

.your-room-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.your-room-card-title {
    font-weight: 650;
    color: #fff;
    margin-bottom: 2px;
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
}

.your-room-card-author {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 8px;
    word-break: break-word;
}

/* Shelf Card Quick Actions */
.your-room-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.your-room-action-btn {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    outline: none;
}

.your-room-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}

.your-room-action-btn.delete {
    color: #ff6060;
    border-color: rgba(255, 96, 96, 0.25);
    background: rgba(255, 96, 96, 0.06);
}

.your-room-action-btn.delete:hover {
    background: rgba(255, 96, 96, 0.14);
    border-color: rgba(255, 96, 96, 0.45);
    color: #ff8080;
}

.your-room-action-btn.leave {
    color: #ff9800;
    border-color: rgba(255, 152, 0, 0.25);
    background: rgba(255, 152, 0, 0.06);
}

.your-room-action-btn.leave:hover {
    background: rgba(255, 152, 0, 0.14);
    border-color: rgba(255, 152, 0, 0.45);
    color: #ffb74d;
}

@keyframes bc-spin {
    to { transform: rotate(360deg); }
}
