:root {
    --nexus-primary: #1a1a2e;
    --nexus-accent: #0f3460;
    --nexus-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body {
    min-height: 100vh;
    background-color: #f4f6fb;
}

body.site-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.site-layout main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 1rem 0 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    letter-spacing: 0.01em;
}

.site-footer-brand-name {
    font-weight: 600;
    color: var(--nexus-accent, #0f3460);
}

.site-footer-sep {
    opacity: 0.45;
}

.site-footer-copy {
    color: #6c757d;
}

body.auth-page .site-footer,
body.guest-entry-page .site-footer {
    background: transparent;
    border-top-color: rgba(255, 255, 255, 0.14);
}

body.auth-page .site-footer-brand-name,
body.guest-entry-page .site-footer-brand-name {
    color: rgba(255, 255, 255, 0.92);
}

body.auth-page .site-footer-copy,
body.guest-entry-page .site-footer-copy,
body.auth-page .site-footer-sep,
body.guest-entry-page .site-footer-sep {
    color: rgba(255, 255, 255, 0.62);
}

body.public-event-page .site-footer {
    background: #0b1020;
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.public-event-page .site-footer-brand-name {
    color: rgba(255, 255, 255, 0.85);
}

body.public-event-page .site-footer-copy,
body.public-event-page .site-footer-sep {
    color: rgba(255, 255, 255, 0.5);
}

body.auth-page.site-layout main.auth-main,
body.guest-entry-page.site-layout main.auth-main {
    min-height: auto;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background: var(--nexus-gradient);
    position: relative;
    overflow-x: hidden;
}

body.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.1), transparent 42%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.07), transparent 38%);
    pointer-events: none;
}

.auth-main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    margin: 0 !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    animation: authFadeIn 0.45s ease;
}

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

.auth-card {
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--nexus-accent);
    letter-spacing: 0.01em;
    line-height: 1.35;
}

.auth-brand-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
}

.auth-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.12), rgba(15, 52, 96, 0.06));
    color: var(--nexus-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    box-shadow: 0 8px 20px rgba(15, 52, 96, 0.12);
}

.auth-input-group .input-group-text {
    background: #f8f9fb;
    border-color: #dee2e6;
    color: var(--nexus-accent);
}

.auth-input-group .form-control {
    border-color: #dee2e6;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.auth-input-group .form-control:focus {
    border-color: var(--nexus-accent);
    box-shadow: 0 0 0 0.2rem rgba(15, 52, 96, 0.12);
}

.auth-submit-btn {
    border-radius: 0.65rem;
    font-weight: 600;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
}

.auth-icon.host-icon {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

.brand-title {
    font-weight: 600;
    color: var(--nexus-accent, #0f3460);
    letter-spacing: 0.01em;
}

.stat-card {
    border-left: 4px solid var(--nexus-accent);
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.event-thumb {
    max-height: 120px;
    object-fit: cover;
}

.event-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-2px);
}

.event-card-img {
    height: 160px;
    object-fit: cover;
}

.event-card-placeholder {
    height: 160px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #adb5bd;
}

.live-chat-preview {
    max-height: 180px;
    overflow-y: auto;
    background: #fafbfc;
}

/* Public event page */
.public-event-page {
    background: #0b1020;
}

.public-live-header {
    background: var(--nexus-gradient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.public-live-grid {
    min-height: calc(100vh - 120px);
}

.live-pulse {
    animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.public-chat-card {
    height: calc(100vh - 160px);
    min-height: 420px;
}

.public-chat-card .card-body {
    height: calc(100% - 56px);
}

.public-chat-messages {
    overflow-y: auto;
    padding: 1rem;
    min-height: 200px;
    max-height: 100%;
}


/* Chat messages */
.chat-message {
    margin-bottom: 0.75rem;
    animation: fadeIn 0.25s ease;
}

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

.chat-message .meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.15rem;
}

.chat-message .author {
    font-weight: 600;
}

.chat-message .bubble {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    border-radius: 0.75rem;
    max-width: 100%;
    word-break: break-word;
}

.chat-message.type-audience .bubble {
    background: #e9ecef;
    color: #212529;
}

.chat-message.type-host .bubble,
.chat-message.type-admin .bubble,
.chat-message.type-guest .bubble {
    background: #0f3460;
    color: #fff;
}

.chat-message.type-system .bubble {
    background: #fff3cd;
    color: #664d03;
    font-style: italic;
}

.chat-message.is-own .bubble {
    background: #0d6efd;
    color: #fff;
}

.chat-message .moderate-btn {
    opacity: 0;
    transition: opacity 0.15s;
    padding: 0;
    border: 0;
    background: none;
    color: #dc3545;
    font-size: 0.75rem;
}

.chat-message:hover .moderate-btn {
    opacity: 1;
}

/* Guest entry (chat flotante compartido, etc.) */
.guest-entry-page .auth-main {
    padding: 1rem;
}

.guest-entry-page .auth-wrapper {
    max-width: 380px;
}

.guest-entry-page .auth-card .card-body {
    padding: 1.5rem !important;
}

.guest-entry-page .auth-icon {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
}

.guest-event-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    line-height: 1.35;
}

/* Float chat window */

.float-chat-body {
    margin: 0;
    background: #fff;
    overflow: hidden;
}

.float-chat-app {
    height: 100vh;
    background: #fff;
}

.float-chat-header {
    background: var(--nexus-gradient);
    color: #fff;
    flex-shrink: 0;
}

.float-chat-messages {
    overflow-y: auto;
    padding: 0.75rem;
    background: #f8f9fa;
}

.float-chat-footer {
    flex-shrink: 0;
    background: #fff;
}

#btnPin {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

#btnPin:hover {
    background: #bb2d3b;
    border-color: #b02a37;
    color: #fff;
}

#btnPin.is-pinned {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

#btnPin.is-pinned:hover {
    background: #157347;
    border-color: #146c43;
    color: #fff;
}

.min-w-0 {
    min-width: 0;
}

@media (max-width: 991.98px) {
    .public-live-grid {
        min-height: auto;
    }

    .public-chat-card {
        height: 55vh;
        min-height: 320px;
    }
}
