/* 🔔 Центр уведомлений (js/notify_center.js, 24.10.2026): облачка XP над панелью задач, колокольчик, окно настроек.
   Квадратные углы как во всём сайте; заголовок — Luna, тревога игры — красная; движение отключается
   при prefers-reduced-motion. */

.nc-stack {
    position: fixed;
    right: 12px;
    bottom: 40px;                      /* над панелью задач XP (30 px) */
    z-index: 1000001;
    display: flex;
    flex-direction: column-reverse;    /* новое — снизу, ближе к трею, как облачка XP */
    gap: 8px;
    width: min(360px, calc(100vw - 24px));
    pointer-events: none;
    font-family: Tahoma, Verdana, sans-serif;
}
.nc-live { position: fixed; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.nc-card {
    position: relative;
    pointer-events: auto;
    background: #ffffe1;
    border: 1px solid #0831d9;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset, 3px 6px 18px rgba(0, 20, 80, 0.35);
    color: #000;
    font-size: 11px;
    touch-action: pan-y;
    user-select: none;
    animation: nc-in 0.32s cubic-bezier(0.2, 1.3, 0.4, 1) both;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nc-card.nc-hidden { display: none; }
.nc-card.nc-out { opacity: 0; transform: translateX(40px); }
.nc-card.nc-click { cursor: pointer; }
.nc-card.nc-click:hover .nc-text { text-decoration: underline; }
.nc-card.nc-bump { animation: nc-bump 0.3s ease; }

.nc-head {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 2px 0 5px;
    background: linear-gradient(180deg, #3d95ff 0%, #0a5fe0 12%, #0848c8 55%, #0b3fae 100%);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 0 #0f1f6a;
}
.nc-ico { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; flex: none; }
.nc-ico .xpi { width: 16px; height: 16px; }
.nc-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nc-count { flex: none; padding: 0 5px; background: #e2a115; color: #000; text-shadow: none; font-size: 10px; line-height: 14px; border: 1px solid #fff4c9; }
.nc-time { flex: none; font-weight: normal; font-size: 10px; opacity: 0.85; }
.nc-x {
    flex: none;
    width: 18px; height: 18px;
    padding: 0;
    color: #fff;
    font: bold 13px/16px Tahoma, sans-serif;
    background: linear-gradient(135deg, #f4a184 0%, #e3633b 38%, #d0441b 70%, #b8360f 100%);
    border: 1px solid #fff;
    cursor: pointer;
}
.nc-x:hover { filter: brightness(1.15); }

.nc-body { padding: 8px 10px 9px; line-height: 1.45; }
.nc-text { word-wrap: break-word; overflow-wrap: anywhere; max-height: 4.4em; overflow: hidden; }
.nc-actions { display: flex; gap: 6px; margin-top: 7px; justify-content: flex-end; flex-wrap: wrap; }
.nc-btn {
    min-width: 72px;
    padding: 3px 10px;
    font: 11px Tahoma, sans-serif;
    color: #000;
    background: linear-gradient(180deg, #ffffff 0%, #ecebe6 86%, #d6d0c5 100%);
    border: 1px solid #003c74;
    cursor: pointer;
}
.nc-btn:hover { box-shadow: inset 0 0 0 2px #fbc765; }
.nc-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.nc-btn.nc-primary { font-weight: bold; box-shadow: inset 0 0 0 1px #4f8ef7; }

.nc-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #316ac5; transform-origin: left; }

/* разделы: цвет полосы и значка */
.nc-card.nc-social .nc-bar { background: #d0441b; }
.nc-card.nc-games .nc-bar { background: #2f9e31; }
.nc-card.nc-auction .nc-bar { background: #e2a115; }
.nc-card.nc-sdo_general .nc-head { background: linear-gradient(180deg, #7a8a3a 0%, #55651e 14%, #3f4c12 100%); }

/* тревога игры: «Колонию атакуют!» */
.nc-card.nc-urgent { background: #fff0e6; border-color: #9e1a08; animation: nc-in 0.32s cubic-bezier(0.2, 1.3, 0.4, 1) both, nc-alarm 1.1s ease-in-out 0.32s 3; }
.nc-card.nc-urgent .nc-head { background: linear-gradient(180deg, #ff6a4a 0%, #d8250c 14%, #b0170a 60%, #7d0f04 100%); text-shadow: 1px 1px 0 #3a0600; }
.nc-card.nc-urgent .nc-bar { background: #b0170a; height: 3px; }
.nc-card.nc-urgent .nc-text { font-size: 12px; font-weight: bold; color: #5a0d02; }

.nc-more {
    pointer-events: auto;
    align-self: flex-end;
    padding: 2px 10px;
    font: 11px Tahoma, sans-serif;
    color: #fff;
    background: rgba(8, 49, 217, 0.88);
    border: 1px solid #fff;
    cursor: pointer;
}

@keyframes nc-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes nc-bump { 50% { transform: scale(1.03); } }
@keyframes nc-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes nc-alarm { 50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset, 0 0 0 3px rgba(216, 37, 12, 0.55), 3px 6px 22px rgba(120, 10, 0, 0.5); } }

/* ---------- колокольчик ---------- */
.notifications-dropdown { width: 320px; max-height: min(70vh, 520px); overflow-y: auto; }
.nc-dd-title { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 1; }
.nc-dd-title .nc-gear { margin-left: auto; }
.nc-gear {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 18px; padding: 0;
    background: linear-gradient(180deg, #6c9cf8 0%, #2f6bea 40%, #1652d8 100%);
    border: 1px solid #fff; cursor: pointer;
}
.nc-gear .xpi { width: 14px; height: 14px; }
.nc-gear:hover { filter: brightness(1.15); }
.nc-item { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-bottom: 1px solid #ece9d8; }
.nc-item.unread { background: #eef3fd; box-shadow: inset 3px 0 0 #316ac5; }
.nc-item.nc-click { cursor: pointer; }
.nc-item.nc-click:hover { background: #316ac5; color: #fff; }
.nc-item.nc-click:hover .nc-item-time { color: #dce6fb; }
.nc-item-ico { flex: none; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; background: #fff; border: 1px solid #b9c7e6; }
.nc-item-ico .xpi { width: 16px; height: 16px; }
.nc-item-ico.nc-sdo_attack { background: #ffe3da; border-color: #d8250c; }
.nc-item-ico.nc-sdo_general { background: #eef1d8; border-color: #7a8a3a; }
.nc-item-col { flex: 1; min-width: 0; }
.nc-item-text { line-height: 1.35; overflow-wrap: anywhere; }
.nc-item-time { margin-top: 3px; font-size: 10px; color: #777; }
.nc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nc-empty .xpi { width: 32px; height: 32px; opacity: 0.5; }

/* ---------- окно «Уведомления и звуки» ---------- */
.nc-set { font: 11px Tahoma, sans-serif; color: #000; }
.nc-fs { margin: 0 0 10px; padding: 6px 10px 8px; border: 1px solid #d0d0bf; background: #fff; }
.nc-fs legend { padding: 0 4px; color: #0046d5; font-weight: bold; }
.nc-table { width: 100%; border-collapse: collapse; }
.nc-table th { text-align: left; font-weight: normal; color: #555; padding: 3px 4px; border-bottom: 1px solid #ece9d8; white-space: nowrap; }
.nc-table td { padding: 3px 4px; border-bottom: 1px solid #f3f2ea; }
.nc-table tr:hover td { background: #f3f7ff; }
.nc-table .nc-c { text-align: center; width: 64px; }
.nc-cat { display: flex; align-items: center; gap: 6px; }
.nc-play { width: 24px; height: 20px; padding: 0; font-size: 10px; background: linear-gradient(180deg, #fff, #e3e0d6); border: 1px solid #7f9db9; cursor: pointer; }
.nc-play:hover { box-shadow: inset 0 0 0 1px #fbc765; }
.nc-hint { margin-top: 6px; color: #555; line-height: 1.4; }
.nc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.nc-row select, .nc-row input[type=time] { font: 11px Tahoma, sans-serif; border: 1px solid #7f9db9; padding: 2px 3px; }
.nc-row input[type=range] { flex: 1; min-width: 120px; accent-color: #316ac5; }
.nc-vol { width: 38px; text-align: right; }
.nc-push-state span { flex: 1 1 100%; }
.nc-ps-granted { color: #2a7a1a; font-weight: bold; }
.nc-ps-denied { color: #b0170a; }

@media (max-width: 640px) {
    .nc-stack { left: 8px; right: 8px; bottom: auto; top: calc(8px + env(safe-area-inset-top)); width: auto; flex-direction: column; }
    .nc-card { animation-name: nc-in-top; }
    .nc-table .nc-c { width: 44px; }
    .nc-table th:nth-child(n+2) { font-size: 10px; }
    .notifications-dropdown { width: min(320px, calc(100vw - 16px)); }
}
@keyframes nc-in-top { from { opacity: 0; transform: translateY(-14px) scale(0.96); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .nc-card, .nc-card.nc-urgent, .nc-card.nc-bump { animation: none !important; }
    .nc-bar { display: none; }
}
