/* --- PROMPT VIEW DETAIL MODAL STYLES --- */
.prompt-modal-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.modal-grid-layout {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    min-height: 520px;
    max-height: 85vh;
}

@media (max-width: 768px) {
    .modal-grid-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

/* CUSTOM THIN DARK SCROLLBARS */
* {
    scrollbar-width: thin;
    scrollbar-color: #2a2d37 #141519;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #101115;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #2a2d37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-orange);
}

/* LEFT COLUMN: IMAGE DISPLAY & METRICS */
.modal-image-col {
    position: relative;
    background-color: #0b0c0e;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 24px;
}

.modal-media-viewport,
.modal-image-col > div:first-child {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 260px;
    max-height: 480px;
    width: 100%;
    overflow: hidden;
    background-color: #07080a;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.modal-main-img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 440px !important;
    object-fit: contain !important;
    object-position: center center !important;
    aspect-ratio: unset !important;
    border-radius: var(--radius-sm);
    border: none !important;
}

.modal-model-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.modal-compat-box {
    background: rgba(20, 21, 25, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-top: 16px;
    flex-shrink: 0;
}

.modal-compat-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.modal-compat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.82rem;
    color: #fff;
}

.modal-compat-item span {
    color: var(--text-secondary);
    display: block;
    font-size: 0.72rem;
}

/* RIGHT COLUMN: PROMPT DETAILS & ACTION SUITE */
.modal-details-col {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    max-height: 85vh;
    background: #141519;
    pointer-events: auto !important;
}

.modal-header-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 30px;
}

.modal-prompt-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.modal-creator-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-creator-row span {
    color: var(--accent-orange);
    font-weight: 600;
}

/* VERSION CONTROL SELECTOR */
.version-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.version-select {
    background: #141519;
    color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 13px;
    padding-right: 28px;
    transition: border-color 0.2s ease;
}

.version-select:focus,
.version-select:hover {
    border-color: var(--accent-orange);
}

.version-select option {
    background: #141519;
    color: #ffffff;
}

/* VERIFICATION BADGE IN COMPATIBILITY BOX */
.verification-log-badge {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.verification-log-badge.status-untested {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-secondary, #9ca3af);
}

.verification-log-badge.status-self-tested {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
}

.verification-log-badge.status-community-tested {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #4ade80;
}

.verification-log-badge.status-pending {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.35);
    color: #facc15;
}

/* QUALITY SCORE BAR */
.quality-score-card {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s ease;
}

.quality-score-card:hover {
    border-color: var(--accent-orange);
}

.quality-score-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.quality-score-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-orange);
}

/* QUALITY BREAKDOWN ACCORDION PANEL */
.quality-breakdown-panel {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: 8px;
    display: none;
}

.quality-breakdown-panel.active {
    display: block;
}

.quality-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.quality-metric-row:last-child {
    margin-bottom: 0;
}

.quality-metric-row span:last-child {
    color: var(--accent-orange);
    font-weight: 700;
}

/* PROMPT TEXT BOX & ACTIONS SUITE */
.modal-prompt-box {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    position: relative;
    margin-top: 12px;
}

.modal-prompt-text {
    font-family: monospace;
    font-size: 0.88rem;
    color: #e0e0e0;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 140px;
    overflow-y: auto;
    padding-bottom: 30px;
}

.modal-action-buttons-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.modal-action-btn {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.modal-action-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(255, 153, 0, 0.05);
}

.modal-action-btn.primary {
    background: var(--accent-orange);
    color: #000;
    border-color: var(--accent-orange);
    font-weight: 700;
}

.modal-action-btn.primary:hover {
    background: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-orange-glow);
}

/* PROMPT CUSTOMIZER PLAYGROUND DRAWER */
.customizer-drawer {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 12px;
    display: none;
}

.customizer-drawer.active {
    display: block;
}

.customizer-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.customizer-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.customizer-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customizer-field-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.customizer-field-group input {
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    pointer-events: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}

.customizer-field-group input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.2);
}

.customizer-output-box {
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 10px;
    max-height: 120px;
    overflow-y: auto;
}

.customizer-actions {
    display: flex;
    gap: 8px;
}

