:root {
  /* Base UI */
  --ag-bg: #05070a;
  --ag-bg-soft: #10141b;
  --ag-panel: #161b23;
  --ag-border: rgba(255,255,255,0.06);
  --ag-text: #e5e7eb;
  --ag-text-soft: #9ca3af;

  /* Glow default (perfil) */
  --ag-glow-rgb: 0, 180, 255; /* AZUL PERFIL */
  --ag-glow: rgba(var(--ag-glow-rgb), 0.75);
  --ag-glow-weak: rgba(var(--ag-glow-rgb), 0.25);
  --ag-glow-strong: rgba(var(--ag-glow-rgb), 0.95);

  --ag-radius: 14px;
  --ag-shadow: 0 18px 40px rgba(0,0,0,0.6);
}




* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #192132, #05070a 55%, #020309 100%);
    color: var(--ag-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* HEADER */

.ag-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(5,7,10,0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.ag-header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.ag-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ag-logo {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(56,189,248,0.5);
}

.ag-title-block {
    display: flex;
    flex-direction: column;
}

.ag-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ag-subtitle {
    font-size: 0.8rem;
    color: var(--ag-text-soft);
}

.ag-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--ag-text-soft);
}

.ag-status-label {
    opacity: 0.8;
}

.ag-status-name {
    color: var(--ag-accent);
    font-weight: 500;
}

.ag-status-pill {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(34,197,94,0.6);
    background: rgba(34,197,94,0.12);
    color: #bbf7d0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ag-nav {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.ag-nav-link {
    color: var(--ag-text-soft);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.15s ease-out;
}

.ag-nav-link:hover {
    color: var(--ag-text);
    border-color: rgba(148,163,184,0.4);
    background: rgba(15,23,42,0.7);
}

.ag-nav-link-exit {
    color: #fecaca;
    border-color: rgba(248,113,113,0.5);
}

/* LAYOUT PRINCIPAL */

.ag-main {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr 1fr;
    gap: 1.2rem;
    padding: 1.3rem 1.5rem 1.7rem;
}

.ag-column {
    background: linear-gradient(145deg, #10141b, #05070a);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: var(--ag-shadow);
    border: 1px solid var(--ag-border);
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}


.ag-card-sorteo {
    background: radial-gradient(circle at top left, rgba(56,189,248,0.10), #05070a);
    border-radius: var(--ag-radius);
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(148,163,184,0.4);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ag-card-header {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.ag-card-header h3 {
    font-size: 0.95rem;
}

.ag-card-sub {
    font-size: 0.8rem;
    color: var(--ag-text-soft);
}

.ag-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 0 16px rgba(56,189,248,0.5);
}

.ag-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ag-countdown {
    font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    color: #f87171;
}

.ag-countdown-green {
    color: #4ade80;
}

.ag-btn-primary {
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--ag-primary);
    color: #022c22;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 12px 24px rgba(34,197,94,0.45);
    transition: transform 0.09s ease-out, box-shadow 0.09s ease-out, background 0.09s;
}

.ag-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(34,197,94,0.55);
    background: #16a34a;
}

/* CHAT */


.ag-chat-message {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.ag-chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e5e7eb;
}

.ag-chat-bubble {
    background: rgba(15,23,42,0.9);
    border-radius: 14px;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(148,163,184,0.35);
}

.ag-chat-name {
    font-size: 0.8rem;
    color: var(--ag-text-soft);
    margin-bottom: 0.1rem;
}

.ag-chat-text {
    font-size: 0.9rem;
}

/* PANEL DERECHO */

.ag-panel {
    background: #05070a;
    border-radius: var(--ag-radius);
    padding: 0.7rem 0.8rem 0.9rem;
    border: 1px solid rgba(148,163,184,0.35);
    margin-bottom: 0.75rem;
}

.ag-users-list,
.ag-rooms-list {
    list-style: none;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--ag-text-soft);
}

.ag-users-list li + li,
.ag-rooms-list li + li {
    margin-top: 0.25rem;
}

.ag-rooms-list li {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
}

.ag-rooms-list li.active {
    background: rgba(56,189,248,0.12);
    color: var(--ag-accent);
}

.ag-balance {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.ag-balance-label {
    color: var(--ag-text-soft);
}

/* RESPONSIVE */

@media (max-width: 1024px) {
    .ag-main,
    .ag-main-admin {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .ag-column {
        min-height: auto;
    }
}


/* AUTH PAGES */

.ag-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #192132, #05070a 55%, #020309 100%);
    color: var(--ag-text);
}

.ag-auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.ag-auth-card {
    background: linear-gradient(145deg, #10141b, #05070a);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--ag-border);
    box-shadow: var(--ag-shadow);
    text-align: center;
}

.ag-auth-card h1 {
    font-size: 1.4rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ag-auth-subtitle {
    font-size: 0.85rem;
    color: var(--ag-text-soft);
    margin-bottom: 1rem;
}

.ag-auth-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--ag-text-soft);
}

.ag-auth-form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.5rem;
}

.ag-auth-form label {
    font-size: 0.85rem;
    color: var(--ag-text-soft);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ag-auth-form input {
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: #020617;
    color: var(--ag-text);
    padding: 0.45rem 0.7rem;
    font-size: 0.9rem;
}

.ag-auth-actions {
    margin-top: 0.5rem;
    text-align: center;
}

.ag-auth-links {
    margin-top: 0.7rem;
    font-size: 0.8rem;
}

.ag-auth-links a {
    color: var(--ag-accent);
    text-decoration: none;
}

.ag-auth-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(248,113,113,0.7);
    color: #fecaca;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.ag-auth-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.7);
    color: #bbf7d0;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.ag-auth-guest {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ag-text-soft);
}

.ag-btn-ghost {
    margin-top: 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: transparent;
    color: var(--ag-text);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.ag-btn-ghost:hover {
    border-color: var(--ag-accent);
}

.ag-nav-guest-label {
    font-size: 0.8rem;
    color: var(--ag-text-soft);
    margin-right: 0.5rem;
}


/* === AUTH PAGES === */

.ag-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #192132, #05070a 55%, #020309 100%);
    color: var(--ag-text);
    font-family: 'Inter', sans-serif;
}

.ag-auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.ag-auth-card {
    background: linear-gradient(145deg, #10141b, #05070a);
    border-radius: 20px;
    padding: 1.7rem;
    border: 1px solid rgba(148,163,184,0.15);
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    text-align: center;
}

.ag-auth-card h1 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.ag-auth-subtitle {
    margin-top: -6px;
    font-size: 0.85rem;
    color: #7C8999;
    margin-bottom: 1.3rem;
}

.ag-auth-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #98A5B8;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.ag-auth-form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ag-auth-form label {
    font-size: 0.85rem;
    color: #9AA6BB;
}

.ag-auth-form input {
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.3);
    background: #030712;
    color: var(--ag-text);
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
    transition: 0.2s;
}

.ag-auth-form input:focus {
    border-color: var(--ag-accent);
    outline: none;
}

.ag-btn-primary {
    background: var(--ag-accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.ag-btn-primary:hover {
    filter: brightness(1.12);
}

.ag-btn-ghost {
    background: transparent;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    color: var(--ag-text);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}

.ag-btn-ghost:hover {
    border-color: var(--ag-accent);
}

.ag-auth-links {
    margin-top: 0.8rem;
    font-size: 0.85rem;
}

.ag-auth-links a {
    color: var(--ag-accent);
    text-decoration: none;
}

.ag-auth-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(248,113,113,0.7);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #fecaca;
    margin-bottom: 1rem;
}

.ag-auth-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.7);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    color: #bbf7d0;
    margin-bottom: 1rem;
}

/* === Modal invitado expirado === */

.ag-auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.ag-auth-modal-card {
    background: #0b1120;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    text-align: center;
    width: 95%;
    max-width: 380px;
    border: 1px solid rgba(255,255,255,0.08);
}

.ag-auth-modal-card h2 {
    margin-bottom: 0.7rem;
    font-size: 1.3rem;
}

.ag-auth-modal-card p {
    color: #cbd5e1;
    font-size: 0.95rem;
}


@media (max-width: 1024px) {
    .ag-header {
        padding: 0.6rem 1rem;
    }

    .ag-title {
        font-size: 1rem;
    }

    .ag-subtitle {
        font-size: 0.75rem;
    }

    .ag-nav {
        gap: 0.6rem;
        font-size: 0.8rem;
    }

    .ag-main {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .ag-column {
        min-height: auto;
    }
}


/* MÓVIL GENERAL */
@media (max-width: 768px) {

    /* Header en dos filas */
    .ag-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ag-header-left {
        width: 100%;
        justify-content: space-between;
        gap: 0.8rem;
    }

    .ag-logo {
        width: 34px;
        height: 34px;
    }

    .ag-title {
        font-size: 1rem;
    }

    .ag-subtitle {
        font-size: 0.7rem;
    }

    .ag-status {
        font-size: 0.75rem;
    }

    /* NAV: que no se salga */
    .ag-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .ag-nav-link,
    .ag-nav-guest-label {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    /* Columnas apiladas */
    .ag-main,
    .ag-main-admin {
        display: flex;
        flex-direction: column;
        padding: 0.8rem;
        gap: 0.8rem;
    }


    .ag-column {
        width: 100%;
    }

    /* Orden sugerido */
    .ag-column-left { order: 1; }
    .ag-column-center { order: 2; }
    .ag-column-right { order: 3; }




    .ag-panel {
        padding: 0.7rem 0.8rem;
    }

    .ag-users-list li,
    .ag-rooms-list li,
    .ag-balance {
        font-size: 0.8rem;
    }
}

/* Pantallas MUY chicas */
@media (max-width: 480px) {
    .ag-header {
        padding: 0.5rem 0.6rem;
    }

    .ag-main,
    .ag-main-admin {
        padding: 0.6rem;
    }

    .ag-nav-link,
    .ag-nav-guest-label {
        font-size: 0.7rem;
    }

}

/* Meta info del chat: contador + cooldown */
.ag-chat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #9ba3b5;
    margin-bottom: 6px;
    gap: 0.75rem;      /* 🔹 espacio entre partes */
    flex-wrap: wrap;   /* 🔹 si no entra, que baje a otra línea */
}

.ag-chat-counter {
    opacity: 0.8;
}

.ag-chat-cooldown {
    opacity: 0.9;
    font-weight: 500;
}




/* Mensajes de chat: layout y ancho máximo "arreglar texto de
chat que sobre sale
*/
.ag-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.ag-chat-avatar {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 999px;
    background: #222b3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #dfe7ff;
    text-transform: uppercase;
}

.ag-chat-bubble {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 0.4rem 0.7rem;
    max-width: 70%;              /* 🔹 límite de ancho */
    word-wrap: break-word;       /* cortar palabras largas */
    word-break: break-word;      /* por si hay texto sin espacios */
    box-sizing: border-box;
}

.ag-chat-name {
    font-size: 0.8rem;
    color: #9ba3b5;
    margin-bottom: 0.1rem;
}

.ag-chat-text {
    font-size: 0.9rem;
    color: #e5e5e5;
}


/* =========================
   MODALES
   ========================= */

.ag-hidden {
    display: none !important;
}

.ag-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3,7,18,0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.ag-modal-card {
    background: radial-gradient(circle at top, rgba(56,189,248,0.12), #020617);
    border-radius: 18px;
    padding: 1.5rem 1.7rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(148,163,184,0.4);
    box-shadow: var(--ag-shadow);
}

.ag-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ag-text);
    margin-bottom: 0.3rem;
}

