/*
 * nn-overrides.css — Visual enhancement layer
 * G1: border-radius  G2: skeleton  G3: notification badge
 * H1: hall stats     H2: room progress bar  H3: message input
 * I1: rail tooltip   I2: create button  I3: menu icons  I4: guest banner
 * R1: cover empty state  R2: speaking ring
 */

/* ============================================================
   G1 · Border-radius unification
   ============================================================ */

/* Discover / index page */
.nn-topbar__game-search,
.nn-topbar__game-search input {
    border-radius: 10px !important;
}
.nn-discover-main__search input {
    border-radius: 10px !important;
}

/* Hall / room page — topbar search */
.nn-room-topbar__search,
.nn-room-topbar__search input {
    border-radius: 10px !important;
}

/* Sidebar cover */
.nn-room-sidebar__cover {
    border-radius: 14px !important;
    overflow: hidden;
}

/* Sidebar action buttons */
.nn-room-sidebar__action {
    border-radius: 8px !important;
}

/* Workspace header buttons */
.nn-room-workspace__button {
    border-radius: 8px !important;
}

/* Chat bubble */
.nn-room-feed__bubble {
    border-radius: 10px !important;
}

/* Members banner & panel */
.nn-room-members__banner {
    border-radius: 10px !important;
}
.nn-room-members__panel {
    border-radius: 12px !important;
}

/* Community cards */
.nn-community-card {
    border-radius: 12px !important;
}

/* ============================================================
   G2 · Skeleton loading cards
   ============================================================ */

@keyframes sk-shimmer {
    0%   { background-position: -800px 0; }
    100% { background-position:  800px 0; }
}

.skeleton-card {
    border-radius: 12px;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 1600px 100%;
    animation: sk-shimmer 1.8s infinite linear;
    min-height: 200px;
}

/* ============================================================
   G3 · Remove hardcoded notification red dot
   ============================================================ */

.nn-topbar__icon--notify::after,
.nn-room-topbar__icon--notify::after {
    display: none !important;
}

/* ============================================================
   H1 · Hall stats visual upgrade
   ============================================================ */

.nn-room-hall-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 0 !important;
}

.nn-room-hall-stat {
    background: rgba(108, 92, 231, 0.07) !important;
    border: 1px solid rgba(108, 92, 231, 0.18) !important;
    border-radius: 10px !important;
    padding: 12px 6px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 5px !important;
}

.nn-room-hall-stat strong {
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #6c5ce7 !important;
}
.nn-room-hall-stat:nth-child(1) strong { color: #6c5ce7 !important; }
.nn-room-hall-stat:nth-child(2) strong { color: #00cec9 !important; }
.nn-room-hall-stat:nth-child(3) strong { color: #fd79a8 !important; }

.nn-room-hall-stat span {
    font-size: 11px !important;
    color: #8891aa !important;
    white-space: nowrap !important;
}

/* ============================================================
   H2 · Room list member progress bar
   ============================================================ */

.nn-room-sidebar__room-item {
    flex-wrap: wrap !important;
}

.nn-room-sidebar__room-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.nn-room-sidebar__room-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #6c5ce7, #00cec9);
    transition: width 0.4s ease;
    min-width: 2px;
}

.nn-room-sidebar__room-item.is-full .nn-room-sidebar__room-bar-fill {
    background: #fd79a8;
    min-width: 100%;
}

/* ============================================================
   H3 · Message input area upgrade
   ============================================================ */

.nn-room-message-form {
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 6px 6px 6px 12px !important;
    gap: 8px !important;
    transition: border-color 0.2s !important;
}

.nn-room-message-form:focus-within {
    border-color: rgba(108, 92, 231, 0.45) !important;
}

.nn-room-message-form input {
    background: transparent !important;
    border: none !important;
    padding: 6px 4px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.nn-room-message-form input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nn-room-message-form button[type="submit"],
#hallMessageSubmit {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 6px 18px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s, transform 0.1s !important;
    white-space: nowrap !important;
}

.nn-room-message-form button[type="submit"]:hover,
#hallMessageSubmit:hover {
    opacity: 0.88 !important;
    transform: translateY(-1px) !important;
}

.nn-room-message-form button[type="submit"]:active,
#hallMessageSubmit:active {
    transform: translateY(0) !important;
}

