/* ===== VERSUS / DEBATES ===== */

.versus-main {
    max-width: 640px;
    margin: 80px auto 40px;
    padding: 0 16px;
}

/* Header */
.versus-header {
    text-align: center;
    margin-bottom: 28px;
}

.versus-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 6px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.versus-header h1 i {
    -webkit-text-fill-color: #f59e0b;
}

.versus-header p {
    color: rgba(255,255,255,0.45);
    margin: 0 0 18px;
    font-size: 0.9rem;
}

.versus-create-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.versus-create-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}

/* Feed */
.versus-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Card */
.versus-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.versus-card:hover {
    border-color: rgba(255,255,255,0.12);
}

.versus-card-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.versus-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.versus-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.versus-author-icon {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.3);
}

.versus-card-titulo {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

/* Battle area */
.versus-battle {
    display: flex;
    align-items: stretch;
    position: relative;
    min-height: 200px;
}

.versus-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.versus-side:hover {
    background: rgba(255,255,255,0.04);
}

.versus-side--voted {
    background: rgba(168,85,247,0.08);
}

.versus-side--winner .versus-side-titulo {
    color: #f59e0b;
}

.versus-side-poster {
    width: 90px;
    height: 130px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.versus-side:hover .versus-side-poster {
    transform: scale(1.05);
}

.versus-side-poster-ph {
    width: 90px;
    height: 130px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.15);
    margin-bottom: 10px;
}

.versus-side-titulo {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.versus-side-bar {
    width: 80%;
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.versus-side-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.versus-side--winner .versus-side-fill {
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.versus-side-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.versus-side--winner .versus-side-pct {
    color: #f59e0b;
}

/* Center VS badge */
.versus-center-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-weight: 900;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 12px rgba(245,158,11,0.4);
}

/* Footer */
.versus-card-footer {
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.versus-votes-count {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

.versus-votes-count i {
    margin-right: 4px;
}

.versus-delete-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.versus-delete-btn:hover {
    color: #ef4444;
    background: rgba(239,68,68,0.1);
}

/* Loading & Empty */
.versus-loading, .versus-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.4);
    gap: 12px;
    text-align: center;
}

.versus-loading i, .versus-empty i {
    font-size: 2.5rem;
    color: #f59e0b;
}

.versus-empty h2 {
    color: #fff;
    margin: 0;
}

/* ===== MODAL ===== */
.versus-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.versus-modal {
    background: #1a1a2e;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.08);
}

.versus-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.versus-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.versus-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.versus-modal-body {
    padding: 22px;
}

.versus-modal-body .form-group {
    margin-bottom: 18px;
}

.versus-modal-body .form-group label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.versus-modal-body input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.versus-modal-body input[type="text"]:focus {
    outline: none;
    border-color: #f59e0b;
}

/* Picks */
.versus-picks {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.versus-pick {
    flex: 1;
}

.versus-pick-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.versus-pick-search input {
    width: 100%;
    padding: 9px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.versus-pick-search input:focus {
    outline: none;
    border-color: #f59e0b;
}

.versus-pick-results {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    border-radius: 10px;
    background: #161622;
    border: 1px solid rgba(255,255,255,0.06);
}

.versus-pick-results:empty {
    display: none;
}

.versus-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.versus-result-item:hover {
    background: rgba(255,255,255,0.06);
}

.versus-result-item img {
    width: 32px;
    height: 46px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.versus-result-ph {
    width: 32px;
    height: 46px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.versus-result-info {
    min-width: 0;
}

.versus-result-titulo {
    display: block;
    font-size: 0.8rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.versus-result-tipo {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}

.versus-result-error {
    padding: 10px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
}

.versus-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    color: #f59e0b;
    padding-top: 30px;
    min-width: 36px;
}

/* Selected pick */
.versus-pick-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 10px;
}

.versus-pick-selected img {
    width: 36px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
}

.versus-pick-selected span {
    flex: 1;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.versus-pick-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
}

.versus-pick-remove:hover {
    color: #ef4444;
}

/* Submit */
.versus-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.versus-submit-btn:hover:not(:disabled) {
    transform: scale(1.02);
}

.versus-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
    .versus-main {
        margin-top: 70px;
        padding: 0 10px;
    }

    .versus-battle {
        min-height: 170px;
    }

    .versus-side {
        padding: 14px 8px 12px;
    }

    .versus-side-poster {
        width: 72px;
        height: 105px;
    }

    .versus-side-titulo {
        font-size: 0.78rem;
        max-width: 110px;
    }

    .versus-picks {
        flex-direction: column;
    }

    .versus-vs-divider {
        padding-top: 0;
    }

    .versus-center-badge {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }
}

/* Light theme: surfaces, content and interaction states. */
:is(html.light-theme-early, body.light-theme) .versus-header p,
:is(html.light-theme-early, body.light-theme) .versus-card-author,
:is(html.light-theme-early, body.light-theme) .versus-author-icon,
:is(html.light-theme-early, body.light-theme) .versus-card-titulo,
:is(html.light-theme-early, body.light-theme) .versus-side-pct,
:is(html.light-theme-early, body.light-theme) .versus-votes-count,
:is(html.light-theme-early, body.light-theme) .versus-delete-btn,
:is(html.light-theme-early, body.light-theme) .versus-loading,
:is(html.light-theme-early, body.light-theme) .versus-empty,
:is(html.light-theme-early, body.light-theme) .versus-modal-close,
:is(html.light-theme-early, body.light-theme) .versus-modal-body .form-group label,
:is(html.light-theme-early, body.light-theme) .versus-pick-label,
:is(html.light-theme-early, body.light-theme) .versus-result-tipo,
:is(html.light-theme-early, body.light-theme) .versus-result-error,
:is(html.light-theme-early, body.light-theme) .versus-pick-remove {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .versus-side-titulo,
:is(html.light-theme-early, body.light-theme) .versus-empty h2,
:is(html.light-theme-early, body.light-theme) .versus-modal-header h2,
:is(html.light-theme-early, body.light-theme) .versus-result-titulo,
:is(html.light-theme-early, body.light-theme) .versus-pick-selected span {
    color: var(--text, #1e293b);
}

:is(html.light-theme-early, body.light-theme) .versus-card,
:is(html.light-theme-early, body.light-theme) .versus-modal,
:is(html.light-theme-early, body.light-theme) .versus-pick-results {
    background: var(--surface, #fff); border-color: var(--border, rgba(30, 41, 59, .12));
}

:is(html.light-theme-early, body.light-theme) .versus-card-header,
:is(html.light-theme-early, body.light-theme) .versus-card-footer,
:is(html.light-theme-early, body.light-theme) .versus-modal-header {
    border-color: var(--border, rgba(30, 41, 59, .12));
}

:is(html.light-theme-early, body.light-theme) .versus-card:hover {
    border-color: #a7afbf;
}

:is(html.light-theme-early, body.light-theme) .versus-side:hover,
:is(html.light-theme-early, body.light-theme) .versus-result-item:hover {
    background: #edeaf5; border-color: rgba(109, 40, 217, .22);
}

:is(html.light-theme-early, body.light-theme) .versus-side--voted {
    background: #ede9fe;
}

:is(html.light-theme-early, body.light-theme) .versus-side--voted:hover {
    background: #e3dbfb;
}

:is(html.light-theme-early, body.light-theme) .versus-side--winner .versus-side-titulo,
:is(html.light-theme-early, body.light-theme) .versus-side--winner .versus-side-pct,
:is(html.light-theme-early, body.light-theme) .versus-vs-divider {
    color: var(--accent-ink, #806117);
}

:is(html.light-theme-early, body.light-theme) .versus-side-poster-ph,
:is(html.light-theme-early, body.light-theme) .versus-result-ph {
    background: var(--surface2, #f8f7f3); border-color: var(--border, rgba(30, 41, 59, .12)); color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .versus-side-bar {
    background: #dce1e7;
}

:is(html.light-theme-early, body.light-theme) .versus-modal-close:hover {
    color: var(--text, #1e293b);
}

:is(html.light-theme-early, body.light-theme) .versus-modal-body input[type="text"],
:is(html.light-theme-early, body.light-theme) .versus-pick-search input {
    background: var(--surface2, #f8f7f3); border-color: var(--border, rgba(30, 41, 59, .12)); color: var(--text, #1e293b);
}

:is(html.light-theme-early, body.light-theme) .versus-modal-body input::placeholder,
:is(html.light-theme-early, body.light-theme) .versus-pick-search input::placeholder {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .versus-delete-btn:hover,
:is(html.light-theme-early, body.light-theme) .versus-pick-remove:hover {
    color: #b91c1c;
}

:is(html.light-theme-early, body.light-theme) .versus-create-btn,
:is(html.light-theme-early, body.light-theme) .versus-submit-btn,
:is(html.light-theme-early, body.light-theme) .versus-center-badge {
    background: linear-gradient(135deg, #c2410c, #be185d); color: #fff; border-color: transparent;
}

:is(html.light-theme-early, body.light-theme) .versus-header h1 { background-image: linear-gradient(135deg, #a16207, #b91c1c); }
:is(html.light-theme-early, body.light-theme) .versus-header h1 i { -webkit-text-fill-color: #a16207; }

:is(html.light-theme-early, body.light-theme) .versus-loading i,
:is(html.light-theme-early, body.light-theme) .versus-empty i { color: var(--accent-ink, #806117); }