.ag-modal-title-danger {
    color: var(--ag-danger);
}

.ag-modal-subtitle {
    font-size: 0.85rem;
    color: var(--ag-text-soft);
    margin-bottom: 0.9rem;
}

.ag-modal-textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.5);
    background: #020617;
    color: var(--ag-text);
    font-size: 0.9rem;
    padding: 0.45rem 0.6rem;
    resize: vertical;
    min-height: 80px;
}

.ag-modal-textarea:focus {
    outline: none;
    border-color: var(--ag-accent);
}

.ag-modal-preview {
    font-size: 0.85rem;
    color: var(--ag-text-soft);
    background: #020617;
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(148,163,184,0.4);
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 0.7rem;
}

.ag-modal-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.ag-btn-danger {
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    border: none;
    background: var(--ag-danger);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(239,68,68,0.4);
}

.ag-btn-danger:hover {
    filter: brightness(1.05);
}


/* Botones de acción dentro del chat (Editar / Eliminar) */
.ag-chat-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.ag-chat-actions button {
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.9);
    color: var(--ag-text-soft);
    border: 1px solid rgba(148, 163, 184, 0.4);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
                transform 0.08s ease;
}

/* Editar: azulito suave */
.ag-chat-edit {
    border-color: rgba(56, 189, 248, 0.5);
}

.ag-chat-edit:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #e5f3ff;
    border-color: rgba(56, 189, 248, 0.9);
    transform: translateY(-1px);
}

/* Eliminar: rojito */
.ag-chat-delete {
    border-color: rgba(248, 113, 113, 0.5);
}

.ag-chat-delete:hover {
    background: rgba(248, 113, 113, 0.16);
    color: #fee2e2;
    border-color: rgba(248, 113, 113, 0.95);
    transform: translateY(-1px);
}

/* Quitar el estilo “feo” por defecto del navegador */
.ag-chat-actions button:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.5);
}


/* =========================
   PANEL ADMIN SORTEOS
   ========================= */

.ag-main-admin {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 1.5rem;
    padding: 1.3rem 1.5rem 1.7rem; /* mismo padding que el lobby */
}


.ag-admin-panel {
    min-height: auto;
}

.ag-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ag-form-row {
    display: flex;
    gap: 0.75rem;
}

.ag-form-row .ag-form-field {
    flex: 1;
}

.ag-form-field span {
    display: block;
    font-size: 0.8rem;
    color: var(--ag-text-soft);
    margin-bottom: 0.2rem;
}

.ag-form-field input,
.ag-form-field textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #020617;
    color: var(--ag-text);
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
}

.ag-form-field textarea {
    resize: vertical;
}

.ag-alert {
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    font-size: 0.85rem;
    margin-bottom: 0.7rem;
}

.ag-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.ag-alert-danger {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.8);
    color: #fecaca;
}

.ag-table-wrap {
    max-height: 420px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,0.9);
    background: radial-gradient(circle at top, rgba(15,23,42,0.9), #020617);
}

.ag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.ag-table thead {
    background: rgba(15,23,42,0.96);
}

.ag-table th,
.ag-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
}

.ag-table th {
    text-align: left;
    font-weight: 600;
    color: var(--ag-text-soft);
}

.ag-table tbody tr:hover {
    background: rgba(15,23,42,0.75);
}


.ag-pill {
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.ag-pill-price {
    font-weight: 600;
}

.ag-pill-cupos {
    opacity: 0.9;
}

.ag-pill-time {
    font-style: italic;
    opacity: 0.85;
}

.ag-card-footer {
    margin-top: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* Estado deshabilitado cuando no hay cupos */
.ag-card-sorteo .ag-btn-participar.ag-btn-disabled,
.ag-card-sorteo .ag-btn-participar[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.3);
}
 /* En el panel admin, la columna derecha se adapta al contenido */
.ag-main-admin .ag-column-right {
    min-height: auto;
}
.ag-table-wrap {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
}


/* =========================
   Menú contextual sorteos
   ========================= */

/* Botón de los tres puntitos (ya lo tenías así) */
.ag-actions-cell {
    text-align: center;
}

/* Contenedor del botón + menú */
.ag-actions-wrapper {
    display: inline-block;
}

/* Botón de los tres puntitos */
.ag-actions-toggle {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: radial-gradient(circle at top, rgba(56,189,248,0.85), #022c22);
    box-shadow: 0 0 18px rgba(56,189,248,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-size: 1.1rem;
    padding: 0;
}

/* Menú contextual global */
#ag-actions-menu {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 150px;
    background: radial-gradient(circle at top, #020617, #020617 70%);
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.7);
    box-shadow: 0 18px 40px rgba(0,0,0,0.8);
    padding: 0.25rem 0;
    z-index: 999;
    display: none;
}

/* Se muestra cuando JS agrega .open */
#ag-actions-menu.open {
    display: block;
}

#ag-actions-menu .ag-actions-item {
    margin: 0;
    padding: 0;
}

#ag-actions-menu .ag-actions-item a,
#ag-actions-menu .ag-actions-item button {
    width: 100%;
    display: block;
    text-align: left;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    background: transparent;
    border: none;
    color: var(--ag-text-soft);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

#ag-actions-menu .ag-actions-item a:hover,
#ag-actions-menu .ag-actions-item button:hover {
    background: rgba(15,23,42,0.9);
    color: var(--ag-text);
}

/* Botón eliminar en rojo */
#ag-actions-menu .ag-actions-delete {
    color: #fecaca;
}
#ag-actions-menu .ag-actions-delete:hover {
    background: rgba(248,113,113,0.16);
    color: #fee2e2;
}


/* =========================================================
   Modal: elección de número para sorteos chicos (≤ 100)
   ========================================================= */

.ag-numero-modal-card {
    max-width: 520px;
}

.ag-numero-picker {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: radial-gradient(circle at top left, rgba(0, 255, 200, 0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(0, 140, 255, 0.22), transparent 55%),
                rgba(6, 14, 33, 0.96);
    border: 1px solid rgba(0, 255, 200, 0.45);
    box-shadow: 0 0 25px rgba(0, 255, 200, 0.18);
}

.ag-numero-picker-header {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .85rem;
    color: #dbe9ff;
    margin-bottom: .75rem;
}

.ag-numero-seleccion {
    font-weight: 600;
    color: #51ffd2;
}

/* Grilla de números */
.ag-numero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: .35rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: .25rem;
}

/* Scroll fino dentro del grid */
.ag-numero-grid::-webkit-scrollbar {
    width: 6px;
}
.ag-numero-grid::-webkit-scrollbar-track {
    background: rgba(4, 10, 26, 0.95);
}
.ag-numero-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0bffcf, #0080ff);
    border-radius: 999px;
}

/* Botón / celda de número */
.ag-numero-cell {
    position: relative;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    padding: .45rem 0;
    font-size: .82rem;
    font-weight: 600;
    color: #e6f5ff;
    background: radial-gradient(circle at 10% 0%, rgba(4, 255, 200, 0.7), rgba(4, 255, 200, 0.1)),
                radial-gradient(circle at 90% 100%, rgba(0, 132, 255, 0.5), rgba(0, 132, 255, 0.05));
    box-shadow:
        0 0 0 1px rgba(0, 255, 200, 0.28),
        0 0 16px rgba(0, 255, 200, 0.45);
    transition:
        transform 0.12s ease-out,
        box-shadow 0.12s ease-out,
        background 0.12s ease-out;
}

.ag-numero-cell:hover:not(.ag-numero-cell--taken):not(.ag-numero-cell--selected) {
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(0, 255, 200, 0.35),
        0 0 22px rgba(0, 255, 200, 0.6);
}

/* Seleccionado */
.ag-numero-cell--selected {
    background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.9), rgba(0, 255, 200, 0.4));
    color: #02121f;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.8),
        0 0 24px rgba(0, 255, 200, 0.85);
}

/* Ocupado */
.ag-numero-cell--taken {
    cursor: default;
    background: linear-gradient(135deg, rgba(16, 28, 60, 1), rgba(11, 18, 42, 1));
    color: #65728d;
    box-shadow: inset 0 0 0 1px rgba(46, 61, 96, 0.9);
}

/* Botones del modal: separar izquierda / derecha */
.ag-modal-actions-between {
    justify-content: space-between;
}

.ag-modal-actions-right {
    display: flex;
    gap: .5rem;
}

/* Responsive: en móvil la cabecera se apila mejor */
@media (max-width: 480px) {
    .ag-numero-picker-header {
        font-size: .8rem;
    }
    .ag-numero-grid {
        max-height: 210px;
    }
}

.ag-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    cursor: pointer;

    background: radial-gradient(circle at 0 0,
        rgba(239, 68, 68, 0.85),
        rgba(127, 29, 29, 0.98)
    );
    color: #fff;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.55);
    transition: all 0.18s ease-out;
}

.ag-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.75);
    filter: brightness(1.06);
}

.ag-btn-danger:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
    box-shadow: none;
}


/* ===== Modal cancelar participación ===== */

.ag-modal-card-cancel {
    max-width: 520px;
}

.ag-modal-subtitle {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--ag-text-soft);
}

.ag-cancel-list {
    margin-top: 1.4rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.4rem;
}


/* Cada participación en el listado */
.ag-cancel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;

    padding: 0.65rem 0.9rem;
    margin-bottom: 0.55rem;

    border-radius: 12px;
    background: radial-gradient(circle at 0 0,
        rgba(15, 23, 42, 0.9),
        rgba(15, 23, 42, 0.98)
    );
    box-shadow: 0 0 12px rgba(15, 23, 42, 0.7);

    font-size: 0.88rem;
}

.ag-cancel-main {
    display: flex;
    flex-direction: column;
}

.ag-cancel-label {
    font-weight: 500;
    color: #e5e7eb;
}

.ag-cancel-time {
    font-size: 0.78rem;
    color: var(--ag-text-soft);
}

.ag-cancel-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.85);
    color: #fecaca;
}

.ag-cancel-item--disabled {
    opacity: 0.55;
}

.ag-cancel-item--disabled .ag-btn-danger {
    pointer-events: none;
    opacity: 0.6;
    box-shadow: none;
}

.ag-cancel-countdown {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--ag-text-soft);
}

/* Footer del modal: botones alineados */
.ag-modal-footer {
    margin-top: 1.4rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.ag-modal-footer .ag-btn-ghost,
.ag-modal-footer .ag-btn-danger {
    flex: 1;
}



/* ===== Modal cancelar participación (overlay y tarjeta) ===== */

/* Cuando haya un modal abierto, el body no scrollea */
body.ag-modal-open {
    overflow: hidden;
}


.ag-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex; 
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top,
        rgba(15, 23, 42, 0.92),
        rgba(3, 7, 18, 0.98)
    );
    z-index: 1200;
    overflow-y: auto;     /* si el contenido del modal es alto, scrollea él */
}

.ag-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 1.8rem 1.6rem 1.4rem;
    background: radial-gradient(circle at 0 0,
        rgba(15, 23, 42, 0.98),
        rgba(15, 23, 42, 1)
    );
    box-shadow: 0 0 32px rgba(15, 23, 42, 0.9);
}

.ag-modal-dialog-large {
    max-width: 520px;
}

.ag-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    border: none;
    background: transparent;
    color: var(--ag-text-soft);
    font-size: 1.2rem;
    cursor: pointer;
}