/* --- PHASE 23M: INLINE PROMPT REMIX WORKSPACE DRAWER --- */
.remix-workspace-drawer {
    background: #0b0c0e;
    border: 1px solid var(--border-color, #2a2d37);
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
    margin-bottom: 14px;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: fadeInRemix 0.2s ease;
}

@keyframes fadeInRemix {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.remix-workspace-drawer.active {
    display: block;
}

.remix-workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.remix-workspace-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-orange, #ff9900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.remix-workspace-badge {
    background: rgba(255, 153, 0, 0.12);
    color: var(--accent-orange, #ff9900);
    border: 1px solid rgba(255, 153, 0, 0.3);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

.remix-workspace-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary, #9aa0a6);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.remix-editor-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.remix-prompt-textarea {
    width: 100%;
    min-height: 200px;
    max-height: 480px;
    box-sizing: border-box;
    background: #141519;
    color: #f1f3f4;
    border: 1px solid var(--border-color, #2a2d37);
    border-radius: 10px;
    padding: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: text !important;
    -webkit-user-select: text !important;
    pointer-events: auto !important;
}

.remix-prompt-textarea:focus {
    border-color: var(--accent-orange, #ff9900);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.2);
}

.remix-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.remix-actions-left,
.remix-actions-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.remix-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    line-height: 1;
}

.remix-btn-primary {
    background: var(--accent-orange, #ff9900);
    color: #000000;
    font-weight: 700;
}

.remix-btn-primary:hover {
    background: var(--accent-gold, #ffb338);
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.35);
}

.remix-btn-primary.copied-state {
    background: #10b981 !important;
    color: #ffffff !important;
}

.remix-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color, #2a2d37);
    color: var(--text-primary, #ffffff);
}

.remix-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.remix-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 540px) {
    .remix-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .remix-actions-left,
    .remix-actions-right {
        width: 100%;
        display: flex;
    }
    .remix-actions-left .remix-btn,
    .remix-actions-right .remix-btn {
        flex: 1;
        justify-content: center;
    }
}

/* STATS & TAGS ROW */
.modal-stats-row {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-tag {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    color: var(--accent-orange);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* RELATED PROMPTS SECTION */
.modal-related-section {
    margin-top: 8px;
}

.modal-related-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.modal-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.modal-related-card {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.modal-related-card:hover {
    border-color: var(--accent-orange);
}

.modal-related-card img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.modal-related-card span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* REPORT / FLAG BUTTON */
.btn-report-prompt {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    transition: color 0.2s ease;
}

.btn-report-prompt:hover {
    color: #ff4d4d;
}

.modal-stat-clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-stat-clickable:hover {
    color: var(--accent-orange);
}

/* ==========================================================================
   MODAL COMMENTS SECTION STYLES
   ========================================================================== */
.comments-section {
    margin-top: 24px;
    background: #0d0e12;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.comments-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-count-pill {
    background: rgba(255, 153, 0, 0.12);
    color: var(--accent-orange);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
}

.comments-owner-toggle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.comments-owner-toggle:hover {
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

.comments-disabled-banner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.comment-composer {
    margin-bottom: 20px;
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.comment-textarea {
    width: 100%;
    min-height: 80px;
    background: #090a0d;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 12px;
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.comment-textarea:focus {
    border-color: var(--accent-orange);
}

.comment-composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.comment-char-counter {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-post-comment {
    background: var(--accent-orange);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-post-comment:hover {
    background: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-orange-glow);
}

.btn-post-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--accent-orange);
    object-fit: cover;
}

.comment-username {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.comment-username:hover {
    color: var(--accent-orange);
}

.comment-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.comment-body {
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.5;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    transition: color 0.15s ease;
}

.comment-action-btn:hover {
    color: var(--accent-orange);
}

.reply-list {
    margin-left: 20px;
    margin-top: 10px;
    border-left: 2px solid rgba(255, 153, 0, 0.3);
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reply-composer-inline {
    margin-top: 8px;
    padding: 8px;
    background: #090a0d;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* SHARE MODAL OVERLAY & CARD */
.share-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.share-modal-overlay.active {
    display: flex;
}

.share-modal-card {
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.share-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.share-option-btn {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    justify-content: center;
}

.share-option-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(255, 153, 0, 0.05);
}

/* ==========================================================================
   PHASE 8: COLLECTION PICKER & COLLECTION UI STYLES
   ========================================================================== */

.collection-picker-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.collection-picker-overlay.active {
    display: flex;
}

.collection-picker-card {
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85);
    position: relative;
    box-sizing: border-box;
    animation: pickerFadeIn 0.2s ease-out;
}

@keyframes pickerFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.collection-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.collection-picker-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-picker-title i {
    color: var(--accent-orange);
}

.collection-picker-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding-right: 4px;
}

.collection-picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.collection-picker-item:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 153, 0, 0.03);
}

.collection-picker-item.selected {
    border-color: rgba(255, 153, 0, 0.6);
    background: rgba(255, 153, 0, 0.08);
}

.collection-picker-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.collection-picker-item-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-orange);
    cursor: pointer;
    flex-shrink: 0;
}

.collection-picker-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-picker-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.collection-picker-badge.badge-private {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.collection-picker-badge.badge-public {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.collection-picker-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: #090a0d;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
}

.collection-picker-create-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--accent-orange);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collection-picker-create-toggle:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 153, 0, 0.06);
}

.collection-picker-create-form {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    background: #090a0d;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.collection-picker-create-form.active {
    display: flex;
}

.collection-picker-input {
    width: 100%;
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
}

.collection-picker-input:focus {
    border-color: var(--accent-orange);
}

.collection-picker-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.collection-picker-select {
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    color: #fff;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}

.collection-picker-btn-submit {
    flex: 1;
    background: var(--accent-orange);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collection-picker-btn-submit:hover {
    filter: brightness(1.1);
}

/* COLLECTION CARD & HUB STYLES */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.collection-card {
    background: #141519;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.collection-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.collection-card-top {
    margin-bottom: 16px;
}

.collection-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.collection-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.collection-card-title:hover {
    color: var(--accent-orange);
}

.collection-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 6px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.collection-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.collection-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.collection-card-stat i {
    color: var(--accent-orange);
}

.collection-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-card-action {
    background: #0b0c0e;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-card-action:hover {
    color: #fff;
    border-color: var(--accent-orange);
}

.btn-card-action.danger:hover {
    color: #ff4d4d;
    border-color: #ff4d4d;
}