/* ===== NOITE DE FILME ===== */

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

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

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

.noite-header h1 i {
    -webkit-text-fill-color: #a855f7;
}

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

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

.noite-create-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}

/* Cards lista */
.noite-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.noite-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.noite-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.noite-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(99,102,241,0.12);
    color: #a855f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.noite-card-info {
    flex: 1;
    min-width: 0;
}

.noite-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.noite-card-titulo {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.noite-status {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.noite-status--open {
    background: rgba(34,197,94,0.12);
    color: #22c55e;
}

.noite-status--done {
    background: rgba(107,114,128,0.15);
    color: #9ca3af;
}

.noite-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
}

.noite-card-meta i {
    margin-right: 3px;
}

.noite-card-arrow {
    color: rgba(255,255,255,0.15);
    font-size: 0.8rem;
}

/* Back btn */
.noite-back-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.noite-back-btn:hover { color: #fff; }

/* Sala Header */
.sala-header {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(168,85,247,0.06));
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 20px;
}

.sala-header h2 {
    margin: 0 0 6px;
    font-size: 1.4rem;
    color: #fff;
}

.sala-desc {
    color: rgba(255,255,255,0.45);
    font-size: 0.85rem;
    margin: 0 0 8px;
}

.sala-data {
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    margin: 0 0 10px;
}

.sala-data i { margin-right: 4px; }

.sala-status-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.sala-escolhida {
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 600;
}

.sala-escolhida i { margin-right: 4px; }

.noite-join-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 0;
}

.sala-share {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sala-share-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

.sala-share-btn {
    padding: 5px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    cursor: pointer;
}

.sala-share-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Sections */
.sala-section {
    margin-bottom: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 16px;
}

.sala-section h3 {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sala-section h3 i {
    color: #a855f7;
}

.sala-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sala-section-header h3 { margin: 0; }

.noite-suggest-btn {
    padding: 5px 14px;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 14px;
    color: #a855f7;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.noite-suggest-btn:hover {
    background: rgba(168,85,247,0.25);
}

.sala-empty-msg {
    color: rgba(255,255,255,0.25);
    font-size: 0.85rem;
    text-align: center;
    padding: 12px;
    margin: 0;
}

/* Participantes */
.sala-participantes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sala-part {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 18px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.sala-part-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.sala-part-icon {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.3);
}

.sala-part-host {
    font-size: 0.6rem;
    background: rgba(168,85,247,0.2);
    color: #a855f7;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* Sugestoes */
.sugestao-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}

.sugestao-card:hover {
    background: rgba(255,255,255,0.05);
}

.sugestao-card--voted {
    border-color: rgba(168,85,247,0.2);
    background: rgba(168,85,247,0.04);
}

.sugestao-rank {
    font-size: 0.85rem;
    font-weight: 800;
    color: rgba(255,255,255,0.2);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.sugestao-poster {
    width: 38px;
    height: 55px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.sugestao-poster-ph {
    width: 38px;
    height: 55px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.sugestao-info {
    flex: 1;
    min-width: 0;
}

.sugestao-titulo {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sugestao-autor {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
}

.sugestao-vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sugestao-vote-btn span {
    font-size: 0.7rem;
    font-weight: 700;
}

.sugestao-vote-btn:hover {
    background: rgba(168,85,247,0.12);
    color: #a855f7;
}

.sugestao-vote-btn--active {
    background: rgba(168,85,247,0.15);
    border-color: rgba(168,85,247,0.3);
    color: #a855f7;
}

/* Chat */
.sala-chat {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
    margin-bottom: 10px;
}

.chat-empty { padding: 20px; }

.chat-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 80%;
}

.chat-msg--me {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg-author {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2px;
    padding-left: 8px;
}

.chat-msg-bubble {
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border-radius: 16px 16px 16px 4px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    word-break: break-word;
}

.chat-msg--me .chat-msg-bubble {
    background: rgba(99,102,241,0.2);
    border-radius: 16px 16px 4px 16px;
}

.chat-msg-time {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.2);
    margin-top: 2px;
    padding: 0 8px;
}

.sala-chat-input {
    display: flex;
    gap: 8px;
}

.sala-chat-input input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
}

.sala-chat-input input:focus {
    outline: none;
    border-color: #a855f7;
}

.sala-chat-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sala-chat-input button:hover { transform: scale(1.1); }

/* Host Actions */
.sala-host-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.noite-finalize-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.noite-delete-btn {
    padding: 10px 16px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 12px;
    color: #ef4444;
    font-size: 0.9rem;
    cursor: pointer;
}

.noite-delete-btn:hover {
    background: rgba(239,68,68,0.2);
}

/* Modal */
.noite-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);
}

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

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

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

.noite-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1rem;
    cursor: pointer;
}

.noite-modal-body {
    padding: 20px;
}

.noite-modal-body .form-group {
    margin-bottom: 14px;
}

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

.noite-modal-body input,
.noite-modal-body textarea {
    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;
    font-family: inherit;
}

.noite-modal-body input:focus,
.noite-modal-body textarea:focus {
    outline: none;
    border-color: #a855f7;
}

.noite-submit-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    transition: transform 0.2s;
}