.ag-sorteo-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ag-sorteo-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 6px rgba(0,255,180,.4));
}

.ag-nav-link-special {
    color: #ffd700 !important;
    font-weight: bold;
}
.ag-nav-link-special:hover {
    color: #fff1a6 !important;
}


/* ===== Wallet layout ===== */

.ag-wallet-form {
    margin-bottom: 25px;
}

.ag-wallet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
    gap: 24px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .ag-wallet-grid {
        grid-template-columns: 1fr;
    }
}

/* Resumen de usuario */

.ag-wallet-summary {
    background: radial-gradient(circle at top left, rgba(0, 255, 150, 0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(0, 180, 255, 0.18), transparent 55%);
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(255,255,255,0.06);
}

.ag-wallet-summary-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.ag-wallet-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #26d8ff, #00ff9d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    color: #001421;
    box-shadow: 0 0 18px rgba(0,255,180,0.4);
}

.ag-wallet-username {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.ag-wallet-email {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
}

/* Badge de rol */

.ag-wallet-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ag-badge-admin {
    background: rgba(255, 215, 0, 0.16);
    color: #ffe88a;
    border: 1px solid rgba(255,215,0,0.5);
}

.ag-badge-user {
    background: rgba(0, 200, 255, 0.16);
    color: #a9ecff;
    border: 1px solid rgba(0,200,255,0.5);
}

/* Tarjeta de saldo */

.ag-wallet-balance-card {
    background: rgba(0,0,0,0.55);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.ag-wallet-balance-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    margin-bottom: 4px;
}

.ag-wallet-balance-value {
    font-size: 22px;
    font-weight: 700;
    color: #7dffb4;
}

.ag-wallet-balance-value span {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 4px;
}

.ag-wallet-balance-note {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.8;
}

/* Badges inferiores */

.ag-wallet-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ag-wallet-badge {
    flex: 1 1 120px;
    background: rgba(0,0,0,0.55);
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.06);
}

.ag-wallet-badge-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
}

.ag-wallet-badge-value {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    font-weight: 600;
}

/* Historial */

.ag-wallet-history {
    background: rgba(0,0,0,0.55);
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.06);
}

.ag-wallet-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ag-wallet-history-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}

.ag-wallet-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.ag-wallet-filter select {
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 13px;
}

.ag-wallet-history-table-wrapper {
    margin-top: 8px;
    max-height: 360px;
    position: relative;
    overflow-x: auto;
    overflow-y: visible;   /* 👈 importante: que el menú pueda salir hacia arriba/abajo */
}

/* Scrollbar igual que Sorteos activos */
.ag-wallet-history-table-wrapper,
.ag-wallet-history-global-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 153, 0.45) transparent;
}

.ag-wallet-history-table-wrapper::-webkit-scrollbar,
.ag-wallet-history-global-wrapper::-webkit-scrollbar {
    width: 6px;
}

.ag-wallet-history-table-wrapper::-webkit-scrollbar-track,
.ag-wallet-history-global-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.ag-wallet-history-table-wrapper::-webkit-scrollbar-thumb,
.ag-wallet-history-global-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom,
    rgba(0, 255, 153, 0.4),
    rgba(0, 255, 204, 0.8));
    border-radius: 999px;
}

@media (max-width: 900px) {
    .ag-wallet-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ag-wallet-right {
        margin-top: 8px;
    }
}

.ag-wallet-history-empty {
    font-size: 13px;
    opacity: 0.8;
}

/* Tabla específica de wallet */

.ag-wallet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ag-wallet-table th,
.ag-wallet-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ag-wallet-table th {
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

/* Píldoras de tipo de movimiento */

.ag-wallet-pill {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: lowercase;
}

.ag-wallet-pill-ajuste_admin {
    background: rgba(0, 186, 255, 0.18);
    color: #9ee8ff;
}

.ag-wallet-pill-donacion {
    background: rgba(0, 255, 150, 0.18);
    color: #a9ffd3;
}

.ag-wallet-pill-participacion_sorteo {
    background: rgba(255, 193, 7, 0.18);
    color: #ffe6a3;
}

.ag-wallet-pill-premio {
    background: rgba(186, 104, 255, 0.18);
    color: #e0c2ff;
}

.ag-wallet-pill-otro {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

/* Valores positivos / negativos */

.ag-wallet-pos {
    color: #7dffb4;
    font-weight: 600;
}

.ag-wallet-neg {
    color: #ff8b8b;
    font-weight: 600;
}

/* =========================
   WALLET: buscador global
   ========================= */
.ag-wallet-global-search {
    margin: 12px 0 8px 0;
}

.ag-wallet-global-search .ag-input,
.ag-wallet-search-input {
    width: 100%;
    max-width: 260px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 13px;
    outline: none;
}

.ag-wallet-global-search .ag-input::placeholder,
.ag-wallet-search-input::placeholder {
    color: rgba(148, 163, 184, 0.8);
}

/* Input de descripción bloqueado cuando se usa "tipo rápido" */
.ag-form-field input[readonly] {
    opacity: 0.8;
    cursor: not-allowed;
}

/* =========================================================
   MODAL WALLET - DETALLE MOVIMIENTO (#ag-ajuste-modal)
   Compacto, centrado y SIN duplicados
   ========================================================= */

#ag-ajuste-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;              /* JS lo cambia a flex */
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

#ag-ajuste-modal .ag-modal-window.ag-modal-wallet {
    background: radial-gradient(circle at top, #0f172a, #020617);
    border-radius: 18px;
    padding: 20px 22px;
    width: min(420px, 90vw);
    max-height: 80vh;
    box-shadow: 0 24px 60px rgba(0,0,0,0.8);
    border: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Header del modal de detalle */
#ag-ajuste-modal .ag-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

#ag-ajuste-modal .ag-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #f9fafb;
}

#ag-ajuste-modal .ag-modal-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: color .15s ease, transform .15s ease;
}

#ag-ajuste-modal .ag-modal-close:hover {
    color: #e5e7eb;
    transform: scale(1.05);
}

/* Contenido del detalle */
#ag-ajuste-modal .ag-ajuste-detalle {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: radial-gradient(circle at top left, rgba(15, 118, 110, 0.24), rgba(15, 23, 42, 0.85));
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

#ag-ajuste-modal .ag-ajuste-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

#ag-ajuste-modal .ag-ajuste-label {
    color: #9ca3af;
    font-weight: 500;
    min-width: 110px;
}

#ag-ajuste-modal .ag-ajuste-value {
    color: #e5e7eb;
    text-align: right;
    word-break: break-word;
}

/* por si el JS inyecta líneas simples */
#ag-ajuste-modal .ag-detalle-line {
    margin: 6px 0;
    font-size: 14px;
    color: #e5e7eb;
}

/* Footer */
#ag-ajuste-modal .ag-modal-footer,
#ag-ajuste-modal .ag-modal-footer-wallet {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

#ag-ajuste-modal .ag-modal-footer .ag-btn-secondary,
#ag-ajuste-modal .ag-modal-footer-wallet .ag-btn-secondary {
    min-width: 110px;
    justify-content: center;
}

/* Responsive: filas en columna en pantallas chicas */
@media (max-width: 480px) {
    #ag-ajuste-modal .ag-modal-window.ag-modal-wallet {
        padding: 18px 16px;
        width: min(360px, 94vw);
    }

    #ag-ajuste-modal .ag-ajuste-row {
        flex-direction: column;
        align-items: flex-start;
    }

    #ag-ajuste-modal .ag-ajuste-value {
        text-align: left;
    }
}

.ag-btn-secondary {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s ease;
}

.ag-btn-secondary:hover {
    background: rgba(0,200,255,0.20);
    border-color: rgba(0,200,255,0.35);
    box-shadow: 0 0 10px rgba(0,200,255,0.25);
}

/* area de seleccion de tipo */

.ag-wallet-tipo-wrapper {
    margin-top: 8px;
}

.ag-wallet-tipo-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
    opacity: 0.85;
}


/* ===== SELECT moderno para ArgentGame ===== */

.ag-select,
.ag-input[type="select"],
#tipo_movimiento {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background: #0f1620;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 12px;
    height: 42px;
    color: #e8e8e8;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    font-size: 0.95rem;

    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover */
#tipo_movimiento:hover {
    border-color: rgba(0,255,220,0.45);
    box-shadow: 0 0 8px rgba(0,255,220,0.25);
}

/* Focus */
#tipo_movimiento:focus {
    border-color: rgba(0,255,220,0.85);
    outline: none;
    box-shadow: 0 0 12px rgba(0,255,220,0.35);
}

/* Opciones del dropdown */
#tipo_movimiento option {
    background: #0f1620;
    color: #e8e8e8;
    padding: 8px;
}


/* ===== BOTÓN PRIMARIO ===== */

.ag-btn-primary {
    background: linear-gradient(to bottom right, #04d9ff, #14ffa0);
    color: #0a0f14;
    padding: 12px 28px;
    border-radius: 24px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-block;

    transition: transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 16px rgba(0,255,180,0.25);
}

/* Hover */
.ag-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(0,255,180,0.45);
}

/* Click */
.ag-btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 0 10px rgba(0,255,180,0.25);
}


/* ============================================
   Botón "Ver" del historial – estilo ArgentGame
   ============================================ */

.ag-wallet-btn-view {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;

    background: rgba(255,255,255,0.05);
    color: #cfefff;
    text-decoration: none;

    border: 1px solid rgba(0,255,230,0.25);

    transition: all 0.22s ease;
    cursor: pointer;

    box-shadow: 0 0 0 rgba(0,255,255,0);
}

/* Hover */
.ag-wallet-btn-view:hover {
    background: rgba(0,255,220,0.12);
    border-color: rgba(0,255,220,0.55);
    color: #ffffff;

    box-shadow: 0 0 12px rgba(0,255,220,0.35);
    transform: translateY(-1px);
}

/* Active (click) */
.ag-wallet-btn-view:active {
    transform: scale(0.95);
    box-shadow: 0 0 6px rgba(0,255,220,0.25);
}


/* Toolbar buscador + botones */
.ag-wallet-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ag-wallet-toolbar-actions {
    display: flex;
    gap: 8px;
}

.ag-wallet-btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: #e5f8ff;
    cursor: pointer;
    transition: 0.2s ease;
}

.ag-wallet-btn-small:hover {
    border-color: rgba(0,255,220,0.55);
    background: rgba(0,255,220,0.10);
}

.ag-wallet-btn-danger {
    border-color: rgba(255,80,120,0.6);
    color: #ffd6e0;
}

.ag-wallet-btn-danger:hover {
    background: rgba(255,80,120,0.18);
}

/* Botón ⋮ y menú contextual por fila */
.ag-wallet-actions-cell {
    text-align: right;
}

.ag-wallet-actions-wrapper {
    position: relative;
    display: inline-block;
}

.ag-wallet-btn-menu {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: #e5f8ff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: 0.2s ease;
}

.ag-wallet-btn-menu:hover {
    border-color: rgba(0,255,220,0.55);
    background: rgba(0,255,220,0.10);
}

#ag-global-menu-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999999; /* máximo */
}

.ag-wallet-row-menu {
    position: absolute;
    min-width: 140px;
    background: rgba(10,16,26,0.96);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 24px rgba(0,0,0,0.55);
    padding: 4px;
    display: none;
    pointer-events: all;
}

