/* ============================================
   UNSAFEAREA - СОВРЕМЕННЫЙ СТАЛКЕРСКИЙ ДИЗАЙН
   Атмосферный дизайн в стиле S.T.A.L.K.E.R.
   ============================================ */

/* === ОСНОВА: ЦВЕТОВАЯ ПАЛИТРА ЗОНЫ === */
:root {
    --stalker-green: #759739;
    --stalker-orange: #c15f23;
    --stalker-dark: #0E0E0E;
    --stalker-gray: #1b1b1b;
    --stalker-light: #cbcac2;
    --stalker-border: #2a2a2a;
    --stalker-hover: rgba(117, 151, 57, 0.1);
}

/* === ФОН И БАЗОВЫЕ СТИЛИ === */
body {
    background: url(/style/fon.jpg) !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-position: center top !important;
    background-size: cover !important;
    background-color: #0E0E0E !important;
    color: #cbcac2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    padding-bottom: 60px !important; /* Всегда резервируем место для подвала */
    min-height: 100vh;
}

html {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* === ГЛАВНЫЙ КОНТЕЙНЕР === */
.main {
    background: rgba(14, 14, 14, 0.85);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
}

/* === ШАПКА === */
header {
    background: linear-gradient(180deg, #242424 0%, #1a1a1a 100%);
    border-bottom: 2px solid var(--stalker-green);
    box-shadow: 0 2px 15px rgba(117, 151, 57, 0.3);
}

/* === СТАТУС БАР === */
.udata_puls {
    background: linear-gradient(to bottom, #1c1c1c, #141414);
    border-bottom: 1px solid var(--stalker-green);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* === НАВИГАЦИЯ И ССЫЛКИ === */
.navigaci {
    color: #9A9B95;
    transition: none;
    position: relative;
}

.navigaci:hover {
    color: var(--stalker-green);
    text-shadow: 0 0 8px rgba(117, 151, 57, 0.5);
}

.navigaci::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--stalker-green);
    transition: none;
}

.navigaci:hover::after {
    width: 100%;
}

/* === КНОПКИ И ДЕЙСТВИЯ === */
.raz {
    background: linear-gradient(135deg, #1b1b1b 0%, #0a0a0a 100%);
    border: 1px solid #2a2a2a;
    border-left: 3px solid var(--stalker-orange);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: none;
    position: relative;
    overflow: hidden;
}

.raz::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(193, 95, 35, 0.1), transparent);
    transition: none;
}

.raz:hover::before {
    left: 100%;
}

.raz:hover {
    background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%);
    border-left-color: var(--stalker-green);
    box-shadow: 0 4px 15px rgba(193, 95, 35, 0.4);
    transform: translateX(3px);
}

.raz:active {
    transform: translateX(3px) scale(0.98);
}

/* === БЛОКИ КОНТЕНТА === */
.ppg, .ppg3 a, .ppg3 li, .ppg4 {
    background: linear-gradient(135deg, #1b1b1b 0%, #141414 100%);
    border: 1px solid #2a2a2a;
    border-top: 1px solid #2e2e2e;
    border-bottom: 1px solid #0a0a0a;
    transition: none;
    position: relative;
}

.ppg:hover, .ppg3 a:hover, .ppg3 li:hover, .ppg4:hover {
    background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%);
    border-color: rgba(117, 151, 57, 0.3);
    box-shadow: 0 0 15px rgba(117, 151, 57, 0.2);
}

/* === ЗАГОЛОВКИ === */
.title {
    background: linear-gradient(135deg, #1a1a1a 0%, #0D0D0B 100%);
    border-bottom: 2px solid var(--stalker-orange);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* === ИНВЕНТАРЬ === */
.inventar_ramka {
    border: 2px solid #2a2a2a;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.inventar_fon {
    background-color: #0a0a0a;
    background-image:
        linear-gradient(rgba(117, 151, 57, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(117, 151, 57, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.fon_invent_tru, .fon_invent_tru2, .fon_invent_tru4 {
    transition: none;
    position: relative;
    border: 1px solid #1a1a1a;
}

.fon_invent_tru:hover, .fon_invent_tru2:hover, .fon_invent_tru4:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(117, 151, 57, 0.6);
    border-color: var(--stalker-green);
    z-index: 100;
}

/* Эффект свечения для редких предметов */
.item-rare {
    animation: none;
}

@keyframes item-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 200, 0, 0.4);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 200, 0, 0.8);
        filter: brightness(1.2);
    }
}

/* === КАРТА === */
#world__wrap {
    border: 2px solid #2a2a2a;
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.9),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.tile-x {
    transition: none;
    position: relative;
}

