.detection-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detection-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.detection-tab[data-tab="link"] {
    flex: 1;
}

.detection-tab[data-tab="text"] {
    flex: 1;
}

.text-editor-wrapper {
    position: relative;
}

.text-clear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 2;
}

.text-clear-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.detection-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.detection-tab.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(139, 92, 246, 0.15));
    color: white;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.25);
}

.detection-tab svg {
    flex-shrink: 0;
}

.detection-panel {
    display: none;
}

.detection-panel.active {
    display: block;
}

/* Text Detection Editor */
.text-editor-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1rem;
}

.text-editor-wrapper:focus-within {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.text-detection-input {
    width: 100%;
    min-height: 80px;
    max-height: 300px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
    font-family: inherit;
    outline: none;
}

.text-detection-input.resizing-active {
    max-height: none;
    resize: none;
}

.text-detection-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.text-editor-footer {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.char-counter,
.word-counter {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.char-counter.limit-near {
    color: #f59e0b;
}

.char-counter.limit-reached {
    color: #ef4444;
}

.text-detect-btn {
    width: 100%;
    justify-content: center;
}

.text-detect-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Text Detection Result Card */
.text-detection-result {
    margin-top: 1.5rem;
    animation: fadeSlideUp 0.4s ease;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.text-result-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
}

/* V2 Header */
.text-result-header-v2 {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.text-result-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.text-result-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
}

.text-result-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.text-result-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Centered Score Ring */
.text-result-score-center {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.text-result-score-ring-lg {
    position: relative;
    width: 120px;
    height: 120px;
}

.text-result-score-ring-lg svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.text-result-score-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.text-result-score-pct {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.text-result-score-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Progress Bars */
.text-result-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.text-result-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.text-result-bar-icon {
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.text-result-bar-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    min-width: 95px;
}

.text-result-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.text-result-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.text-result-bar-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    min-width: 36px;
    text-align: right;
}

/* Confidence Pill */
.text-result-confidence-center {
    display: flex;
    justify-content: center;
}

.text-result-confidence-pill {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Result Body */
.text-result-body {
    padding: 1.25rem 1.5rem;
}

.text-result-summary {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    line-height: 1.65;
    margin: 0 0 1.25rem;
    text-align: center;
}

/* Pattern Pills */
.text-result-patterns-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.text-result-pattern-pill {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

/* Action Buttons */
.text-result-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
}

.text-result-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.text-result-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateY(-1px);
}

.text-result-share-btn {
    background: linear-gradient(135deg, #8b5cf6, #00d4ff) !important;
    color: white !important;
    border: none !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
}

.text-result-share-btn:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Text Detection Loading */
.text-detect-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.text-detect-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.15);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: textSpin 0.8s linear infinite;
}

@keyframes textSpin {
    to { transform: rotate(360deg); }
}

/* ===== Detailed Analysis Modal ===== */
.td-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(8px);
}

.td-modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.td-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.td-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
}

.td-modal-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.td-modal-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.td-modal-body {
    padding: 1.5rem;
}

.td-modal-score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.td-modal-score-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.td-modal-confidence-text {
    font-size: 0.85rem;
    font-weight: 600;
}

.td-modal-section {
    margin-bottom: 1.5rem;
}

.td-modal-section:last-child {
    margin-bottom: 0;
}

.td-modal-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.td-modal-section-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
}

/* Signal Cards */
.td-modal-signals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.td-modal-signal-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
}

.td-modal-signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    flex-shrink: 0;
}

/* Resize Divider between text input and results */
.text-resize-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    cursor: row-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    z-index: 5;
    position: relative;
}

.text-resize-divider.hidden {
    display: none;
}