.ag-wallet-row-menu.is-open {
    display: block;
}

.ag-wallet-menu-item {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: #e8f6ff;
    font-size: 0.85rem;
    text-align: left;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.ag-wallet-menu-item:hover {
    background: rgba(0,255,220,0.12);
}

.ag-wallet-menu-danger {
    color: #ff9db5;
}

.ag-wallet-menu-danger:hover {
    background: rgba(255,80,120,0.18);
}


.ag-wallet-pill-devolucion_sorteo {
    background: rgba(255, 120, 120, 0.15);
    color: #ff8080;
}

.ag-win-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
}
.ag-win-overlay.is-visible {
    display: flex;
}
.ag-win-modal {
    position: relative;
    max-width: 420px;
    width: 90%;
    background:
        radial-gradient(circle at top, rgba(0,255,150,0.18), transparent 55%),
        #0c1020;
    border-radius: 18px;
    padding: 26px 28px 22px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.6);
    text-align: center;
}
.ag-win-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.ag-win-text {
    font-size: 1rem;
    margin-bottom: 10px;
}
.ag-win-sub {
    font-size: 0.9rem;
    opacity: 0.8;
}
.ag-win-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: #fff;
    cursor: pointer;
}

.ag-last-seconds-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
}
.ag-last-seconds-overlay.is-visible {
    display: flex;
}
.ag-last-seconds-box {
    position: relative;
    max-width: 420px;
    width: 90%;
    background:
        radial-gradient(circle at top, rgba(0,255,150,0.18), transparent 55%),
        #080c16;
    border-radius: 18px;
    padding: 26px 26px 22px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.6);
    text-align: center;
}
.ag-last-seconds-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.ag-last-seconds-text {
    font-size: 0.95rem;
    margin-bottom: 10px;
}
.ag-last-seconds-sorteo {
    font-size: 0.95rem;
    font-weight: 600;
}
.ag-last-seconds-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

/* === Celebración ganador (confetti) === */
.ag-fireworks {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 99999; /* por encima de casi todo */
}

.ag-fireworks-piece {
    position: absolute;
    width: 6px;
    height: 16px;
    border-radius: 999px;
    opacity: 0;
    animation-name: agConfettiFall;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

/* Animación: suben un poquito y caen girando, como chispas / confetti */
@keyframes agConfettiFall {
    0% {
        transform: translate3d(0, -40vh, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translate3d(0, 20vh, 0) rotate(360deg);
    }
    100% {
        transform: translate3d(0, 110vh, 0) rotate(720deg);
        opacity: 0;
    }
}

.ag-last-winners {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
}

.ag-last-winner-loading {
    opacity: 0.7;
}

.ag-last-winner-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ag-last-winner-user {
    font-weight: 600;
}

.ag-last-winner-sorteo {
    opacity: 0.85;
}

.ag-last-winner-meta {
    opacity: 0.7;
    font-size: 0.75rem;
}



/* ========== GANADORES ========== */

.ag-panel-wide {
    max-width: 1200px;
    margin: 32px auto;
}

/* Filtros (Hoy / Esta semana / etc.) */
.ag-ganadores-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: radial-gradient(circle at top left,
                rgba(0,255,163,0.08),
                rgba(0,0,0,0.95));
    color: #e5e7eb;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease,
                box-shadow 0.15s ease, border-color 0.15s ease;
}

.ag-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(0,255,190,0.7);
    box-shadow: 0 0 14px rgba(0,255,190,0.2);
}

.ag-pill-active {
    border-color: rgba(0,255,190,0.9);
    background: linear-gradient(135deg,#00ffa3,#00d4ff);
    color: #020617;
    box-shadow: 0 0 18px rgba(0,255,190,0.5);
}

/* =========================================
   HISTORIAL DE GANADORES - ARGENTGAME
   ========================================= */

/* Layout columnas: ranking + lista */
.ag-ganadores-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: 2rem;
    margin-top: 1.25rem;
}

/* ===== Columnas principales (ranking / lista) ===== */
.ag-ganadores-col {
    padding: 1.2rem 1.4rem;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

/* ===== Glass style sutil (paneles principales) ===== */
.ag-glass-panel {
    /* fondo semi-transparente */
    background: rgba(8, 12, 20, 0.20);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;

    /* glow suave, sin exagerar */
    box-shadow:
        0 0 22px rgba(0, 255, 200, 0.06),
        inset 0 0 10px rgba(0, 255, 200, 0.04),
        0 20px 35px rgba(0,0,0,0.55);

    position: relative;
    overflow: hidden;
}

/* capa de luz muy sutil encima del fondo del panel */
.ag-glass-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(0,255,200,0.08),
        rgba(0,180,255,0.05),
        transparent 60%
    );
    opacity: 0.55;
    animation: ag-panel-glow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* contenido por encima de la capa de luz */
.ag-glass-panel > * {
    position: relative;
    z-index: 2;
}

/* hover suave (ya no tan agresivo) */
.ag-ganadores-col:hover {
    box-shadow:
        0 0 32px rgba(0,255,200,0.25),
        inset 0 0 18px rgba(0,255,200,0.15),
        0 26px 65px rgba(0,0,0,0.9);
    transform: translateY(-2px);
    transition: 0.25s ease;
}

@keyframes ag-panel-glow {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 0.9;  }
}

/* ===== Títulos dentro de cada columna ===== */
.ag-ganadores-col .ag-subtitle-small {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

/* ===== Ranking de ganadores ===== */
.ag-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ag-ranking-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.1rem;
    border-bottom: 1px dashed rgba(148,163,184,0.25);
    font-size: 0.9rem;
}

.ag-ranking-list li:last-child {
    border-bottom: none;
}

.ag-ranking-user {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ag-ranking-count {
    font-weight: 600;
    color: #e5e7eb;
}

/* Destacar top 3 */
.ag-ranking-list li:nth-child(1) .ag-ranking-user::before { content: "🥇"; }
.ag-ranking-list li:nth-child(2) .ag-ranking-user::before { content: "🥈"; }
.ag-ranking-list li:nth-child(3) .ag-ranking-user::before { content: "🥉"; }

/* ===== Lista cronológica de ganadores ===== */
.ag-ganadores-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.4rem;
}

/* Tarjeta de ganador con glass sutil */
.ag-ganador-card {
    background: rgba(10, 18, 30, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 14px;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: 0 14px 32px rgba(15,23,42,0.85);
    font-size: 0.9rem;
}

.ag-ganador-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.ag-ganador-user {
    font-weight: 600;
    color: #f9fafb;
}

.ag-ganador-sorteo {
    font-size: 0.8rem;
    color: #9ca3af;
}

.ag-ganador-puesto {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.4));
}

.ag-ganador-extra {
    font-size: 0.8rem;
    color: #e5e7eb;
    margin-bottom: 0.2rem;
}

.ag-ganador-fecha {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Scroll estilizado dentro de ganadores */
.ag-ganadores-list::-webkit-scrollbar {
    width: 6px;
}
.ag-ganadores-list::-webkit-scrollbar-track {
    background: transparent;
}
.ag-ganadores-list::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.5);
    border-radius: 999px;
}

/* Responsive */
@media (max-width: 900px) {
    .ag-ganadores-layout {
        grid-template-columns: 1fr;
    }

    .ag-ganadores-col {
        padding: 1rem;
    }

    .ag-ganadores-list {
        max-height: 400px;
    }
}

/* ================================
   CENTRAR MODULO GANADORES
   ================================ */
.ag-main-single {
    display: flex;
    justify-content: center;
    padding-top: 30px;
}

.ag-panel-wide {
    width: 100%;
    max-width: 960px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
/* ======================
   TOASTS PREMIUM ARGENTGAME
   ====================== */

.ag-toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ag-toast {
    padding: 12px 18px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    background: rgba(8, 18, 28, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0,255,200,0.15);
    box-shadow: 0 0 15px rgba(0,255,200,0.15);
    opacity: 1;
    transform: translateY(0);
    transition: all .3s ease-out;
}

.ag-toast-success {
    border-left: 4px solid #00ffbf;
}

.ag-toast-error {
    border-left: 4px solid #ff4e4e;
}

.ag-toast-hide {
    opacity: 0;
    transform: translateY(20px);
}


/* Animación premium para el saldo */
.ag-saldo-anim {
    color: #00ffbf !important;
    text-shadow: 0 0 12px #00ffbf;
    font-weight: 900;
    transform: scale(1.15);
    transition: all 0.35s ease-in-out;
}

/* Botón en estado loading: estilo gamer + spinner neón */
.ag-btn-loading {
    position: relative;
    padding-left: 32px;              /* espacio para el spinner */
    pointer-events: none;
    opacity: 0.95;
    background: linear-gradient(135deg, #00ffa3, #00e0ff);
    box-shadow:
        0 0 10px rgba(0, 255, 163, 0.7),
        0 0 20px rgba(0, 224, 255, 0.4);
}

/* Spinner circular neón dentro del botón */
.ag-btn-loading::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #00ffa3;
    border-right-color: #00e0ff;
    animation: ag-spin 0.7s linear infinite;
}

/* Animación de giro */
@keyframes ag-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal de confirmación genérico */
.ag-modal-card-confirm {
    max-width: 420px;
}

#ag-confirm-modal.ag-hidden {
    display: none !important;
}

#ag-confirm-modal {
    display: flex !important;
}

.ag-section-hidden {
    display: none;
}



.ag-mis-boletos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
}

.ag-mis-sorteo-card {
    background: rgba(10, 15, 35, 0.95);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.04);
    font-size: 0.78rem;
}

.ag-mis-sorteo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.ag-mis-sorteo-titulo {
    font-weight: 600;
    font-size: 0.82rem;
}

.ag-mis-sorteo-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    opacity: 0.8;
}

