/* ===== CLUBES ===== */

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

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

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

.clubes-header h1 i { -webkit-text-fill-color: #6c5ce7; }

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

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

.clubes-create-btn:hover { transform: scale(1.05); }

/* Tabs */
.clubes-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.clubes-tab {
    flex: 1;
    padding: 9px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: #aaa;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.clubes-tab.active {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

/* Card */
.clubes-list { display: flex; flex-direction: column; gap: 10px; }

.clube-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 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;
}

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

.clube-card-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

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

.clube-card-nome {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

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

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

.clube-card-media {
    color: #a29bfe;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    display: inline-block;
}

.clube-card-badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(108,92,231,0.15);
    color: #a29bfe;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.clube-card-arrow { color: rgba(255,255,255,0.12); font-size: 0.75rem; }

/* Back */
.clubes-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;
}

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

/* Detail header */
.clube-detail-header {
    text-align: center;
    padding: 24px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    margin-bottom: 16px;
}

.clube-detail-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 12px;
}

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

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

.clube-detail-meta {
    display: flex; gap: 16px; justify-content: center;
    font-size: 0.8rem; color: rgba(255,255,255,0.35);
    margin-bottom: 12px;
}

.clube-detail-meta i { margin-right: 4px; }

.clube-join-btn {
    padding: 8px 22px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff; border: none; border-radius: 18px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
}

.clube-leave-btn {
    padding: 8px 22px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem; cursor: pointer;
}