.noite-submit-btn:hover { transform: scale(1.02); }

/* Search results in suggest modal */
.noite-search-results {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 6px;
    border-radius: 10px;
}

.noite-search-results:empty { display: none; }

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

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

.noite-result-item img {
    width: 34px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.noite-result-ph {
    width: 34px;
    height: 50px;
    border-radius: 5px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

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

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

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

/* Loading & Empty */
.noite-loading, .noite-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;
}

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

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

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

    .noite-card { padding: 12px; gap: 10px; }
    .sala-section { padding: 12px; }
    .sugestao-card { padding: 8px; gap: 8px; }
}

/* Light theme: surfaces, content and interaction states. */
:is(html.light-theme-early, body.light-theme) .noite-card-titulo,
:is(html.light-theme-early, body.light-theme) .sala-header h2,
:is(html.light-theme-early, body.light-theme) .sugestao-titulo,
:is(html.light-theme-early, body.light-theme) .chat-msg-bubble,
:is(html.light-theme-early, body.light-theme) .noite-modal-header h2,
:is(html.light-theme-early, body.light-theme) .noite-result-titulo,
:is(html.light-theme-early, body.light-theme) .noite-empty h2 {
    color: var(--text, #1e293b);
}

:is(html.light-theme-early, body.light-theme) .noite-header p,
:is(html.light-theme-early, body.light-theme) .noite-card-meta,
:is(html.light-theme-early, body.light-theme) .noite-card-arrow,
:is(html.light-theme-early, body.light-theme) .noite-back-btn,
:is(html.light-theme-early, body.light-theme) .sala-desc,
:is(html.light-theme-early, body.light-theme) .sala-data,
:is(html.light-theme-early, body.light-theme) .sala-share-label,
:is(html.light-theme-early, body.light-theme) .sala-section h3,
:is(html.light-theme-early, body.light-theme) .sala-empty-msg,
:is(html.light-theme-early, body.light-theme) .sala-part,
:is(html.light-theme-early, body.light-theme) .sala-part-icon,
:is(html.light-theme-early, body.light-theme) .sugestao-rank,
:is(html.light-theme-early, body.light-theme) .sugestao-autor,
:is(html.light-theme-early, body.light-theme) .chat-msg-author,
:is(html.light-theme-early, body.light-theme) .chat-msg-time,
:is(html.light-theme-early, body.light-theme) .noite-modal-close,
:is(html.light-theme-early, body.light-theme) .noite-modal-body .form-group label,
:is(html.light-theme-early, body.light-theme) .noite-result-tipo,
:is(html.light-theme-early, body.light-theme) .noite-result-ph,
:is(html.light-theme-early, body.light-theme) .sugestao-poster-ph,
:is(html.light-theme-early, body.light-theme) .noite-loading,
:is(html.light-theme-early, body.light-theme) .noite-empty {
    color: var(--text-muted, #526070);
}

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

:is(html.light-theme-early, body.light-theme) .sala-header {
    background: linear-gradient(135deg, #eeebff, #f5eafd); border-color: #d8d0ee;
}

:is(html.light-theme-early, body.light-theme) .sala-share-btn,
:is(html.light-theme-early, body.light-theme) .sala-part,
:is(html.light-theme-early, body.light-theme) .sugestao-poster-ph,
:is(html.light-theme-early, body.light-theme) .sugestao-vote-btn,
:is(html.light-theme-early, body.light-theme) .chat-msg-bubble,
:is(html.light-theme-early, body.light-theme) .noite-result-ph {
    background: var(--surface2, #f8f7f3); border-color: var(--border, rgba(30, 41, 59, .12));
}

:is(html.light-theme-early, body.light-theme) .sala-share-btn,
:is(html.light-theme-early, body.light-theme) .sugestao-vote-btn {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .noite-card:hover,
:is(html.light-theme-early, body.light-theme) .sala-share-btn:hover,
:is(html.light-theme-early, body.light-theme) .sugestao-card:hover,
:is(html.light-theme-early, body.light-theme) .noite-result-item:hover {
    background: #edeaf5; border-color: rgba(109, 40, 217, .22); color: var(--text, #1e293b);
}

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

:is(html.light-theme-early, body.light-theme) .noite-status--open {
    color: #15803d;
}

:is(html.light-theme-early, body.light-theme) .noite-status--done {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .sala-escolhida {
    color: var(--accent-ink, #806117);
}

:is(html.light-theme-early, body.light-theme) .sala-section h3 i,
:is(html.light-theme-early, body.light-theme) .noite-suggest-btn,
:is(html.light-theme-early, body.light-theme) .sala-part-host,
:is(html.light-theme-early, body.light-theme) .sugestao-vote-btn:hover,
:is(html.light-theme-early, body.light-theme) .sugestao-vote-btn--active {
    color: #6d28d9;
}

:is(html.light-theme-early, body.light-theme) .sugestao-card--voted,
:is(html.light-theme-early, body.light-theme) .chat-msg--me .chat-msg-bubble {
    background: #ede9fe; border-color: #c4b5fd;
}

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

:is(html.light-theme-early, body.light-theme) .sala-chat-input input,
:is(html.light-theme-early, body.light-theme) .noite-modal-body input,
:is(html.light-theme-early, body.light-theme) .noite-modal-body textarea {
    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) .sala-chat-input input::placeholder,
:is(html.light-theme-early, body.light-theme) .noite-modal-body input::placeholder,
:is(html.light-theme-early, body.light-theme) .noite-modal-body textarea::placeholder {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .sala-chat-input input:focus,
:is(html.light-theme-early, body.light-theme) .noite-modal-body input:focus,
:is(html.light-theme-early, body.light-theme) .noite-modal-body textarea:focus {
    border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(109, 40, 217, .12);
}

:is(html.light-theme-early, body.light-theme) .noite-create-btn,
:is(html.light-theme-early, body.light-theme) .noite-join-btn,
:is(html.light-theme-early, body.light-theme) .sala-chat-input button,
:is(html.light-theme-early, body.light-theme) .noite-submit-btn {
    background: linear-gradient(135deg, #6d28d9, #7c3aed); color: #fff; border-color: transparent;
}

:is(html.light-theme-early, body.light-theme) .noite-finalize-btn {
    background: linear-gradient(135deg, #15803d, #0e7490); color: #fff; border-color: transparent;
}

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

:is(html.light-theme-early, body.light-theme) .noite-header h1 { background-image: linear-gradient(135deg, #4338ca, #7e22ce); }
:is(html.light-theme-early, body.light-theme) .noite-header h1 i { -webkit-text-fill-color: #7e22ce; }
:is(html.light-theme-early, body.light-theme) .sugestao-vote-btn--active { background: #ede9fe; border-color: #b7a1ee; }

:is(html.light-theme-early, body.light-theme) .noite-card-icon,
:is(html.light-theme-early, body.light-theme) .noite-loading i,
:is(html.light-theme-early, body.light-theme) .noite-empty i { color: #7e22ce; }