.ag-mis-sorteo-numeros {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.ag-mis-numero {
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: rgba(0,255,163,0.07);
    border: 1px solid rgba(0,255,163,0.35);
    font-size: 0.72rem;
}

.ag-mis-numero-inactivo {
    opacity: 0.5;
    border-style: dashed;
}

.ag-mis-sin-numeros {
    opacity: 0.7;
    font-style: italic;
}

/* Tags por estado (podés adaptarlo a tus colores actuales) */
.ag-tag {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
}

.ag-tag-activo {
    background: rgba(0,255,163,0.12);
    color: #a7ffd9;
}

.ag-tag-cerrado {
    background: rgba(255,255,255,0.08);
    color: #f5f5f5;
}

.ag-tag-cancelado {
    background: rgba(255,99,132,0.12);
    color: #ff9ba8;
}

.ag-alert {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ag-alert.ag-alert-hide {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}


.ag-online-box {
    background: #0a0f1b;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.ag-online-title {
    font-size: 14px;
    opacity: .8;
    margin-bottom: 8px;
}

#ag-online-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ag-online-user {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.ag-online-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #00ffa3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #050711;
    font-weight: 700;
    overflow: hidden;
}

.ag-online-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ag-online-name {
    font-size: 14px;
}

/* =========================
   NOTIFICACIONES - CAMPANITA
   ========================= */

.ag-noti-wrapper {
    position: relative;
    margin-left: 12px;
}

.ag-noti-bell {
    position: relative;
    border: none;
    background: rgba(15, 30, 60, 0.9);
    color: #f5f5ff;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.ag-noti-bell:hover {
    background: rgba(25, 50, 90, 1);
    box-shadow: 0 0 8px rgba(0, 255, 163, 0.25);
    transform: translateY(-1px);
}

.ag-noti-icon {
    font-size: 16px;
}

.ag-noti-count {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ff4b81;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.ag-noti-dropdown {
    position: absolute;
    right: 0;
    top: 120%;
    width: 280px;
    background: radial-gradient(circle at top left, rgba(0,255,163,0.14), transparent 55%),
                rgba(8, 16, 32, 0.98);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 0 8px;
    z-index: 999;
    backdrop-filter: blur(12px);
}

.ag-noti-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 14px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
    color: #e8ecff;
}

.ag-noti-mark-all {
    border: none;
    background: transparent;
    color: #00ffa3;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
}

.ag-noti-mark-all:hover {
    text-decoration: underline;
}

.ag-noti-empty {
    padding: 10px 14px;
    font-size: 12px;
    color: #9aa3c2;
}

.ag-noti-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.ag-noti-item {
    padding: 8px 14px;
    font-size: 12px;
    color: #e4e8ff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ag-noti-item:hover {
    background: rgba(255,255,255,0.03);
}

.ag-noti-title {
    font-weight: 600;
    font-size: 12px;
}

.ag-noti-msg {
    font-size: 11px;
    color: #b1bbd9;
}

.ag-noti-time {
    margin-top: 2px;
    font-size: 10px;
    color: #7f88a3;
}

/* util */
.ag-hidden {
    display: none !important;
}


.ag-alias-dropdown {
    position: absolute;
    background: #0b0f19;
    border-radius: 8px;
    padding: 6px 0;
    box-shadow: 0 18px 45px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 9999;
    min-width: 220px;
    max-height: 260px;
    overflow-y: auto;
}

.ag-alias-item {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.ag-alias-item:hover,
.ag-alias-item--active {
    background: rgba(0,255,163,0.10);
}

.ag-chat-mention {
    color: #00ffa3;
    font-weight: 600;
}


.ag-chat-message-mention-me .ag-chat-bubble {
    border: 1px solid rgba(0,255,163,0.65);
    box-shadow: 0 0 18px rgba(0,255,163,0.25);
    position: relative;
}

.ag-chat-message-mention-me .ag-chat-bubble::before {
    content: "Mención para vos";
    position: absolute;
    top: -14px;
    left: 12px;
    font-size: 10px;
    letter-spacing: 0.03em;
    padding: 1px 6px;
    border-radius: 999px;
    background: #00ffa3;
    color: #050711;
}

.ag-alias-dropdown {
    position: absolute;
    z-index: 9999;
    background: #060712;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.6);
    padding: 4px;
    max-height: 260px;
    overflow-y: auto;
    font-size: 13px;
}

.ag-alias-dropdown.ag-hidden {
    display: none;
}

.ag-alias-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    gap: 8px;
}

.ag-alias-item:hover,
.ag-alias-item.is-active {
    background: rgba(0,255,163,0.12);
}

.ag-alias-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ag-alias-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ag-alias-inicial {
    font-weight: 700;
    color: #00ffa3;
}

.ag-alias-info {
    display: flex;
    flex-direction: column;
}

.ag-alias-main {
    font-weight: 600;
    color: #f7f7ff;
}

.ag-alias-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

/* Menciones dentro del mensaje */
.ag-chat-mention {
    color: #00ffa3;
    font-weight: 600;
}

/* ===== EMOJI PICKER DEL INPUT (ABAJO DEL CHAT) ===== */



.ag-emoji-picker {
    position: absolute;
    z-index: 99999;
    margin-top: 8px;
}

.ag-chat-emoji-popup {
    position: absolute;
    right: 80px; /* ajustá según tu layout */
    bottom: 48px;
    background: #111827;
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    box-shadow: 0 10px 25px rgba(0,0,0,.6);
    z-index: 20;
}

.ag-chat-emoji-popup.ag-hidden {
    display: none;
}

.ag-chat-emoji-item {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    padding: 4px;
    border-radius: 999px;
    transition: transform 0.15s ease;
}

/* ❌ Sin fondo, sin glow, sin border — SOLO agrandar */
.ag-chat-emoji-item:hover {
    transform: scale(1.25);
}

.ag-chat-emoji-item:active {
    transform: scale(0.95);
}

/* Botón del selector de emojis (input) */
#ag-chat-emoji-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 6px;
    border-radius: 50%;
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ag-chat-emoji-btn:hover {
    transform: scale(1.25);
}

#ag-chat-emoji-btn:active {
    transform: scale(0.9);
}


/* ===== CABECERA DEL MENSAJE ===== */

.ag-chat-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* Texto "Nombre · hora" */
.ag-chat-name-text {
    display: inline-block;
}

.ag-chat-name-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Botón chiquito al lado de la hora (en caso de usarlo) */
.ag-msg-react-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 999px;
    font-size: 16px;
    opacity: 0.7;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.ag-msg-react-toggle:hover {
    transform: scale(1.2) translateY(-1px);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    opacity: 1;
}

.ag-msg-react-toggle:active {
    transform: scale(0.9);
    box-shadow: none;
}


/* ===== MENÚ ⚙️ EDITAR / ELIMINAR ===== */

.ag-chat-menu-wrapper {
    position: relative;
}

.ag-chat-menu-toggle {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    transition: background 0.15s ease, transform 0.1s ease;
}

.ag-chat-menu-toggle:hover {
    background: rgba(0, 255, 163, 0.25);
    transform: translateY(-1px);
}

.ag-chat-menu {
    position: absolute;
    top: 115%;
    right: 0;
    min-width: 130px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(5, 7, 17, 0.95);
    box-shadow: 0 16px 40px rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    z-index: 30;
}

.ag-chat-menu-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: #e8f5ff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.ag-chat-menu-item:hover {
    background: rgba(0, 255, 163, 0.13);
}

/* Reutilizamos .ag-hidden para ocultar */
.ag-hidden {
    display: none !important;
}


/* ===== FOOTER "REACCIONAR / RESPONDER" ===== */

.ag-chat-footer {
    margin-top: 6px;
    font-size: 12px;
    display: flex;
    gap: 10px;
}

.ag-chat-link {
    border: none;
    background: transparent;
    color: #7fdcff;
    cursor: pointer;
    padding: 0;
}

.ag-chat-link:hover {
    text-decoration: underline;
}

.ag-chat-footer-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 11px;
}

.ag-chat-footer-left {
    display: flex;
    gap: 10px;
}

.ag-chat-footer-right {
    display: flex;
    gap: 8px;
}

.ag-chat-footer-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: #7be9ff;
    cursor: pointer;
}

.ag-chat-footer-btn:hover {
    text-decoration: underline;
}


/* ===== REACCIONES DEBAJO DEL MENSAJE (DENTRO DE LA BURBUJA) ===== */

.ag-chat-bubble {
    position: relative; /* para anclar el popup dentro de la burbuja */
}

/* Contenedor general de reacciones de un mensaje */
.ag-msg-reactions {
    margin-top: 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Cuando el mensaje tiene reacciones, damos un respiro extra */
.ag-msg-react-has-reactions {
    margin-top: 6px;
}

/* Lista de chips (👍 2, ❤️ 1, +3 ...) */
.ag-msg-react-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Chip de reacción tipo Discord: emoji + número */
.ag-msg-react-chip {
    border: none;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition:
        transform 0.1s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

/* Tu reacción resaltada */
.ag-msg-react-chip.is-mine {
    background: rgba(34,197,94,0.12);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.6);
}

.ag-msg-react-chip:hover {
    transform: translateY(-1px);
    background-color: rgba(15,23,42,1);
}

/* Chip “+X” / “···” */
.ag-msg-react-more {
    background: rgba(59,130,246,0.18);
}

/* ===== POPUP DE EMOJIS PARA REACCIONAR ===== */

.ag-msg-react-actions {
    position: absolute;
    bottom: calc(100% + 8px); /* aparece ARRIBA de las chips / botón */
    left: 0;                  /* alineado con el botón "Reaccionar" */
    z-index: 30;

    display: flex;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 999px;

    /* fondo semi-transparente + efecto glass */
    background: rgba(5, 10, 25, 0.9);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);

    /* efecto de aparición */
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px) scale(0.94);
    transform-origin: bottom left;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* cuando se abre (clase que ya manejas desde JS) */
.ag-msg-reactions.ag-msg-reactions-open .ag-msg-react-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Botones individuales de emoji para reaccionar */
.ag-msg-react-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 999px;
    transition: transform 0.12s ease, background 0.12s ease;
}

.ag-msg-react-btn:hover {
    transform: translateY(-1px) scale(1.12);
    background: rgba(255, 255, 255, 0.06);
}

.ag-msg-react-btn:active {
    transform: scale(0.9);
}


/* ===== MODAL DE DETALLE DE REACCIONES ===== */

.ag-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.ag-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.ag-modal-box {
    position: relative;
    background: #020617;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    max-width: 520px;
    width: 100%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Modal reacciones */
.ag-react-modal-box {
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.ag-react-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ag-react-title {
    font-weight: 600;
    font-size: 16px;
}

.ag-react-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

.ag-react-close:hover {
    background-color: rgba(148,163,184,0.15);
}

/* Tabs de emojis */
.ag-react-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ag-react-tab {
    padding: 4px 10px;
    border-radius: 999px;
    background: #020617;
    border: 1px solid rgba(148,163,184,0.35);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #e5e7eb;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.ag-react-tab span {
    font-weight: 500;
}

.ag-react-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(56,189,248,0.7);
}

.ag-react-tab.is-active {
    background: radial-gradient(circle at top, #22c55e, #0f172a);
    border-color: rgba(16,185,129,0.9);
}

/* Lista de usuarios del modal */
.ag-react-list {
    flex: 1;
    overflow-y: auto;
    padding-top: 4px;
}

.ag-react-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 2px;
    border-bottom: 1px solid rgba(15,23,42,0.9);
}

.ag-react-row:last-child {
    border-bottom: none;
}

.ag-react-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ag-react-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at top, #22c55e, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 600;
    color: #e5e7eb;
    font-size: 15px;
}

.ag-react-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ag-react-user-info {
    display: flex;
    flex-direction: column;
}

.ag-react-user-name {
    font-size: 14px;
}

.ag-react-you {
    font-size: 11px;
    color: #22c55e;
    margin-left: 4px;
}

.ag-react-date {
    font-size: 11px;
    color: #9ca3af;
}

.ag-react-emoji {
    font-size: 18px;
}

/* Mensajes de estado dentro del modal */
.ag-react-loading,
.ag-react-empty {
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}


/* ===== Modal de reacciones ===== */

#ag-react-modal.ag-hidden {
    display: none;
}

#ag-react-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#ag-react-modal-box {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 60%),
                #020617;
    border-radius: 18px;
    padding: 18px 20px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(148, 163, 184, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
    animation: ag-react-modal-in 160ms ease-out;
}

@keyframes ag-react-modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Tabs de emojis */

#ag-react-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.ag-react-tab {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
    white-space: nowrap;
}

.ag-react-tab span {
    font-size: 11px;
    opacity: 0.9;
}

.ag-react-tab.is-active {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.7);
    transform: translateY(-1px);
}

/* Lista de usuarios */

#ag-react-list {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scroll fino dentro del modal */
#ag-react-list::-webkit-scrollbar {
    width: 6px;
}
#ag-react-list::-webkit-scrollbar-track {
    background: transparent;
}
#ag-react-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
}