.clube-leave-btn:hover { border-color: #ef4444; color: #ef4444; }

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

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

.clube-section h3 i { color: #a29bfe; }

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

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

.clube-change-media-btn {
    padding: 4px 12px;
    background: rgba(108,92,231,0.12);
    border: 1px solid rgba(108,92,231,0.25);
    border-radius: 12px;
    color: #a29bfe;
    font-size: 0.75rem; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
}

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

/* Media atual */
.clube-media-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(108,92,231,0.06);
    border: 1px solid rgba(108,92,231,0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.clube-media-card:hover { background: rgba(108,92,231,0.12); }

.clube-media-poster {
    width: 50px; height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.clube-media-titulo {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.clube-media-tipo {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
}

/* Membros */
.clube-membros { display: flex; flex-wrap: wrap; gap: 8px; }

.clube-membro {
    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);
}

.clube-membro-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.clube-membro-icon { font-size: 1.1rem; color: rgba(255,255,255,0.3); }

.clube-membro-admin {
    font-size: 0.6rem;
    background: rgba(108,92,231,0.2);
    color: #a29bfe;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* Discussao */
.clube-discussao {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    margin-bottom: 10px;
}

.clube-disc-msg {
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
}

.clube-disc-msg--me { background: rgba(108,92,231,0.06); }

.clube-disc-header {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 4px;
}

.clube-disc-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.clube-disc-icon { font-size: 1rem; color: rgba(255,255,255,0.25); }

.clube-disc-author {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.clube-disc-time {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.2);
    margin-left: auto;
}

.clube-disc-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
    word-break: break-word;
}

/* Chat input */
.clube-chat-input {
    display: flex; gap: 8px;
}

.clube-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;
}

.clube-chat-input input:focus { outline: none; border-color: #a29bfe; }

.clube-chat-input button {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border: none; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; flex-shrink: 0;
}

/* Historico */
.clube-historico {
    display: flex; gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
}

.clube-hist-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; cursor: pointer;
    min-width: 70px;
}

.clube-hist-poster {
    width: 56px; height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.clube-hist-ph {
    width: 56px; height: 80px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.15);
}

.clube-hist-item span {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Admin */
.clube-admin-actions {
    display: flex; gap: 10px; margin-top: 12px;
}

.clube-delete-btn {
    padding: 10px 20px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    color: #ef4444;
    font-size: 0.85rem; cursor: pointer;
}

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

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

.clubes-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);
}

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

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

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

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

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

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

.clubes-modal-body input,
.clubes-modal-body textarea,
.clubes-modal-body select {
    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;
}

.clubes-modal-body input:focus,
.clubes-modal-body textarea:focus,
.clubes-modal-body select:focus { outline: none; border-color: #a29bfe; }

.clubes-modal-body select option { background: #1a1a2e; }

.clubes-submit-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #6c5ce7, #fd79a8);
    color: #fff; border: none;
    border-radius: 12px;
    font-size: 0.95rem; font-weight: 700; cursor: pointer;
    margin-top: 6px;
}

/* Search results */
.clubes-search-results { max-height: 280px; overflow-y: auto; margin-top: 6px; }
.clubes-search-results:empty { display: none; }

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

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

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

.clubes-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;
}

.clubes-result-titulo { display: block; font-size: 0.85rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clubes-result-tipo { font-size: 0.65rem; color: rgba(255,255,255,0.3); text-transform: uppercase; }

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

.clubes-loading i, .clubes-empty i { font-size: 2.5rem; color: #6c5ce7; }
.clubes-empty h2 { color: #fff; margin: 0; }

/* Responsive */
@media (max-width: 480px) {
    .clubes-main { margin-top: 70px; padding: 0 10px; }
    .clube-card { padding: 12px; gap: 10px; }
    .clube-section { padding: 12px; }
}

/* Light theme: surfaces, content and interaction states. */
:is(html.light-theme-early, body.light-theme) .clube-card-nome,
:is(html.light-theme-early, body.light-theme) .clube-detail-header h2,
:is(html.light-theme-early, body.light-theme) .clube-media-titulo,
:is(html.light-theme-early, body.light-theme) .clubes-modal-header h2,
:is(html.light-theme-early, body.light-theme) .clubes-result-titulo,
:is(html.light-theme-early, body.light-theme) .clubes-empty h2,
:is(html.light-theme-early, body.light-theme) .clube-disc-text {
    color: var(--text, #1e293b);
}

:is(html.light-theme-early, body.light-theme) .clubes-header p,
:is(html.light-theme-early, body.light-theme) .clube-card-meta,
:is(html.light-theme-early, body.light-theme) .clube-card-arrow,
:is(html.light-theme-early, body.light-theme) .clubes-back-btn,
:is(html.light-theme-early, body.light-theme) .clube-detail-desc,
:is(html.light-theme-early, body.light-theme) .clube-detail-meta,
:is(html.light-theme-early, body.light-theme) .clube-section h3,
:is(html.light-theme-early, body.light-theme) .clube-empty-msg,
:is(html.light-theme-early, body.light-theme) .clube-media-tipo,
:is(html.light-theme-early, body.light-theme) .clube-membro,
:is(html.light-theme-early, body.light-theme) .clube-membro-icon,
:is(html.light-theme-early, body.light-theme) .clube-disc-icon,
:is(html.light-theme-early, body.light-theme) .clube-disc-author,
:is(html.light-theme-early, body.light-theme) .clube-disc-time,
:is(html.light-theme-early, body.light-theme) .clube-hist-item span,
:is(html.light-theme-early, body.light-theme) .clube-hist-ph,
:is(html.light-theme-early, body.light-theme) .clubes-modal-close,
:is(html.light-theme-early, body.light-theme) .clubes-modal-body label,
:is(html.light-theme-early, body.light-theme) .clubes-result-ph,
:is(html.light-theme-early, body.light-theme) .clubes-result-tipo,
:is(html.light-theme-early, body.light-theme) .clubes-loading,
:is(html.light-theme-early, body.light-theme) .clubes-empty {
    color: var(--text-muted, #526070);
}

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

:is(html.light-theme-early, body.light-theme) .clubes-tab,
:is(html.light-theme-early, body.light-theme) .clube-leave-btn,
:is(html.light-theme-early, body.light-theme) .clube-membro,
:is(html.light-theme-early, body.light-theme) .clube-disc-msg,
:is(html.light-theme-early, body.light-theme) .clube-hist-ph,
:is(html.light-theme-early, body.light-theme) .clubes-result-ph {
    background: var(--surface2, #f8f7f3); border-color: var(--border, rgba(30, 41, 59, .12));
}

:is(html.light-theme-early, body.light-theme) .clubes-tab,
:is(html.light-theme-early, body.light-theme) .clube-leave-btn {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .clube-card:hover,
:is(html.light-theme-early, body.light-theme) .clubes-tab:hover,
:is(html.light-theme-early, body.light-theme) .clubes-result-item:hover,
:is(html.light-theme-early, body.light-theme) .clube-leave-btn:hover {
    background: #edeaf5; border-color: rgba(109, 40, 217, .22);
}

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

:is(html.light-theme-early, body.light-theme) .clube-disc-msg--me {
    background: #ede9fe;
}

:is(html.light-theme-early, body.light-theme) .clube-card-media,
:is(html.light-theme-early, body.light-theme) .clube-card-badge,
:is(html.light-theme-early, body.light-theme) .clube-section h3 i,
:is(html.light-theme-early, body.light-theme) .clube-change-media-btn,
:is(html.light-theme-early, body.light-theme) .clube-membro-admin {
    color: #6d28d9;
}

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

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

:is(html.light-theme-early, body.light-theme) .clubes-modal-body select option {
    background: var(--surface, #fff); border-color: var(--border, rgba(30, 41, 59, .12)); color: var(--text, #1e293b);
}

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

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

:is(html.light-theme-early, body.light-theme) .clubes-create-btn,
:is(html.light-theme-early, body.light-theme) .clubes-submit-btn {
    background: linear-gradient(135deg, #6d28d9, #be185d); color: #fff;
}

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

:is(html.light-theme-early, body.light-theme) .clubes-header h1 { background-image: linear-gradient(135deg, #6d28d9, #be185d); }