.tile-x:hover {
    filter: brightness(1.2);
    z-index: 10;
}

/* === ЧАТ === */
.new-chat-container {
    background: linear-gradient(135deg, #141414 0%, #0a0a0a 100%);
    border: 1px solid #2a2a2a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.chat-tabs {
    background: #0a0a0a;
    border-bottom: 2px solid #1a1a1a;
}

.chat-tabs-link {
    transition: none;
    position: relative;
}

.chat-tabs-link:hover {
    color: #fff;
    background: rgba(117, 151, 57, 0.1);
}

.chat-tabs-link.active {
    color: #E6A82D;
    background: rgba(230, 168, 45, 0.1);
    border-bottom: 3px solid #E6A82D;
    box-shadow: 0 0 15px rgba(230, 168, 45, 0.3);
}

#chat {
    background: rgba(10, 10, 10, 0.5);
}

/* === ФОРМЫ === */
input, textarea, select {
    background: rgba(20, 20, 20, 0.8) !important;
    border: 1px solid #2a2a2a !important;
    color: #cbcac2 !important;
    transition: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--stalker-green) !important;
    box-shadow: 0 0 10px rgba(117, 151, 57, 0.3) !important;
    background: rgba(30, 30, 30, 0.9) !important;
}

.forma2 {
    background: rgba(20, 20, 20, 0.9) !important;
    border: 1px solid #2a2a2a !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.forma2:focus {
    border-color: var(--stalker-green) !important;
    box-shadow: 0 0 10px rgba(117, 151, 57, 0.4) !important;
}

/* === СКРОЛЛБАРЫ === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--stalker-green) 0%, #5a7329 100%);
    border: 1px solid #2a2a2a;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8ab042 0%, var(--stalker-green) 100%);
    box-shadow: 0 0 10px rgba(117, 151, 57, 0.5);
}

/* === НАВИГАЦИОННОЕ МЕНЮ (ПОДВАЛ) === */
#nav_menu {
    background: linear-gradient(180deg, #1b1b1b 0%, #0a0a0a 100%);
    border-top: 2px solid var(--stalker-green);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.9);
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999 !important;
    /* УБИРАЕМ ВСЕ АНИМАЦИИ И ПЕРЕХОДЫ */
    animation: none;
    transition: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    will-change: auto !important;
}

#nav_menu a {
    transition: none;
    position: relative;
    border-right: 1px solid #0a0a0a;
}

#nav_menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, transparent, rgba(117, 151, 57, 0.3));
    transition: none;
}

#nav_menu a:hover::before {
    height: 100%;
}

#nav_menu a:hover {
    background: rgba(117, 151, 57, 0.15);
    border-color: var(--stalker-green);
    box-shadow: 0 0 15px rgba(117, 151, 57, 0.3);
}

#nav_menu a img {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8));
    transition: none;
}

#nav_menu a:hover img {
    filter: drop-shadow(0 0 8px rgba(117, 151, 57, 0.8));
    transform: scale(1.1);
}

/* === ОШИБКИ === */
.error {
    background: linear-gradient(135deg, #380000 0%, #440000 100%);
    border: 2px solid #880000;
    box-shadow: 0 0 20px rgba(136, 0, 0, 0.6);
    animation: none;
}

@keyframes error-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* === АНИМАЦИЯ ЗАГРУЗКИ === */
#load_animation {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.9);
}

#load_animation img {
    filter: drop-shadow(0 0 20px rgba(117, 151, 57, 0.8));
}

/* === ВСПЛЫВАЮЩИЕ ОКНА === */
.popup_head, .popup_page, .popup_block {
    backdrop-filter: blur(15px);
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #2a2a2a;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

.popup__close {
    background: linear-gradient(135deg, var(--stalker-orange) 0%, #8a3a15 100%);
    border: 1px solid #2a2a2a;
    transition: none;
}

.popup__close:hover {
    background: linear-gradient(135deg, #d16a2a 0%, var(--stalker-orange) 100%);
    box-shadow: 0 0 15px rgba(193, 95, 35, 0.6);
    transform: scale(1.05);
}

/* === АТМОСФЕРНЫЕ ЭФФЕКТЫ === */
@keyframes radiation-pulse {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.15; }
}

.anomaly-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(117, 151, 57, 0.1) 0%, transparent 70%);
    animation: none;
    pointer-events: none;
}