/* Estados vacíos / cargando */

.ag-react-empty,
.ag-react-loading {
    text-align: center;
    font-size: 13px;
    padding: 16px 8px;
    color: #9ca3af;
}

/* Item de reacción (usuario) */

.ag-react-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border-radius: 8px;
    transition: background 0.12s ease;
}

.ag-react-item:hover {
    background: rgba(15, 23, 42, 0.8);
}

.ag-react-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #111827, #0b1120);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #e5e7eb;
    flex-shrink: 0;
    overflow: hidden;
}

.ag-react-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ag-react-item-main {
    flex: 1;
    min-width: 0;
}

.ag-react-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.ag-react-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-react-item-time {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
}

.ag-react-item-emoji {
    font-size: 15px;
    margin-right: 6px;
}

/* El usuario actual resaltado */
.ag-react-item.mine .ag-react-item-name {
    color: #4ade80;
}

/* Botón cerrar (si tenés uno, ej. X) */

.ag-react-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    border-radius: 999px;
    transition: background 0.12s ease, color 0.12s ease;
}

.ag-react-close:hover {
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
}

/* Botones de reacción ocupados (si más adelante querés usarlo visualmente) */

.ag-msg-react-chip.is-busy {
    opacity: 0.6;
    pointer-events: none;
}


/* Fondo oscuro que cubre toda la página */
.ag-chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

/* Oculto por defecto */
.ag-hidden {
    display: none !important;
}

/* Caja grande centrada */
.ag-chat-expanded {
    width: 90%;
    max-width: 900px;
    height: 85vh;
    background: rgba(10, 15, 25, 0.95);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,255,150,0.25);
    box-shadow: 0 0 25px rgba(0,255,150,0.35);
}

/* Header */
.ag-chat-expanded-header {
    padding: 14px 18px;
    font-size: 18px;
    color: #00ffb0;
    border-bottom: 1px solid rgba(0,255,150,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Botón cerrar */
.ag-chat-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* Contenedor donde va el chat clonado */
.ag-chat-expanded-content {
    flex: 1;
    overflow: hidden;
    padding: 10px;
}







.ag-chat-expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,255,150,0.15);
    border: 1px solid rgba(0,255,150,0.35);
    border-radius: 6px;
    padding: 6px 9px;
    cursor: pointer;
    color: #00ffb0;
    transition: 0.25s;
}

.ag-chat-expand-btn:hover {
    background: rgba(0,255,150,0.3);
}

/* La sección del chat será el contenedor de referencia */
.ag-chat-section {
    position: relative;
}

/* Botón de expandir chat en la esquina superior derecha del panel */
.ag-chat-expand-btn {
    position: absolute;
    top: 6px;          /* podés jugar con estos valores */
    right: 10px;
    background: rgba(0,255,150,0.15);
    border: 1px solid rgba(0,255,150,0.35);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    color: #00ffb0;
    font-size: 14px;
    z-index: 2;
    transition: 0.25s;
}

.ag-chat-expand-btn:hover {
    background: rgba(0,255,150,0.3);
}


/* ============================== */
/* SCROLLBAR UNIFICADO ARGENTGAME */
/* ============================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 255, 150, 0.08);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 150, 0.45);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 150, 0.65);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,150,0.45) rgba(0,255,150,0.08);
}


.ag-chat-expanded-content::-webkit-scrollbar {
    width: 8px;
}

.ag-chat-expanded-content::-webkit-scrollbar-thumb {
    background: rgba(0,255,150,0.45);
    border-radius: 10px;
}

.ag-chat-expanded-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,150,0.45) rgba(0,255,150,0.08);
}


/* ==========================
   SPLASH SCREEN ARGENTGAME
   ========================== */

/* Contenedor general del splash: tapa toda la pantalla */
.ag-splash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(0, 10, 20, 1),   /* 100% opaco */
        rgba(0, 10, 20, 1)    /* 100% opaco */
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    z-index: 999999;

    /* se mantiene visible ~1.8s y luego se desvanece */
    animation: agSplashFadeOut 0.6s ease forwards;
    animation-delay: 1.8s;
}

@keyframes agSplashFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* LOGO centrado arriba, con pulso suave */
.ag-splash-logo {
    width: 130px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 8px rgba(0,255,150,0.6));
    animation: ag-logo-pulse 2.2s infinite ease-in-out;
}

@keyframes ag-logo-pulse {
    0% {
        filter: drop-shadow(0 0 4px rgba(0,255,150,0.4));
        transform: translateY(-4px);
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(0,255,150,0.9));
        transform: translateY(4px);
    }
    100% {
        filter: drop-shadow(0 0 4px rgba(0,255,150,0.4));
        transform: translateY(-4px);
    }
}

/* Texto "Cargando ArgentGame..." */
.ag-splash-subtitle {
    color: #cfefff;
    font-size: 1.1rem;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Puntitos animados debajo del texto */
.ag-splash-dots {
    display: flex;
    gap: 6px;
}

.ag-splash-dots span {
    width: 8px;
    height: 8px;
    background: #00ff99;
    border-radius: 50%;
    animation: ag-dot 1.4s infinite ease-in-out;
}

.ag-splash-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ag-splash-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ag-dot {
    0%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}
/* ==========================================
   OVERLAY
========================================== */
.ag-about-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
}

.ag-hidden {
    display: none !important;
}