.text-resize-handle {
    width: 48px;
    height: 5px;
    background: rgba(139, 92, 246, 0.4);
    border-radius: 3px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.text-resize-divider:hover .text-resize-handle,
.text-resize-divider.dragging .text-resize-handle {
    background: rgba(139, 92, 246, 0.8);
    transform: scaleX(1.2);
}

.text-resize-divider::before {
    content: '';
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: 0;
    right: 0;
}

.text-detection-result.resizable {
    overflow-y: auto;
    transition: max-height 0.05s linear;
    -webkit-overflow-scrolling: touch;
}

body.resize-dragging {
    cursor: row-resize !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.resize-dragging * {
    cursor: row-resize !important;
}

/* Mobile responsive overrides */
@media screen and (max-width: 768px) {
    .detection-tabs {
        margin-bottom: 1rem;
    }

    .detection-tab {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .text-detection-input {
        min-height: 65px;
        font-size: 0.95rem;
        padding: 14px 16px;
    }

    .text-editor-footer {
        padding: 6px 12px;
    }

    .text-detect-btn {
        padding: 14px 24px !important;
        font-size: 0.95rem !important;
    }

    .text-result-card {
        border-radius: 12px;
    }

    .text-result-header-v2 {
        padding: 1rem;
    }

    .text-result-score-center {
        margin-bottom: 1rem;
    }

    .text-result-score-ring-lg {
        width: 100px;
        height: 100px;
    }

    .text-result-score-pct {
        font-size: 1.3rem;
    }

    .text-result-score-label {
        font-size: 0.55rem;
    }

    .text-result-bars {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .text-result-bar-row {
        gap: 0.4rem;
    }

    .text-result-bar-label {
        font-size: 0.75rem;
        min-width: 80px;
    }

    .text-result-bar-value {
        font-size: 0.78rem;
        min-width: 32px;
    }

    .text-result-confidence-pill {
        padding: 5px 14px;
        font-size: 0.72rem;
    }

    .text-result-body {
        padding: 1rem;
    }

    .text-result-summary {
        font-size: 0.82rem;
        line-height: 1.55;
        margin-bottom: 1rem;
    }

    .text-result-patterns-pills {
        gap: 6px;
    }

    .text-result-pattern-pill {
        white-space: normal;
        text-align: center;
        font-size: 0.75rem;
        padding: 5px 12px;
    }

    .text-result-actions {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }

    .text-result-action-btn {
        font-size: 0.8rem;
        padding: 10px 16px;
        width: 100%;
        justify-content: center;
    }

    .text-result-share-btn {
        width: 100% !important;
    }

    .td-modal-overlay {
        padding: 0.5rem;
    }

    .td-modal-content {
        max-width: 100%;
        border-radius: 12px;
    }

    .td-modal-header {
        padding: 1rem;
    }

    .td-modal-header h3 {
        font-size: 1rem;
    }

    .td-modal-body {
        padding: 1rem;
    }

    .td-modal-score-row {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .td-modal-section {
        margin-bottom: 1rem;
    }

    .td-modal-section-text {
        font-size: 0.84rem;
        line-height: 1.55;
    }

    .td-modal-signal-card {
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    .chunk-vote-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cr-chunk-text {
        max-height: 180px;
        font-size: 0.88rem;
        padding: 0.85rem;
    }

    .text-submission-card {
        padding: 1rem;
    }
}

@media screen and (max-width: 400px) {
    .text-result-header-v2 {
        padding: 0.75rem;
    }

    .text-result-score-ring-lg {
        width: 90px;
        height: 90px;
    }

    .text-result-score-pct {
        font-size: 1.15rem;
    }

    .text-result-bar-label {
        font-size: 0.7rem;
        min-width: 70px;
    }

    .text-result-bar-icon svg {
        width: 12px;
        height: 12px;
    }

    .text-result-body {
        padding: 0.75rem;
    }

    .text-result-summary {
        font-size: 0.78rem;
    }

    .text-result-actions {
        padding: 0.75rem;
    }

    .td-modal-body {
        padding: 0.75rem;
    }
}

/* ===== Guest Text Submission Panel ===== */
.guest-text-panel {
    margin-top: 1rem;
}

.guest-text-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.guest-text-divider::before,
.guest-text-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Text Submission Feed Cards ===== */
.text-submission-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.text-submission-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.text-submission-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.text-submission-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #c4b5fd;
}

.text-submission-preview {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-submission-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
}

.text-submission-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.text-submission-status.under-review {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.text-submission-status.scored {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.review-chunks-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(0, 212, 255, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.review-chunks-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(0, 212, 255, 0.35));
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

/* ===== Chunk Review Modal - Confirm State (Compact Popover) ===== */
.cr-modal-confirm-state {
    max-width: 440px !important;
    width: 90vw !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    transition: max-width 0.3s ease, width 0.3s ease;
}

.cr-modal-confirm-state .td-modal-body {
    padding: 0;
}

/* ===== Chunk Review Modal (Rebuilt - Split View) ===== */
.cr-modal-content {
    max-width: 960px !important;
    width: 95vw !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-height: 85vh !important;
}

.cr-modal-content .td-modal-body {
    padding: 0;
    overflow: hidden;
    height: 100%;
}

.cr-review-body {
    opacity: 1;
    transform: translateY(0);
}

.cr-split-view {
    display: flex;
    flex-direction: row;
    min-height: 480px;
    max-height: 85vh;
}

.cr-preview-panel {
    flex: 0 0 42%;
    max-width: 42%;
    background: rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cr-preview-header {
    margin-bottom: 16px;
}

.cr-preview-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00d4ff;
    opacity: 0.9;
}

.cr-form-panel {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.cr-form-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.cr-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.cr-header-left {
    flex: 1;
    min-width: 0;
}

.cr-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.cr-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.cr-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.cr-progress-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.cr-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}
.cr-progress-dot.done {
    background: #8b5cf6;
    border-color: #a78bfa;
}
.cr-progress-dot.current {
    background: #00d4ff;
    border-color: #22d3ee;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.cr-timer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
}

.cr-timer-left {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-weight: 500;
}

.cr-timer-right {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #a78bfa;
    min-width: 3rem;
    text-align: right;
}

.cr-timer-right.review-timer-warning {
    color: #f87171;
    animation: crTimerPulse 1s ease-in-out infinite;
}

.cr-timer-right.review-timer-expired {
    color: #f87171;
    animation: none;
}

@keyframes crTimerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cr-chunk-text {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.92rem;
    line-height: 1.75;
    flex: 1;
    overflow-y: auto;
    word-break: break-word;
}

.cr-pattern-flags {
    margin-bottom: 0.85rem;
}

.cr-flags-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.4rem;
}

.cr-flags-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cr-flag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
}

.cr-flag-chip.ai {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}
.cr-flag-chip.ai:not(.active) {
    opacity: 0.35;
    text-decoration: line-through;
}

.cr-flag-chip.human {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}
.cr-flag-chip.human:not(.active) {
    opacity: 0.35;
    text-decoration: line-through;
}

.cr-flags-empty {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    padding: 4px 0;
}

.cr-vote-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    width: 100%;
    justify-content: center;
    letter-spacing: 0.01em;
}

.cr-vote-badge-ai {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.cr-vote-badge-real {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.cr-verdict-section {
    margin-bottom: 0.85rem;
}

.cr-verdict-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.5rem;
}

.cr-verdict-grid {
    display: flex;
    gap: 0.75rem;
}

.cr-verdict-btn {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.22s ease;
    background: rgba(255, 255, 255, 0.05);
    min-height: 52px;
    font-weight: 600;
}

.cr-verdict-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.cr-verdict-label {
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    color: #ffffff;
}

.cr-verdict-btn.cr-ai-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.cr-verdict-btn.cr-ai-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.25));
    border-color: rgba(239, 68, 68, 0.65);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

.cr-verdict-btn.cr-ai-btn.selected {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.38), rgba(220, 38, 38, 0.38));
    border-color: rgba(239, 68, 68, 0.9);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.45);
    color: #ffffff;
}