/* ============================================================
   I1 · Game rail item tooltip on hover
   ============================================================ */

.nn-room-rail__item[aria-label] {
    position: relative;
}

.nn-room-rail__item[aria-label]::before {
    content: attr(aria-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    transform-origin: left center;
    background: #1a1f35;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e2ea;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.nn-room-rail__item[aria-label]:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* ============================================================
   I2 · Create room button — brand gradient
   ============================================================ */

.nn-discover-sidebar__create {
    background: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 18px rgba(108, 92, 231, 0.35) !important;
    transition: opacity 0.2s ease, transform 0.15s ease !important;
}

.nn-discover-sidebar__create:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
}

.nn-discover-sidebar__create:active {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* ============================================================
   I3 · Profile popover menu — section icons
   ============================================================ */

[data-profile-section] {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

[data-profile-section]::before {
    font-style: normal;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

[data-profile-section="store"]::before   { content: "🛒"; }
[data-profile-section="member"]::before  { content: "⭐"; }
[data-profile-section="tasks"]::before   { content: "✅"; }
[data-profile-section="bag"]::before     { content: "🎒"; }
[data-profile-section="profile"]::before { content: "👤"; }

/* ============================================================
   I4 · Guest welcome banner
   ============================================================ */

.nn-guest-banner[hidden] { display: none !important; }

.nn-guest-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg,
        rgba(108, 92, 231, 0.10) 0%,
        rgba(0, 206, 201, 0.07) 100%
    );
    border: 1px solid rgba(108, 92, 231, 0.22);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.nn-guest-banner__icon {
    font-size: 30px;
    flex-shrink: 0;
    line-height: 1;
}

.nn-guest-banner__body {
    flex: 1;
    min-width: 0;
}

.nn-guest-banner__body strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #e0e2ea;
    margin-bottom: 3px;
}

.nn-guest-banner__body span {
    display: block;
    font-size: 12px;
    color: #8891aa;
    line-height: 1.5;
}

.nn-guest-banner__action {
    flex-shrink: 0;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.nn-guest-banner__action:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* ============================================================
   R1 · Room cover — empty state enhancement
   ============================================================ */

/* When JS hasn't set a cover image (no .has-image class) */
.nn-room-sidebar__cover-image:not(.has-image) {
    background: linear-gradient(
        135deg,
        rgba(108, 92, 231, 0.30) 0%,
        rgba(0, 206, 201, 0.18) 100%
    ) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nn-room-sidebar__cover-image:not(.has-image)::after {
    content: "🎮";
    font-size: 38px;
    opacity: 0.55;
    pointer-events: none;
    line-height: 1;
}

/* ============================================================
   R2 · Speaking member avatar — pulse ring
   ============================================================ */

@keyframes nn-speak-ring {
    0%   { box-shadow: 0 0 0 0   rgba(29, 201, 125, 0.75); }
    70%  { box-shadow: 0 0 0 7px rgba(29, 201, 125, 0); }
    100% { box-shadow: 0 0 0 0   rgba(29, 201, 125, 0); }
}

/* Member list avatar ring */
.nn-room-member.is-speaking .nn-room-member__avatar {
    animation: nn-speak-ring 1.3s ease infinite !important;
    border: 2px solid rgba(29, 201, 125, 0.85) !important;
    border-radius: 50% !important;
}

/* Stage seat ring (already has speak-pulse but we enhance it) */
@keyframes nn-stage-ring {
    0%   { box-shadow: 0 0 0 0   rgba(29, 201, 125, 0.8), 0 2px 8px rgba(0,0,0,0.4); }
    70%  { box-shadow: 0 0 0 8px rgba(29, 201, 125, 0),   0 2px 8px rgba(0,0,0,0.4); }
    100% { box-shadow: 0 0 0 0   rgba(29, 201, 125, 0),   0 2px 8px rgba(0,0,0,0.4); }
}

.nn-stage-card.is-speaking {
    animation: nn-stage-ring 1.3s ease infinite !important;
}