/* ==========================================
   CARD PRINCIPAL
========================================== */
.ag-about-card {
    width: 90%;
    max-width: 820px;
    background: linear-gradient(180deg, #08121f, #040b13 80%);
    border-radius: 20px;
    padding: 28px;
    position: relative;
    box-shadow: 0 0 20px rgba(0,255,180,0.20);
    animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ag-about-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #ccc;
    cursor: pointer;
}

/* ==========================================
   TITULO
========================================== */
.ag-about-title {
    font-size: 1.4rem;
    color: #cfe8ff;
    margin-bottom: 18px;
}

/* ==========================================
   HEADER con logo
========================================== */
.ag-about-header {
    display: flex;
    gap: 25px;
    align-items: center;
    padding: 22px;
    border-radius: 15px;
    background: rgba(255,255,255,0.03);
}

.ag-about-logo {
    width: 120px;
    height: auto;
    border-radius: 50%;
    animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 4px #00f7c8); }
    50% { filter: drop-shadow(0 0 14px #00ffaa); }
    100% { filter: drop-shadow(0 0 4px #00f7c8); }
}

.ag-about-info h3 {
    font-size: 1.8rem;
    margin: 0 0 6px;
}

.ag-about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ag-about-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    font-size: 0.85rem;
}

/* ==========================================
   Texto descriptivo
========================================== */
.ag-about-desc {
    margin-top: 18px;
    color: #cdd4e0;
    line-height: 1.6;
}

/* ==========================================
   BOTONES
========================================== */
.ag-about-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ag-about-btn-main {
    padding: 10px 18px;
    background: #00e3aa;
    color: #00221a;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
}

.ag-about-btn-outline {
    padding: 10px 18px;
    border: 2px solid #00e3aa;
    border-radius: 12px;
    color: #00e3aa;
    text-decoration: none;
}

.ag-about-btn-support {
    padding: 10px 18px;
    background: #0066ff;
    border-radius: 12px;
    color: white;
    text-decoration: none;
}

/* ==========================================
   FOOTER
========================================== */
.ag-about-footer {
    margin-top: 25px;
    font-size: 0.85rem;
    color: #9ab3c9;
    text-align: center;
}
/* Botón "Acerca de" en navbar */
.ag-nav-about-btn {
    border-radius: 999px;
    padding: 6px 18px;
    margin-left: 8px;

    background: transparent;
    border: 1px solid rgba(0, 255, 153, 0.75);
    color: #a7ffea;
    font-weight: 600;
    font-size: 0.9rem;

    box-shadow: 0 0 0 1px rgba(0, 255, 153, 0.15);
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease,
        color 0.25s ease;
}

/* Iconito opcional dentro del botón (si querés agregar uno después) */
.ag-nav-about-btn span {
    display: inline-flex;
}

/* Hover bonito */
.ag-nav-about-btn:hover {
    background: radial-gradient(circle at top,
        rgba(0, 255, 153, 0.22),
        rgba(0, 20, 40, 0.95)
    );
    color: #e6fff9;
    box-shadow: 0 0 14px rgba(0, 255, 153, 0.65);
    transform: translateY(-1px);
}
/* Tabs dentro del modal Acerca de */
.ag-about-tabs {
    display: flex;
    gap: 8px;
    margin: 10px 0 16px;
}

.ag-about-tab {
    border: none;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.8);
    color: #9ca3af;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ag-about-tab:hover {
    border-color: rgba(56, 189, 248, 0.5);
    color: #e5e7eb;
}

.ag-about-tab.is-active {
    background: linear-gradient(90deg, #22c55e, #22d3ee);
    color: #020617;
    border-color: transparent;
}

/* Vistas conmutables */
.ag-about-view {
    display: none;
}

.ag-about-view.is-active {
    display: block;
}

/* Changelog / Lo nuevo */
.ag-about-changelog {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ag-about-changelog li {
    background: radial-gradient(circle at 0 0,
        rgba(15, 23, 42, 0.95),
        rgba(15, 23, 42, 1)
    );
    border-radius: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.ag-about-changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.ag-about-changelog h4 {
    font-size: 0.95rem;
    margin: 2px 0 4px;
    color: #e5e7eb;
}

.ag-about-changelog p {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Pills de estado */
.ag-about-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
}

.ag-about-pill-live {
    border-color: rgba(34, 197, 94, 0.9);
    color: #bbf7d0;
}

.ag-about-pill-soon {
    border-color: rgba(250, 204, 21, 0.9);
    color: #fef9c3;
}

.ag-about-pill-future {
    border-color: rgba(59, 130, 246, 0.9);
    color: #bfdbfe;
}

/* ===== HUB ADMIN ARGENTGAME (cards de secciones) ===== */

.ag-admin-hub {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 22px;
}

.ag-admin-hub-card {
    flex: 1 1 240px;
    min-width: 220px;
    border-radius: 18px;
    padding: 14px 16px;
    background: radial-gradient(circle at top left,
        rgba(15, 23, 42, 0.95),
        rgba(3, 7, 18, 0.98)
    );
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 0 18px rgba(15, 23, 42, 0.9);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: #e5e7eb;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ag-admin-hub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 26px rgba(34, 197, 94, 0.45);
    border-color: rgba(34, 197, 94, 0.7);
}

.ag-admin-hub-card.is-active {
    border-color: rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 26px rgba(34, 197, 94, 0.55);
}

.ag-admin-hub-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: radial-gradient(circle at center,
        rgba(34, 197, 94, 0.16),
        rgba(15, 23, 42, 1)
    );
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    margin-bottom: 2px;
}

.ag-admin-hub-title {
    font-weight: 600;
    font-size: 1.02rem;
}

.ag-admin-hub-text {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Paneles interiores de cada sección */
.ag-admin-panel-group {
    margin-top: 4px;
}

.ag-admin-panel-group:not(.is-active) {
    display: none;
}

/* Opcional: tabla simple para novedades */
.ag-table-small th,
.ag-table-small td {
    font-size: 0.82rem;
    padding: 0.35rem 0.55rem;
}

/* Tarjeta simple para formularios en admin */
.ag-form-card {
    background: radial-gradient(circle at top left,
        rgba(15, 23, 42, 0.96),
        rgba(15, 23, 42, 1)
    );
    border-radius: 18px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 0 20px rgba(15, 23, 42, 0.85);
}

.ag-admin-two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 20px;
}

@media (max-width: 960px) {
    .ag-admin-two-columns {
        grid-template-columns: 1fr;
    }
}
/* La tarjeta completa no pasa de la altura de pantalla */
.ag-about-card {
    max-height: 90vh;      /* se ajusta a la pantalla */
    display: flex;
    flex-direction: column;
}

/* Contenido central (párrafo + pestañas + vistas) ocupa el espacio flexible */
.ag-about-view {
    flex: 1 1 auto;
}

/* Lista de novedades: scroll interno cuando hay muchas */
.ag-about-changelog {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;

    max-height: 55vh;      /* altura máxima visible de la lista */
    overflow-y: auto;      /* aparece scroll vertical */
    padding-right: 0.6rem; /* espacio para que no tape el scrollbar */
}

/* Bloquear scroll cuando hay un modal grande abierto */
body.ag-modal-open {
    overflow: hidden;
}

/* Opcional: por si tu layout scrollea en html también */
html.ag-modal-open {
    overflow: hidden;
}

/* ===========================
   PANEL AMISTADES
   =========================== */

.ag-panel-friends {
    margin-top: 18px;
    padding: 14px 16px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        radial-gradient(circle at top left, rgba(0, 255, 150, 0.14), transparent 55%),
        radial-gradient(circle at bottom right, rgba(0, 180, 255, 0.10), transparent 55%);
    background-color: rgba(3, 8, 20, 0.95);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.ag-panel-friends .ag-panel-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: none;
}

/* Buscador */

.ag-friends-search {
    margin-bottom: 10px;
}

.ag-friends-search .ag-input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.35);
    color: #f5f5f5;
    font-size: 13px;
}

/* Bloques internos (Resultados / Mis amigos) */

.ag-friends-section {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.ag-friends-subtitle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: 0.7;
    margin-bottom: 4px;
}

/* Listas (scroll interno) */

.ag-friends-list {
    max-height: 160px;
    overflow-y: auto;
    padding: 6px 8px;
    background: radial-gradient(circle at top left,
                rgba(0, 255, 150, 0.12),
                transparent 55%);
    background-color: rgba(5, 10, 20, 0.75);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    font-size: 13px;
}

/* Mensajes vacíos */

.ag-friends-list {
    font-size: 12px;
    opacity: 0.7;
}

/* Ítems de amigo */

.ag-friend-item,
.ag-friend-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
}

.ag-friend-avatar img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.ag-friend-info {
    display: flex;
    flex-direction: column;
}

.ag-friend-name {
    font-size: 13px;
    font-weight: 500;
}

.ag-friend-handle {
    font-size: 11px;
    opacity: 0.7;
}

/* Botón para enviar solicitud desde buscador */

.ag-friend-send-btn {
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    background: rgba(0, 255, 170, 0.14);
    color: #e8fff8;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

.ag-friend-send-btn:hover {
    background: rgba(0, 255, 170, 0.28);
    transform: translateY(-1px);
}

/* Botón 🤝 que pusimos en conectados / chat */

.ag-friend-toggle {
    border: none;
    background: transparent;
    color: #9fffe0;
    cursor: pointer;
    font-size: 15px;
    padding: 0 4px;
    opacity: 0.8;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.ag-friend-toggle:hover {
    opacity: 1;
    transform: scale(1.05);
}

.ag-friend-actions {
    margin-left: auto;
    font-size: 11px;
}

.ag-friend-status {
    font-size: 11px;
    opacity: 0.8;
}

/* ===========================
   Notificaciones: amistad
   =========================== */

.ag-noti-item {
    padding-bottom: 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.ag-noti-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ag-noti-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
}

.ag-noti-amigo-btn {
    border: none;
    outline: none;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    color: #e8ffff;
    transition: background 0.15s ease, transform 0.1s ease;
}

.ag-noti-amigo-btn-aceptar {
    background: linear-gradient(135deg, #00d08a, #00b3ff);
}

.ag-noti-amigo-btn-rechazar {
    background: rgba(255, 80, 120, 0.18);
}

.ag-noti-amigo-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
}

.ag-noti-amigo-btn-aceptar:hover {
    background: linear-gradient(135deg, #00f3a1, #23c8ff);
}

.ag-noti-amigo-btn-rechazar:hover {
    background: rgba(255, 80, 120, 0.28);
}

.ag-friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 10px;
}

.ag-friend-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ag-friend-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.ag-friend-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 6px;
}

.ag-friend-context-menu {
    position: absolute;
    right: 8px;
    top: 100%;
    margin-top: 4px;
    background: rgba(8, 25, 40, 0.98);
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    min-width: 150px;
    z-index: 40;
}

.ag-friend-item {
    position: relative; /* para posicionar el menú dentro */
}

.ag-friend-context-menu button {
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}

.ag-friend-context-menu button:hover {
    background: rgba(0,255,170,0.07);
}

.ag-friend-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 3px 5px;
}

.ag-friend-toggle-pending {
    /* estilo opcional para el botón cuando está "Cancelar solicitud" */
    opacity: 0.8;
}

/* Layout principal del item de amigo */
.ag-friend-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Botón "Cancelar solicitud" en el buscador de amistades */
.ag-friend-cancel-btn {
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 129, 0.7);
    background: transparent;
    color: #ff6b81;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.ag-friend-cancel-btn:hover {
    background: rgba(255, 107, 129, 0.14);
    border-color: #ff6b81;
    transform: translateY(-1px);
}

/* Botón ⚙️ junto al nombre del amigo */
.ag-friend-options-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(9, 20, 40, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8c4ff;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.ag-friend-options-btn:hover {
    background: rgba(0, 255, 150, 0.18);
    border-color: rgba(0, 255, 150, 0.7);
    transform: translateY(-1px);
}
/* Menú contextual de amigos (⚙️) */
.ag-friend-menu {
    position: absolute;
    z-index: 9999;
    min-width: 190px;
    background: rgba(5, 12, 28, 0.98);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    padding: 6px 0;
}

.ag-friend-menu-item {
    width: 100%;
    display: block;
    padding: 8px 14px;
    text-align: left;
    border: 0;
    background: transparent;
    color: #f5f7ff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ag-friend-menu-item[data-action="eliminar"] {
    color: #ff6b81;
}

.ag-friend-menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
}





/* Contenedor interno con scroll (usuarios + amistades + salas + saldo + mis números) */
.ag-column-right-scroll {
    margin-top: 0.75rem;   /* similar a la columna de sorteos */
    flex: 1;
    min-height: 0;         
    max-height: 60vh;      /* 🔹 límite de altura: aquí empieza a scrollear */
    overflow-y: auto;
    padding-right: 4px;
}

/* Scroll visual igual al de sorteos/chat */
.ag-column-right-scroll::-webkit-scrollbar {
    width: 6px;
}
.ag-column-right-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.ag-column-right-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 153, 0.45);
    border-radius: 999px;
}

.ag-avatar-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ag-avatar-modal.ag-hidden {
    display: none;
}

.ag-avatar-modal-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.ag-avatar-modal-inner img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 18px;
    box-shadow: 0 0 40px rgba(0,0,0,0.7);
}

.ag-avatar-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.ag-avatar-close:hover {
    background: rgba(0,0,0,0.9);
}
/* =========================== */
/*   PANEL SALAS – LOBBY       */
/* =========================== */

.ag-panel .ag-salas-search {
    margin-bottom: 12px;
}

.ag-panel .ag-salas-search input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.ag-salas-info {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    line-height: 1.3;
}

.ag-salas-info strong {
    color: #fff;
}

.ag-sala-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.04);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ag-sala-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(0,255,150,0.25);
}

.ag-sala-card-general {
    background: rgba(0,255,150,0.12);
    border: 1px solid rgba(0,255,150,0.3);
    margin-bottom: 18px;
}

.ag-sala-card-general:hover {
    background: rgba(0,255,150,0.18);
    border-color: rgba(0,255,150,0.45);
}

.ag-sala-main {
    display: flex;
    flex-direction: column;
}

.ag-sala-nombre {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
}

.ag-sala-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.ag-sala-actions {
    display: flex;
    align-items: center;
}

.ag-salas-divider {
    border: none;
    height: 1px;
    margin: 12px 0 18px;
    background: rgba(255,255,255,0.08);
}

/* Ajuste de botones dentro de salas */
.ag-sala-card .ag-btn-primary.ag-btn-small {
    padding: 6px 12px !important;
    font-size: 12px !important;
}
.ag-sala-card-active {
    box-shadow: 0 0 18px rgba(0, 255, 150, 0.4);
}

.ag-sala-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(0, 255, 150, 0.18);
    color: #00ffb0;
    border: 1px solid rgba(0, 255, 150, 0.4);
}
/* La lista de salas dentro del panel del lobby */
.ag-salas-list {
    max-height: 170px;    /* aprox. 2 cards + un poco de margen */
    overflow-y: auto;
    padding-right: 4px;
}

/* Scroll fino dentro del panel de salas */
.ag-salas-list::-webkit-scrollbar {
    width: 4px;
}
.ag-salas-list::-webkit-scrollbar-thumb {
    background: rgba(0,255,150,0.4);
    border-radius: 999px;
}
.ag-salas-list::-webkit-scrollbar-track {
    background: transparent;
}
/* Lista de salas en el perfil (Mis salas) */
.pf-salas-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.pf-salas-list::-webkit-scrollbar {
    width: 4px;
}
.pf-salas-list::-webkit-scrollbar-thumb {
    background: rgba(0,255,150,0.4);
    border-radius: 999px;
}
.pf-salas-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ===== Tarjeta de sala ===== */

.ag-room-card {
    position: relative;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: radial-gradient(circle at top left, rgba(0,255,150,0.08), transparent 55%),
                radial-gradient(circle at bottom right, rgba(0,180,255,0.06), transparent 55%),
                rgba(4, 12, 24, 0.98);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: default;
}

.ag-room-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.55);
    border-color: rgba(0, 255, 170, 0.35);
}

/* Estados / rarezas */

.ag-room-card--public {
    --room-accent: #00ffc3;
}

.ag-room-card--private {
    --room-accent: #ffb347;
}

.ag-room-card--vip {
    --room-accent: #ffdf5a;
    box-shadow: 0 0 25px rgba(255, 223, 90, 0.35);
    border-image: linear-gradient(120deg, #ffe774, #ff9f5a, #7dfdff) 1;
}

/* Header de la sala dentro de la tarjeta */

.ag-room-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ag-room-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.ag-room-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
}

.ag-room-chip-icon {
    font-size: 12px;
}

.ag-room-chip-label {
    color: var(--room-accent, #00ffc3);
}

/* Contador de usuarios */

.ag-room-users {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    opacity: 0.9;
}

.ag-room-users-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--room-accent, #00ffc3);
    animation: ag-pulse-dot 1.8s infinite ease-out;
}

@keyframes ag-pulse-dot {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.6); opacity: 0.4; }
    100% { transform: scale(1);   opacity: 1; }
}

/* Cuerpo de la tarjeta */

.ag-room-card-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.ag-room-main {
    flex: 1 1 auto;
}

.ag-room-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.ag-room-subtitle {
    font-size: 11px;
    opacity: 0.75;
}

/* Mini avatar grid */