/* === ПЛАВНОЕ ПОЯВЛЕНИЕ === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content {
    animation: none;
}

/* === УЛУЧШЕННАЯ ТИПОГРАФИКА === */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 550px) {
    .title {
        font-size: 14px;
        letter-spacing: 1px;
    }

    #nav_menu a {
        font-size: 11px;
    }
}

/* === ДОПОЛНИТЕЛЬНЫЕ АКЦЕНТЫ === */
.stats, .stats2 {
    border-image: linear-gradient(to right, transparent 0%, var(--stalker-green) 50%, transparent 100%);
    border-image-slice: 1;
}

/* === HOVER ДЛЯ ССЫЛОК === */
a {
    transition: none;
}

a:hover {
    color: var(--stalker-green);
    text-shadow: 0 0 5px rgba(117, 151, 57, 0.5);
}

/* === RIPPLE ЭФФЕКТ === */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(117, 151, 57, 0.5);
    transform: scale(0);
    animation: none;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* === AJAX LOADER === */
#ajax-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(117, 151, 57, 0.2);
    border-top-color: var(--stalker-green);
    border-radius: 50%;
    animation: none;
    box-shadow: 0 0 20px rgba(117, 151, 57, 0.5);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === УВЕДОМЛЕНИЯ === */
.notification {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #1b1b1b 0%, #0a0a0a 100%);
    border: 2px solid var(--stalker-green);
    border-radius: 4px;
    color: #cbcac2;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: none;
    max-width: 300px;
}

.notification-success {
    border-color: var(--stalker-green);
    box-shadow: 0 5px 25px rgba(117, 151, 57, 0.4);
}

.notification-error {
    border-color: #880000;
    box-shadow: 0 5px 25px rgba(136, 0, 0, 0.4);
}

.notification-info {
    border-color: #E6A82D;
    box-shadow: 0 5px 25px rgba(230, 168, 45, 0.4);
}

/* === АКТИВНАЯ КНОПКА В МЕНЮ === */
#nav_menu a.active {
    background: rgba(117, 151, 57, 0.2);
    border-top: 2px solid var(--stalker-green);
}

/* === УБИРАЕМ МИГАНИЕ КОНТЕНТА === */
.content, #content, .main {
    transition: none !important;
}

/* === УЛУЧШЕННАЯ АНИМАЦИЯ ПОЯВЛЕНИЯ === */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.inventar_ramka {
    animation: none;
}

/* === ПУЛЬСАЦИЯ ДЛЯ ВАЖНЫХ ЭЛЕМЕНТОВ === */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(117, 151, 57, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(117, 151, 57, 0.6);
    }
}

.important-item {
    animation: none;
}

/* === HOVER ДЛЯ НАВИГАЦИИ С ИКОНКАМИ === */
#nav_menu a span {
    transition: none;
}

#nav_menu a:hover span {
    transform: translateY(-2px);
}

/* === ПЛАВНОЕ ПОЯВЛЕНИЕ ТЕКСТА === */
@keyframes textFadeIn {
    from {
        opacity: 0;
        letter-spacing: 5px;
    }
    to {
        opacity: 1;
        letter-spacing: 2px;
    }
}

.title {
    animation: none;
}

/* === ЭФФЕКТ СВЕЧЕНИЯ ПРИ НАВЕДЕНИИ НА ВАЖНЫЕ КНОПКИ === */
.btn-important, input[type="submit"] {
    position: relative;
    overflow: hidden;
}

.btn-important::after, input[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(117, 151, 57, 0.3);
    transform: translate(-50%, -50%);
    transition: none;
}

.btn-important:hover::after, input[type="submit"]:hover::after {
    width: 300px;
    height: 300px;
}

/* === СКЕЛЕТОН ЗАГРУЗКИ === */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #1a1a1a 0px, #2a2a2a 40px, #1a1a1a 80px);
    background-size: 200px 100%;
    animation: none;
}

/* === УЛУЧШЕННЫЙ ФОКУС === */
*:focus-visible {
    outline: 2px solid var(--stalker-green);
    outline-offset: 3px;
    box-shadow: 0 0 10px rgba(117, 151, 57, 0.5);
}

/* === ПЛАВНОСТЬ ДЛЯ ВСЕХ ЭЛЕМЕНТОВ === */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === АНИМАЦИЯ ДЛЯ СПИСКОВ === */
.list-item {
    animation: none;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