.cr-verdict-btn.cr-real-btn {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
    border-color: rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.cr-verdict-btn.cr-real-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(22, 163, 74, 0.25));
    border-color: rgba(34, 197, 94, 0.65);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}

.cr-verdict-btn.cr-real-btn.selected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.38), rgba(22, 163, 74, 0.38));
    border-color: rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
    color: #ffffff;
}

@media (max-width: 768px) {
    .cr-modal-content {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    .cr-modal-content .td-modal-body {
        height: 100%;
        overflow: hidden;
    }
    .cr-split-view {
        flex-direction: column;
        min-height: unset;
        height: 100vh;
        max-height: 100vh;
    }
    .cr-preview-panel {
        flex: none;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 14px 16px;
        max-height: 40vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .cr-chunk-text {
        max-height: none;
        font-size: 0.88rem;
        line-height: 1.65;
    }
    .cr-form-panel {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
        padding-bottom: 32px;
        -webkit-overflow-scrolling: touch;
    }
    .cr-submit-btn {
        margin-bottom: 16px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cr-verdict-grid {
        flex-direction: row;
        gap: 0.5rem;
    }
    .cr-verdict-btn {
        padding: 0.75rem 0.6rem;
        min-height: 48px;
    }
    .cr-verdict-label {
        font-size: 0.82rem;
    }
    .text-preview-modal-footer {
        flex-wrap: wrap;
        gap: 8px;
    }
    .text-preview-modal-footer .vote-btn,
    .text-preview-modal-footer .text-vote-btn {
        flex: 1 1 100%;
        justify-content: center;
        text-align: center;
    }
    .preview-card.text-content-card .preview-actions {
        flex-wrap: wrap;
    }
    .preview-card.text-content-card .preview-actions .vote-btn {
        white-space: normal;
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .cr-verdict-grid {
        flex-direction: column;
        gap: 8px;
    }
    .cr-verdict-btn {
        width: 100%;
    }
}

.cr-confidence-section {
    margin-bottom: 0.85rem;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.cr-confidence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.cr-confidence-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 600;
}

.cr-confidence-value {
    color: #a78bfa;
    font-size: 0.9rem;
    font-weight: 700;
}

.cr-confidence-range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.cr-confidence-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a78bfa;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}

.cr-confidence-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a78bfa;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}

.cr-confidence-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
}

.cr-guidelines-box {
    background: rgba(50, 18, 22, 0.35);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.cr-guidelines-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cr-guidelines-header strong {
    color: #ef4444;
    font-size: 14px;
}

.cr-guidelines-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.cr-tips-box {
    background: rgba(25, 28, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.cr-tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cr-tips-header strong {
    color: #3b82f6;
    font-size: 14px;
}

.cr-tips-list {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.cr-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.cr-tip-item:last-child {
    margin-bottom: 0;
}

.cr-tip-check {
    color: #22c55e;
    font-weight: 700;
    flex-shrink: 0;
}

.cr-reason-section {
    margin-bottom: 0.85rem;
    position: relative;
}

.cr-reason-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.cr-reason-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: white;
    font-size: 0.88rem;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    overflow: hidden;
}

.cr-reason-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.cr-reason-input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.cr-reason-count {
    text-align: right;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
}

.cr-confirm-review {
    text-align: center;
    padding: 2rem 1.5rem;
}

.cr-confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cr-confirm-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.cr-confirm-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.cr-confirm-rules {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cr-confirm-rules li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
}

.cr-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cr-confirm-cancel {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cr-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.cr-confirm-start {
    padding: 10px 28px;
    background: linear-gradient(135deg, #8b5cf6, #00d4ff);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cr-confirm-start:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.cr-confirm-start:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cr-submit-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6, #00d4ff);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cr-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.cr-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: crSpin 0.6s linear infinite;
}

@keyframes crSpin {
    to { transform: rotate(360deg); }
}

.cr-complete {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.cr-complete-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cr-complete h3 {
    color: white;
    font-size: 1.2rem;
    margin: 0 0 0.75rem;
}

/* ========== Room Switch System ========== */
.room-switch-container {
    display: flex;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.room-switch-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.room-switch-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
}

.room-switch-btn.active[data-room="text"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.1));
    border-color: rgba(139, 92, 246, 0.5);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.room-switch-btn.active[data-room="link"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.1));
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.room-icon {
    font-size: 1.1rem;
}

.room-label {
    font-weight: 700;
}

.room-pool {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.room-switch-btn.active[data-room="text"] .room-pool {
    background: rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
}

.room-switch-btn.active[data-room="link"] .room-pool {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.room-switch-btn:not(.active) .room-pool {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
}

/* Reward Banner */
.room-reward-banner {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.room-reward-banner.text-room-banner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(168, 85, 247, 0.06));
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.room-reward-banner.link-room-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(96, 165, 250, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.reward-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.reward-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.reward-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.reward-banner-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== Text Content Cards (uses preview-card base) ========== */
.preview-card.text-content-card .text-preview-clamp {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    max-height: 5em !important;
    text-overflow: ellipsis !important;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0.35rem 0;
}

.preview-card.text-content-card .text-preview-clamp.expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    max-height: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

.preview-card.text-content-card .text-preview-body {
    overflow: visible !important;
}

.text-expand-toggle {
    background: none;
    border: none;
    color: #c4b5fd;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 4px;
    display: block;
    transition: color 0.2s ease;
}

.text-expand-toggle:hover {
    color: #a78bfa;
}

.text-preview-expandable {
    position: relative;
}

.text-status-badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.text-status-badge.under-review {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.text-status-badge.scored {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

/* ========== Text Card Layout ========== */
.preview-card.text-content-card {
    overflow: hidden;
    min-height: auto;
}

.preview-card.text-content-card .preview-actions {
    box-sizing: border-box;
    max-width: 100%;
}

.preview-card.text-content-card .deep-analysis-section {
    box-sizing: border-box;
    max-width: 100%;
}

@media screen and (max-width: 768px) {
    .preview-card.text-content-card {
        padding: 1rem;
        max-width: 100%;
    }

    .preview-card.text-content-card .preview-actions {
        gap: 8px;
    }

    .preview-card.text-content-card .preview-actions .vote-btn {
        padding: 10px 8px;
        font-size: 0.8rem;
        min-width: 0;
        white-space: nowrap;
    }

    .preview-card.text-content-card .deep-analysis-btn {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}

/* ========== Text Vote Button ========== */
.text-vote-btn {
    font-weight: 600;
    cursor: pointer;
}

.text-voted-btn {
    background: rgba(255,255,255,0.08) !important;
    color: rgba(255,255,255,0.4) !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== Dual Leaderboard ========== */
.dual-leaderboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.dual-leaderboard-container .leaderboard-container {
    max-width: 100%;
    margin: 0;
}

.dual-leaderboard-container .leaderboard {
    max-width: 100%;
}

.dual-leaderboard-section {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dual-lb-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dual-leaderboard-section.text-lb {
    border-color: rgba(139, 92, 246, 0.2);
}

.dual-leaderboard-section.link-lb {
    border-color: rgba(59, 130, 246, 0.2);
}

.dual-leaderboard-section.highlight {
    border-width: 2px;
}

.dual-leaderboard-section.text-lb.highlight {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.dual-leaderboard-section.link-lb.highlight {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.dual-lb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.dual-lb-icon {
    font-size: 1.2rem;
}

.dual-lb-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.dual-lb-pool {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.text-lb .dual-lb-pool {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

.link-lb .dual-lb-pool {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.dual-lb-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 1rem;
}

.dual-lb-list {
    display: grid;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.dual-lb-empty {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .room-switch-container {
        flex-direction: column;
        gap: 8px;
    }

    .room-switch-btn {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .room-label {
        font-size: 0.82rem;
    }

    .room-pool {
        font-size: 0.7rem;
    }

    .reward-banner-content {
        gap: 10px;
    }

    .reward-banner-title {
        font-size: 0.88rem;
    }

    .reward-banner-desc {
        font-size: 0.78rem;
    }

    .dual-leaderboard-container {
        grid-template-columns: 1fr;
    }

    .dual-leaderboard-section {
        padding: 1rem;
    }

    .dual-lb-list .leaderboard-item {
        padding: 1rem;
    }

    .dual-lb-list .leaderboard-item .user-stats {
        font-size: 0.72rem;
    }
}

.text-preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.text-preview-modal-overlay.active {
    opacity: 1;
}

.text-preview-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: linear-gradient(145deg, rgba(20, 15, 40, 0.98), rgba(10, 8, 25, 0.98));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.1);
}

.text-preview-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.text-preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.text-preview-modal-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.text-preview-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #c4b5fd;
}

.text-preview-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.text-preview-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.text-preview-modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.text-preview-modal-score {
    padding: 0 1.5rem 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.text-preview-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    line-height: 1.85;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
}

.text-preview-modal-body p {
    margin: 0 0 1rem;
    text-indent: 0;
}

.text-preview-modal-body p:last-child {
    margin-bottom: 0;
}

.text-preview-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.text-preview-lock-message {
    text-align: center;
    color: #94a3b8;
    padding: 2rem 1rem;
}

.text-preview-lock-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.text-preview-lock-message p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
    color: #94a3b8;
}

.text-preview-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.text-preview-modal-review-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #8b5cf6, #00d4ff);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.text-preview-modal-review-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.text-preview-modal-close-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-preview-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

@media (max-width: 600px) {
    .text-preview-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .text-preview-modal-header {
        padding: 1rem 1rem 0.6rem;
    }

    .text-preview-modal-meta {
        padding: 0.6rem 1rem;
        gap: 0.6rem;
        font-size: 0.75rem;
    }

    .text-preview-modal-body {
        padding: 1rem;
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .text-preview-modal-footer {
        padding: 0.6rem 1rem 1rem;
        flex-direction: column;
    }

    .text-preview-modal-review-btn,
    .text-preview-modal-close-btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== Text Vote Modal (tv-modal) ===== */
.tv-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}


.tv-rating-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.tv-guidelines-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}

.tv-tips-box {
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}

.tv-textarea-wrap {
    margin-bottom: 1rem;
}

.tv-textarea {
    width: 100%;
    min-height: 110px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 0.75rem 0.9rem;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}

.tv-textarea:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(255, 255, 255, 0.07);
}

.tv-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.tv-confidence-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}

.tv-confidence-input {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 100%);
}

.tv-confidence-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.tv-confidence-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.tv-submit-btn {
    flex: 1;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.tv-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.tv-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.tv-cancel-btn {
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tv-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 480px) {
    .tv-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
}

.tv-modal-content {
    background: linear-gradient(145deg, rgba(15, 15, 30, 0.98), rgba(25, 25, 50, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    width: 95vw;
    max-width: 960px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tv-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 2px solid rgba(124, 58, 237, 0.35);
    flex-shrink: 0;
}

.tv-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.tv-modal-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.tv-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.tv-modal-split {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.tv-split-preview-panel {
    flex: 0 0 42%;
    max-width: 42%;
    background: rgba(0, 0, 0, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.25rem 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tv-split-preview-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 212, 255, 0.9);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.tv-split-preview-content {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.84rem;
    line-height: 1.65;
    flex: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    -webkit-overflow-scrolling: touch;
}

.tv-split-preview-content::-webkit-scrollbar {
    width: 4px;
}
.tv-split-preview-content::-webkit-scrollbar-track {
    background: transparent;
}
.tv-split-preview-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.tv-split-preview-empty {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.83rem;
    font-style: italic;
    flex: 1;
}

.tv-modal-timer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.tv-modal-timer-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.tv-modal-timer {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.tv-modal-timer.tv-timer-warning {
    color: #fbbf24;
}

.tv-modal-timer.tv-timer-expired {
    color: #f87171;
}

.tv-split-form-panel {
    flex: 1;
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

.tv-split-form-panel::-webkit-scrollbar {
    width: 4px;
}
.tv-split-form-panel::-webkit-scrollbar-track {
    background: transparent;
}
.tv-split-form-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .tv-modal-content {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .tv-modal-split {
        flex-direction: column;
        overflow-y: auto;
    }
    .tv-split-preview-panel {
        flex: none;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 1rem 1.1rem 0;
        max-height: 38vh;
    }
    .tv-split-form-panel {
        flex: 1;
        padding: 1rem 1.1rem 2rem;
        overflow-y: visible;
    }
    .tv-modal-header {
        padding: 1rem 1.1rem 0.75rem;
    }
    .tv-modal-title {
        font-size: 1.1rem;
    }
}