.ag-room-avatars {
    display: grid;
    grid-template-columns: repeat(2, 16px);
    grid-auto-rows: 16px;
    gap: 3px;
    align-content: flex-start;
    justify-items: center;
}

.ag-room-avatar {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}

/* Animación cuando se crea una sala nueva */

.ag-room-card--new {
    animation: ag-room-pop-in 0.5s ease-out forwards;
    transform-origin: center;
}

@keyframes ag-room-pop-in {
    0%   { transform: scale(0.8) translateY(8px); opacity: 0; }
    60%  { transform: scale(1.03) translateY(0); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}




.pf-rep-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.pf-rep-label {
    font-size: 0.95rem;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pf-rep-tier {
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.06);
}

.pf-rep-tier-negativa {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
}

.pf-rep-tier-baja {
    color: #ffb347;
    background: rgba(255, 179, 71, 0.12);
}

.pf-rep-tier-normal {
    color: #4cd964;
    background: rgba(76, 217, 100, 0.12);
}

.pf-rep-tier-alta {
    color: #74b9ff;
    background: rgba(116, 185, 255, 0.12);
}

.pf-rep-bar {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.pf-rep-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.4s ease;
    background: linear-gradient(90deg, #00b894, #0984e3);
    box-shadow: 0 0 8px rgba(0, 184, 148, 0.6);
}

/* Opcional: colores distintos por tier */
.pf-rep-bar-fill.pf-rep-tier-negativa {
    background: linear-gradient(90deg, #d63031, #e17055);
    box-shadow: 0 0 8px rgba(214, 48, 49, 0.6);
}

.pf-rep-bar-fill.pf-rep-tier-baja {
    background: linear-gradient(90deg, #fdcb6e, #e17055);
    box-shadow: 0 0 8px rgba(253, 203, 110, 0.6);
}

.pf-rep-bar-fill.pf-rep-tier-normal {
    background: linear-gradient(90deg, #00b894, #00cec9);
    box-shadow: 0 0 8px rgba(0, 184, 148, 0.6);
}

.pf-rep-bar-fill.pf-rep-tier-alta {
    background: linear-gradient(90deg, #0984e3, #6c5ce7);
    box-shadow: 0 0 10px rgba(9, 132, 227, 0.6);
}

.pf-rep-help {
    font-size: 0.78rem;
    color: #aaa;
}


.ag-chat-warning {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Por tipo de sala */
.ag-chat-warning--general {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.6);
}

.ag-chat-warning--public {
    background: rgba(0, 150, 255, 0.1);
    border: 1px solid rgba(0, 150, 255, 0.6);
}

.ag-chat-warning--private {
    background: rgba(0, 200, 120, 0.1);
    border: 1px solid rgba(0, 200, 120, 0.6);
}

.ag-chat-warning--room {
    background: rgba(200, 200, 200, 0.1);
    border: 1px solid rgba(200, 200, 200, 0.5);
}

/* Por nivel (más oscuro / serio según sube) */
.ag-chat-warning--lvl0 {
    color: #e5e5e5;
}

.ag-chat-warning--lvl1 {
    color: #ffd35a;
    font-weight: 500;
}

.ag-chat-warning--lvl2 {
    color: #ff9c4a;
    font-weight: 600;
}

.ag-chat-warning--lvl3 {
    color: #ff6868;
    font-weight: 700;
}

/* Contenedor superior (warning + contador + cooldown) */
.ag-chat-meta {
    display: flex;
    flex-direction: column;   /* WARNING arriba, contador / cooldown abajo */
    gap: 4px;
    align-items: stretch;
}

/* Barrita de warning */
.ag-chat-warning {
    display: none;             /* por defecto oculta, JS la muestra */
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 100%;
    box-sizing: border-box;
}

/* Versiones según tipo de sala */
.ag-chat-warning--general {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.6);
}

.ag-chat-warning--public {
    background: rgba(0, 160, 255, 0.10);
    border: 1px solid rgba(0, 160, 255, 0.6);
}

.ag-chat-warning--private {
    background: rgba(0, 200, 120, 0.10);
    border: 1px solid rgba(0, 200, 120, 0.6);
}

.ag-chat-warning--room {
    background: rgba(200, 200, 200, 0.08);
    border: 1px solid rgba(200, 200, 200, 0.5);
}

/* Intensidad por nivel (0 = suave, 3 = fuerte) */
.ag-chat-warning--lvl0 {
    color: #e5e5e5;
    font-weight: 400;
}

.ag-chat-warning--lvl1 {
    color: #ffd35a;
    font-weight: 500;
}

.ag-chat-warning--lvl2 {
    color: #ffb15a;
    font-weight: 600;
}

.ag-chat-warning--lvl3 {
    color: #ff7777;
    font-weight: 700;
}

/* Overlay general */
.ag-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none; /* JS lo muestra */
    align-items: center;
    justify-content: center;
    pointer-events: none; /* el backdrop/card lo reactivan */
}

/* Fondo oscurecido */
.ag-alert-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0,255,200,0.08), transparent),
                rgba(0,0,0,0.70);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

/* Tarjeta central */
.ag-alert-card {
    position: relative;
    max-width: 420px;
    width: 90%;
    background: radial-gradient(circle at top left, rgba(0,255,200,0.12), rgba(8,12,24,0.98));
    border-radius: 18px;
    border: 1px solid rgba(0,255,200,0.35);
    box-shadow: 0 18px 45px rgba(0,0,0,0.7);
    padding: 18px 20px 16px;
    color: #f4f4f4;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;

    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

/* Estado visible (lo agrega JS) */
.ag-alert-overlay--visible .ag-alert-card {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Icono */
.ag-alert-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

/* Título */
.ag-alert-title {
    font-size: 15px;
    font-weight: 600;
}

/* Texto */
.ag-alert-message {
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
}

/* Botón */
.ag-alert-btn {
    margin-top: 8px;
    align-self: flex-end;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(90deg, #00ffcc, #00c6ff);
    color: #020612;
    box-shadow: 0 0 12px rgba(0,255,200,0.45);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.ag-alert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(0,255,200,0.7);
}

/* Variantes por nivel (color de borde / icono) */
.ag-alert-card--lvl1 {
    border-color: rgba(255, 215, 0, 0.6);
}
.ag-alert-card--lvl2 {
    border-color: rgba(255, 160, 0, 0.7);
}
.ag-alert-card--lvl3 {
    border-color: rgba(255, 80, 80, 0.8);
}

.ag-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 320px;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease;
    transform: translateY(-20px);
    z-index: 99999;
}

/* Visible */
.ag-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tipos */
.ag-toast--lvl0 { border-left: 4px solid #5ab6ff; }
.ag-toast--lvl1 { border-left: 4px solid #ffd35a; }
.ag-toast--lvl2 { border-left: 4px solid #ff9c4a; }
.ag-toast--lvl3 { border-left: 4px solid #ff6868; }
.ag-toast--lvl4 { border-left: 4px solid #ff2a2a; }

/* Kill-switch: desactivar para siempre la burbuja de advertencias vieja */
.ag-chat-warning {
    display: none !important;
}

.ag-alert-countdown {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}


/* ===== Header del chat según tipo de sala actual ===== */




.ag-chat-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 8px;
    background: linear-gradient(120deg, rgba(0,0,0,0.75), rgba(10,30,40,0.9));
    border: 1px solid rgba(255,255,255,0.08);
}

.ag-chat-room-header--public {
    box-shadow: 0 0 18px rgba(0, 255, 195, 0.25);
    border-color: rgba(0, 255, 195, 0.5);
}

.ag-chat-room-header--private {
    box-shadow: 0 0 18px rgba(255, 179, 71, 0.25);
    border-color: rgba(255, 179, 71, 0.5);
}

.ag-chat-room-header--vip {
    box-shadow: 0 0 28px rgba(255, 223, 90, 0.45);
    border-image: linear-gradient(120deg, #ffe774, #ff9f5a, #7dfdff) 1;
}

.ag-chat-room-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ag-chat-room-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ag-chat-room-name {
    font-weight: 600;
    font-size: 15px;
}

.ag-chat-room-pill {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255,255,255,0.1);
}

.ag-chat-room-welcome {
    font-size: 11px;
    opacity: 0.8;
}


.ag-chat-penalty{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  margin:10px 0;
  border-radius:12px;
  border:1px solid rgba(255, 179, 71, .35);
  background: rgba(255, 179, 71, .10);
  color: #ffd9a6;
  font-size: 13px;
}

.ag-chat-penalty-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: rgba(255, 179, 71, .9);
  box-shadow: 0 0 12px rgba(255, 179, 71, .65);
}

.ag-hidden{ display:none !important; }

/* ===========================
   WELCOME (GLOBAL / TOP LAYER)
=========================== */
.ag-sala-welcome{
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 24px));
  display: none;
  justify-content: center;
  z-index: 99999;
  pointer-events: none;
}

.ag-sala-welcome-inner{
  pointer-events: auto;
  width: 100%;
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  /* ✅ sin “recuadro largo” */
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;

  padding: 10px 42px; /* espacio para la X */
}

/* Texto centrado */
.ag-sala-welcome-text{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.2;

  color: #eafffb;
  text-align: center;

  /* permite que envuelva en pantallas chicas */
  white-space: normal;
  word-break: break-word;
}

/* cada letra */
.ag-sala-welcome-char{
  display: inline-block;
  line-height: 1.2;
  will-change: transform, opacity, filter;
}

/* ✅ X en esquina (como tu círculo rojo) */
.ag-sala-welcome-close{
  position: absolute;
  top: 2px;
  right: 6px;

  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.25);
  color: #fff;
  cursor: pointer;

  display: grid;
  place-items: center;
}
.ag-sala-welcome-close:hover{
  background: rgba(255,255,255,0.12);
}

/* Glow por variante, pero usando el color del usuario */
.ag-sala-welcome--general .ag-sala-welcome-text{
  text-shadow: 0 0 16px rgba(var(--ag-glow), .55), 0 0 36px rgba(var(--ag-glow), .22);
}
.ag-sala-welcome--public .ag-sala-welcome-text{
  text-shadow: 0 0 16px rgba(var(--ag-glow), .45), 0 0 36px rgba(var(--ag-glow), .18);
}
.ag-sala-welcome--private .ag-sala-welcome-text{
  text-shadow: 0 0 16px rgba(var(--ag-glow), .35), 0 0 36px rgba(var(--ag-glow), .12);
}

@media (max-width: 520px){
  .ag-sala-welcome{ top: 66px; }
  .ag-sala-welcome-text{ font-size: 16px; }
}


/* ============================
   Botón ciclo día / noche
============================ */

.ag-nav-icon.ag-cycle-btn{
  margin-left: 10px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 18px;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition:
    background .25s ease,
    box-shadow .25s ease,
    transform .15s ease;
}

.ag-nav-icon.ag-cycle-btn:hover{
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

/* Glow según estado del ciclo */
html[data-cycle="day"]  .ag-cycle-btn{ box-shadow: 0 0 16px rgba(255,220,120,.35); }
html[data-cycle="dawn"] .ag-cycle-btn{ box-shadow: 0 0 18px rgba(255,170,120,.45); }
html[data-cycle="dusk"] .ag-cycle-btn{ box-shadow: 0 0 18px rgba(200,140,255,.45); }
html[data-cycle="night"].ag-cycle-btn,
html[data-cycle="night"] .ag-cycle-btn{ box-shadow: 0 0 18px rgba(0,255,200,.35); }

