/* ==========================================================================
   AGI-ONE Games — Portal Account & OIDC Auth Dropdown Styles
   Glassmorphism dark theme, avatar badges, Google button, mobile responsive.
   ========================================================================== */

.gx-user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.gx-user-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.gx-user-toggle:hover,
.gx-user-toggle[aria-expanded="true"] {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.gx-user-toggle.is-authenticated {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.gx-user-nav-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gx-user-nav-initial {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    font-family: 'Outfit', 'Inter', sans-serif;
}

/* Dropdown Menu */
.gx-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: rgba(13, 15, 29, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(59, 130, 246, 0.12);
    z-index: 9999;
    padding: 16px;
    color: #f1f5f9;
    font-family: 'Inter', sans-serif;
    animation: gxDropDownFade 0.2s ease-out;
}

@keyframes gxDropDownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gx-auth-dropdown__header {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.gx-auth-title {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 4px;
    font-family: 'Unbounded', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.gx-auth-subtitle {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

.gx-auth-dropdown__header--profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gx-auth-avatar-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gx-auth-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gx-auth-avatar-initial {
    font-size: 18px;
    font-weight: 800;
    color: #60a5fa;
    font-family: 'Outfit', sans-serif;
}

.gx-auth-info {
    overflow: hidden;
}

.gx-auth-name {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gx-auth-email {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.gx-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gx-auth-dropdown__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gx-auth-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    color: #1f2937;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gx-auth-btn-google:hover {
    background: #f1f5f9;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.gx-auth-btn-credentials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gx-auth-btn-credentials:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.gx-auth-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.gx-auth-menu-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.gx-auth-menu-item i {
    width: 16px;
    text-align: center;
    color: #94a3b8;
}

.gx-auth-menu-item:hover i {
    color: #60a5fa;
}

.gx-auth-ext {
    margin-left: auto;
    font-size: 10px;
    color: #64748b;
}

.gx-auth-dropdown__footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

.gx-auth-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
}

.gx-auth-link:hover {
    text-decoration: underline;
}

.gx-auth-btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gx-auth-btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   Modale Preferenze & Update Giochi (Formato e stile coordinato 80x80)
   ========================================================================== */
.news-sub-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(4, 5, 12, 0.85);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.news-sub-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.news-sub-dialog {
    position: relative;
    width: 80vw;
    height: 80vh;
    max-width: 1100px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2.25rem 2.5rem 2rem;
    border-radius: 24px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    background: linear-gradient(165deg, #121324 0%, #080914 100%);
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
}
.news-sub-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.news-sub-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-sub-close:hover,
.news-sub-close:focus-visible {
    background: rgba(167, 139, 250, 0.25);
    color: #f8fafc;
    outline: none;
}
.news-sub-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(167, 139, 250, 0.3);
}
.news-sub-title {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
}
.news-sub-intro {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #94a3b8;
}
.news-sub-status {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    color: #fbbf24;
}
.news-sub-status--verified {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    font-weight: 600;
}
.news-sub-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.news-sub-channels-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 0.5rem;
}
.news-sub-channels-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.news-sub-channels-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}
.news-sub-channels-hint {
    font-size: 0.8rem;
    color: #94a3b8;
}
.news-sub-channels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}
.news-sub-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.92rem;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}
.news-sub-chip:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(167, 139, 250, 0.45);
    color: #fff;
    transform: translateY(-1px);
}
.news-sub-chip--all {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(167, 139, 250, 0.45);
    color: #f8fafc;
    font-weight: 700;
    padding: 0.95rem 1.15rem;
}
.news-sub-chip--all:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0.15) 100%);
    border-color: rgba(167, 139, 250, 0.7);
}
.news-sub-chip input[type='checkbox'] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #8b5cf6;
    cursor: pointer;
    border-radius: 4px;
}
.news-sub-consent-box {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.news-sub-consent-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #cbd5e1;
    cursor: pointer;
    margin: 0;
}
.news-sub-consent-label input[type='checkbox'] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #8b5cf6;
    cursor: pointer;
    flex-shrink: 0;
}
.news-sub-actions {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.news-sub-submit {
    min-width: 220px;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 12px 32px -8px rgba(139, 92, 246, 0.65);
    transition: all 0.2s ease;
}
.news-sub-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 16px 36px -8px rgba(139, 92, 246, 0.8);
}
.news-sub-submit:disabled,
.news-sub-submit.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}
.news-sub-disclaimer {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #64748b;
    max-width: 520px;
}
.news-sub-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(18, 19, 36, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    color: #f8fafc;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.news-sub-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.news-sub-toast strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #a78bfa;
}
.news-sub-toast p {
    margin: 0.15rem 0 0;
    font-size: 0.84rem;
    color: #cbd5e1;
}
.news-sub-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
}
@media (max-width: 860px) {
    .news-sub-dialog {
        width: 94vw;
        height: 90vh;
        max-height: 90vh;
        padding: 1.5rem 1.25rem;
    }
}

