@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --border-color: #475569;
    --border-light: #64748b;

    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

:root {
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
}

:root {
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;
}

:root {
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    --border-radius-2xl: 1rem;
    --border-radius-full: 9999px;
}

:root {
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

:root {
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

:root {
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
}

:root {
    --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.5);
    --focus-ring-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0ms;
        --transition-normal: 0ms;
        --transition-slow: 0ms;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-muted: #000000;
    }
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --background: #0f172a;
    --text: #e2e8f0;
    --card: #1e293b;
    --transition-speed: 0.3s;
}

html,
body {
    overflow-x: hidden !important;
    width: 100%;
    background: #111217;
    color: #fff;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: none;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.loading {
    opacity: 1;
    transition: opacity 1s ease-out;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

body:not(.loaded) #notification-history-btn {
    display: none;
}

html,
body,
.main,
.overflow-auto,
.overflow-scroll {
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.main::-webkit-scrollbar,
.overflow-auto::-webkit-scrollbar,
.overflow-scroll::-webkit-scrollbar {
    width: 4px;
    background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.overflow-auto::-webkit-scrollbar-thumb,
.overflow-scroll::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 8px;
    min-height: 40px;
    transition: background 0.3s;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.main::-webkit-scrollbar-thumb:hover,
.overflow-auto::-webkit-scrollbar-thumb:hover,
.overflow-scroll::-webkit-scrollbar-thumb:hover {
    background: #666;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.overflow-auto::-webkit-scrollbar-track,
.overflow-scroll::-webkit-scrollbar-track {
    background: transparent;
}

html,
body,
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.notification-history-list,
.burger-menu-content {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.notification-history-list::-webkit-scrollbar,
.burger-menu-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.modern-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: none;
}

.modern-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.modern-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
}

.burger-menu-content,
body .burger-menu-content {
    position: fixed;
    top: 80px;
    right: 0;
    max-height: calc(100vh - 80px);
    width: 100%;
    background: #181b20 !important;
    box-shadow: none !important;
    transform: translateX(100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0s 0.4s !important;
    padding: 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    border-radius: 0 0 0 0.75rem !important;
    margin-bottom: 20px !important;
}

@media (min-width: 768px) {

    .burger-menu-content,
    body .burger-menu-content {
        width: 300px;
    }
}

.burger-menu-content.active {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0s 0s !important;
    background: #181b20 !important;
    max-height: calc(100vh - 80px) !important;
}

.burger-menu-item {
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    width: 100%;
}

.burger-menu-item:hover {
    background: rgba(75, 85, 99, 0.6) !important;
    color: white !important;
    /* transform: translateX(5px); */ /* УБРАНО */
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* ДОБАВЛЕНО: Эффект нажатия */
.burger-menu-item:active {
    transform: scale(0.97);
    background: rgba(75, 85, 99, 0.4) !important;
}

.burger-menu-item i {
    margin-right: 1rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

.burger-menu-item:hover i {
    color: #3b82f6;
}

.burger-menu-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.burger-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
}

.burger-menu-overlay.active {
    display: block;
}

main {
    position: relative;
    z-index: 10;
}

svg,
.fa,
.fab,
.fas,
.footer,
.footer *,
.text-transparent,
.bg-clip-text {
    color: #fff !important;
    fill: #fff !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}

footer {
    background: none;
}

footer * {
    color: #fff !important;
    fill: #fff !important;
    background: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes square-animation {
    0% {
        left: 0;
        top: 0;
    }

    10.5% {
        left: 0;
        top: 0;
    }

    12.5% {
        left: 32px;
        top: 0;
    }

    23% {
        left: 32px;
        top: 0;
    }

    25% {
        left: 64px;
        top: 0;
    }

    35.5% {
        left: 64px;
        top: 0;
    }

    37.5% {
        left: 64px;
        top: 32px;
    }

    48% {
        left: 64px;
        top: 32px;
    }

    50% {
        left: 32px;
        top: 32px;
    }

    60.5% {
        left: 32px;
        top: 32px;
    }

    62.5% {
        left: 32px;
        top: 64px;
    }

    73% {
        left: 32px;
        top: 64px;
    }

    75% {
        left: 0;
        top: 64px;
    }

    85.5% {
        left: 0;
        top: 64px;
    }

    87.5% {
        left: 0;
        top: 32px;
    }

    98% {
        left: 0;
        top: 32px;
    }

    100% {
        left: 0;
        top: 0;
    }
}

/* Normal Usage */
.spinner:before {
    transform: rotateX(60deg) rotateY(45deg) rotateZ(45deg);
    animation: 750ms rotateBefore infinite linear reverse;
}

.spinner:after {
    transform: rotateX(240deg) rotateY(45deg) rotateZ(45deg);
    animation: 750ms rotateAfter infinite linear;
}

.spinner:before,
.spinner:after {
    box-sizing: border-box;
    content: '';
    display: block;
    position: absolute;
    margin-top: -5em;
    margin-left: -5em;
    width: 10em;
    height: 10em;
    transform-style: preserve-3d;
    transform-origin: 50%;
    transform: rotateY(50%);
    perspective-origin: 50% 50%;
    perspective: 340px;
    background-size: 10em 10em;
    background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI2NnB4IiBoZWlnaHQ9IjI5N3B4IiB2aWV3Qm94PSIwIDAgMjY2IDI5NyIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpza2V0Y2g9Imh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC9ucyI+CiAgICA8dGl0bGU+c3Bpbm5lcjwvdGl0bGU+CiAgICA8ZGVzY3JpcHRpb24+Q3JlYXRlZCB3aXRoIFNrZXRjaCAoaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoKTwvZGVzY3JpcHRpb24+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBza2V0Y2g6dHlwZT0iTVNQYWdlIj4KICAgICAgICA8cGF0aCBkPSJNMTcxLjUwNzgxMywzLjI1MDAwMDM4IEMyMjYuMjA4MTgzLDEyLjg1NzcxMTEgMjk3LjExMjcyMiw3MS40OTEyODIzIDI1MC44OTU1OTksMTA4LjQxMDE1NSBDMjE2LjU4MjAyNCwxMzUuODIwMzEgMTg2LjUyODQwNSw5Ny4wNjI0OTY0IDE1Ni44MDA3NzQsODUuNzczNDM0NiBDMTI3LjA3MzE0Myw3NC40ODQzNzIxIDc2Ljg4ODQ2MzIsODQuMjE2MTQ2MiA2MC4xMjg5MDY1LDEwOC40MTAxNTMgQy0xNS45ODA0Njg1LDIxOC4yODEyNDcgMTQ1LjI3NzM0NCwyOTYuNjY3OTY4IDE0NS4yNzczNDQsMjk2LjY2Nzk2OCBDMTQ1LjI3NzM0NCwyOTYuNjY3OTY4IC0yNS40NDkyMTg3LDI1Ny4yNDIxOTggMy4zOTg0Mzc1LDEwOC40MTAxNTUgQzE2LjMwNzA2NjEsNDEuODExNDE3NCA4NC43Mjc1NjI5LC0xMS45OTIyOTg1IDE3MS41MDc4MTMsMy4yNTAwMDAzOCBaIiBpZD0iUGF0aC0xIiBmaWxsPSIjRkZGRkZGIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj48L3BhdGg+CiAgICA8L2c+Cjwvc3ZnPg==);
}

/* sitNSpin.less */
@keyframes rotateBefore {
    from {
        transform: rotateX(60deg) rotateY(45deg) rotateZ(0deg);
    }

    to {
        transform: rotateX(60deg) rotateY(45deg) rotateZ(-360deg);
    }
}

@keyframes rotateAfter {
    from {
        transform: rotateX(240deg) rotateY(45deg) rotateZ(0deg);
    }

    to {
        transform: rotateX(240deg) rotateY(45deg) rotateZ(360deg);
    }
}

#loading-screen.loading,
#loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    z-index: 99999;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-fade-in {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

.modal-fade-out {
    animation: modalFadeOut 0.3s ease-in;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-slide-in {
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-slide-out {
    animation: toastSlideOut 0.3s ease-in;
}

@keyframes toast-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-fade-in {
    animation: toast-fade-in 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
}

.toast-fade-out {
    animation: toast-fade-out 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    /* transform: translateY(-2px); */ /* УБРАНО */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ДОБАВЛЕНО: Эффект нажатия */
.btn-hover:active {
    transform: scale(0.98);
}

@keyframes skeletonPulse {
    0% {
        background-color: rgba(255, 255, 255, 0.1);
    }

    50% {
        background-color: rgba(255, 255, 255, 0.2);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.skeleton {
    animation: skeletonPulse 1.5s ease-in-out infinite;
}


.content-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.content-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}



@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.burger-menu {
    position: relative;
    display: inline-block;
}

.burger-menu-button {
    background: transparent;
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.burger-menu-button:hover {
    transform: none;
}

/* ДОБАВЛЕНО: Эффект нажатия */
.burger-menu-button:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
}

.burger-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: -1;
}

.burger-menu-overlay.active {
    display: none;
}

.burger-menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #fff !important;
    cursor: pointer;
    transition: none;
    border-bottom: none;
}

.burger-menu-item:last-child {
    border-bottom: none;
}

.burger-menu-item:hover {
    background: rgba(75, 85, 99, 0.6);
    color: white;
}

.burger-menu-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
    color: #fff !important;
}

.burger-menu-item:hover i {
    color: #d1d5db;
}

.burger-menu-divider {
    display: none;
    height: 0;
    background: transparent;
    margin: 0;
}

.submenu {
    background: rgba(75, 85, 99, 0.6);
    border-top: 1px solid rgba(156, 163, 175, 0.2);
    display: none;
}

.submenu.active {
    display: block;
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    color: #d1d5db;
    cursor: pointer;
    transition: none;
    font-size: 0.875rem;
}

.submenu-item:hover {
    background: rgba(75, 85, 99, 0.8);
    color: white;
}

.submenu-item i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
    color: #9ca3af;
}

.submenu-item:hover i {
    color: #d1d5db;
}


.toast {
    background: rgba(38, 43, 45, 0.667);
    backdrop-filter: none;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    color: white;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    min-width: 300px;
    position: relative;
    z-index: 10000;
    transition: all 0.3s ease;
}

.toast i {
    font-size: 16px;
    flex-shrink: 0;
}

.toast span {
    flex: 1;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: white;
}

.toast-close:active {
    background: rgba(255, 255, 255, 0.1);
}

.toast-success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast-success i {
    color: #22c55e;
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast-error i {
    color: #ef4444;
}

.toast-warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.toast-warning i {
    color: #f59e0b;
}

.toast-info {
    border-color: rgba(59, 130, 246, 0.3);
}

.toast-info i {
    color: #3b82f6;
}

#toast-container {
    pointer-events: none;
}

#toast-container .toast {
    pointer-events: auto;
}

@media (max-width: 768px) {
    .toast {
        min-width: 280px;
        max-width: calc(100vw - 48px);
        font-size: 13px;
        padding: 10px 14px;
    }
}

#notification-history-btn {
    box-shadow: none !important;
}

#notification-history-btn .fa-bell {
    font-size: 1.100rem !important;
}

#notification-history-modal {
    width: 420px;
    max-height: 80vh;
    bottom: 6rem;
    right: 1.5rem;
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
    transform-origin: bottom right;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    position: fixed;
}

#notification-history-modal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#notification-history-modal .toast,
#notification-history-modal .toast-in-modal {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 10001;
    width: calc(100% - 2rem);
    max-width: calc(420px - 2rem);
}

#notification-history-modal .toast.toast-fade-in,
#notification-history-modal .toast-in-modal.toast-fade-in {
    animation: toast-fade-in-center 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes toast-fade-in-center {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

#notification-history-list {
    max-height: 40vh;
    overflow-y: auto;
    padding: 16px;
    margin-bottom: 1rem;
    background: #23272f;
    border-radius: 0 0 12px 12px;
}

@keyframes fadeInNotif {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-history-item {
    background: #181b20;
    border-radius: 0.75rem;
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 0.97rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
}

.notification-history-item .notif-time {
    color: #94a3b8;
    font-size: 0.8em;
    margin-left: auto;
}

.notification-history-item.success {
    border-left: 4px solid #10b981;
}

.notification-history-item.error {
    border-left: 4px solid #ef4444;
}

.notification-history-item.info {
    border-left: 4px solid #3b82f6;
}

.notification-history-item.warning {
    border-left: 4px solid #f59e42;
}

.input-eye-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2em;
    height: 2.2em;
}

.input-eye-btn:hover {
    color: #3b82f6;
}

.relative-input {
    position: relative;
}

@media (min-width: 481px) {
    .relative-input input {
        padding-right: 2.7em;
    }
}

.notification-badge {
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    .burger-menu-content {
        position: fixed !important;
        top: 64px !important;
        right: 0 !important;
        bottom: 80px !important;
        width: 300px !important;
        height: calc(100vh - 64px - 80px) !important;
        background: #181b20 !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: none !important;
        transform: translateX(100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0s 0.4s !important;
        padding: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: visible !important;
        z-index: 1000 !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }

    .burger-menu-content.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0s 0s !important;
        background: #181b20 !important;
        box-shadow: none !important;
    }

    .burger-menu-overlay.active {
        display: block;
        top: 64px;
        height: calc(100vh - 64px);
    }

    .burger-menu-item {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.25rem !important;
        border-radius: 0.5rem !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        display: flex !important;
        align-items: center !important;
        color: #ffffff !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        background: #181b20 !important;
    }

    .burger-menu-item:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: white !important;
    }

    .burger-menu-item i {
        margin-right: 0.5rem !important;
        color: #94a3b8 !important;
        font-size: 0.9rem !important;
    }

    .burger-menu-item:hover i {
        color: white !important;
    }

    .burger-menu-divider {
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin: 0.5rem 0 !important;
    }
}

@media (min-width: 768px) {
    .burger-menu-content {
        position: fixed !important;
        top: 80px !important;
        right: 0 !important;
        max-height: calc(100vh - 80px) !important;
        width: 300px !important;
        background: #181b20 !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: none !important;
        transform: translateX(100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0s 0.4s !important;
        padding: 2rem !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        z-index: 1000 !important;
        border-radius: 0 0 0 0.75rem !important;
        margin-bottom: 20px !important;
    }

    .burger-menu-content.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0s 0s !important;
        background: #181b20 !important;
        box-shadow: none !important;
    }

    .burger-menu-item {
        padding: 1rem 1.5rem;
        margin-bottom: 0.5rem;
        border-radius: 0.75rem;
        font-size: 1.1rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        color: #fff;
        background: none;
        transition: background 0.3s, color 0.3s;
        cursor: pointer;
        box-shadow: none;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .burger-menu-item:hover {
        background: #111;
        color: #fff;
        transform: none;
        border-color: rgb(255, 255, 255) !important;
    }

    /* ДОБАВЛЕНО: Эффект нажатия для desktop */
    .burger-menu-item:active {
        transform: scale(0.98);
    }

    .burger-menu-item i {
        margin-right: 1rem;
        color: #ffffff;
        transition: color 0.3s;
    }

    .burger-menu-item:hover i {
        color: #ffffff;
    }

    .burger-menu-divider {
        border-top: 1px solid #222;
        margin: 1rem 0;
    }

    .burger-menu-overlay {
        display: none;
    }
}

.notification-item.unread {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), transparent);
    border-left: 3px solid #3b82f6;
}

.notification-item {
    background: #1f2937;
    border-radius: 0.75rem;
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 0.97rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px 0 #1f2937;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item.unread {
    padding-left: 1.2rem;
    margin-left: 0.2rem;
}

.notification-item.read {
    border-left: 3px solid transparent;
    padding-left: 1.2rem;
    margin-left: 0.2rem;
}

.notification-message {
    margin: 0.5rem 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.notification-message.long-message {
    max-height: 3.6rem;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.notification-message.expanded {
    max-height: 1000px !important;
    overflow: visible !important;
}

.expand-message-btn {
    background: none !important;
    border: none !important;
    color: #3b82f6;
    padding: 0;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.5rem;
    display: inline-block;
    font-family: inherit;
}

.expand-message-btn:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.expand-message-btn:active {
    color: #1e40af;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.notification-time {
    color: #fcfcfc;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.mark-read-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    color: #10b981;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}


/* ДОБАВЛЕНО: Эффект нажатия */
.mark-read-btn:active {
    transform: scale(0.95);
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
}

.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none !important;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal.active {
    display: flex;
}

.auth-content {
    background: #23272f !important;
    backdrop-filter: none;
    padding: 2.5rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444 !important;
    animation: slideIn 0.3s ease-out;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(156, 163, 175, 0.3);
    background: rgba(75, 85, 99, 0.3);
    border-radius: 0.75rem;
    padding: 0.25rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: #d1d5db;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    font-weight: 500;
}

.auth-tab.active {
    color: white;
    background: rgba(75, 85, 99, 0.8);
    box-shadow: 0 4px 15px rgba(75, 85, 99, 0.3);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(75, 85, 99, 0.6);
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 0.75rem;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: none;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(156, 163, 175, 0.6);
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
    background: rgba(75, 85, 99, 0.8);
}

.auth-form input::placeholder {
    color: rgba(209, 213, 219, 0.7);
}

.auth-form button {
    width: 100%;
    padding: 1rem;
    background: rgba(75, 85, 99, 0.8);
    color: white;
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    backdrop-filter: none;
}

.auth-form button:hover {
    transform: none;
    box-shadow: none;
}

/* ДОБАВЛЕНО: Эффект нажатия */
.auth-form button:active {
    transform: scale(0.98);
    background: rgba(75, 85, 99, 1);
}

.error-message {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.success-message {
    color: #10b981;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none !important;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.profile-modal.active {
    display: flex;
}

.profile-content {
    background: #23272f !important;
    backdrop-filter: none;
    padding: 2.5rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444 !important;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.profile-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05); /* ОСТАВЛЕНО (это не кнопка) */
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

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

.profile-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.profile-avatar:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-id {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
}

.profile-form {
    margin-top: 2rem;
}

.profile-form input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(75, 85, 99, 0.6);
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 0.75rem;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: none;
}

.profile-form input:focus {
    outline: none;
    border-color: rgba(156, 163, 175, 0.6);
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
    background: rgba(75, 85, 99, 0.8);
}

.profile-form input::placeholder {
    color: rgba(209, 213, 219, 0.7);
}

.profile-form button {
    width: 100%;
    padding: 1rem;
    background: rgba(75, 85, 99, 0.8);
    color: white;
    border: 1px solid rgba(156, 163, 175, 0.4);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    backdrop-filter: none;
}

.profile-form button:hover {
    transform: none;
    box-shadow: none;
}

/* ДОБАВЛЕНО: Эффект нажатия */
.profile-form button:active {
    transform: scale(0.98);
    background: rgba(75, 85, 99, 1);
}

.profile-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

.profile-message.success {
    color: #10b981;
}

.profile-message.error {
    color: #ef4444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}

.profile-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.5rem;
}

.profile-close:hover {
    color: #e2e8f0;
}

.profile-close i {
    color: #94a3b8;
    font-size: 1.25rem;
}

.profile-close:hover i {
    color: #e2e8f0;
}

#notification-history-modal {
    background: #23272f !important;
    backdrop-filter: none;
    border: 1px solid #444 !important;
    border-radius: 12px;
    overflow: hidden;
}

#notification-history-modal .border-b {
    border-color: rgba(156, 163, 175, 0.3);
}

#notification-history-btn {
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
    padding: 0.75rem !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
}

#notification-history-btn:hover {
    transform: none !important;
}

/* ДОБАВЛЕНО: Эффект нажатия */
#notification-history-btn:active {
    transform: scale(0.95) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-item img {
    width: 48px;
    height: 48px;
    border-radius: 0.25rem;
    margin-right: 1rem;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.search-result-info h4 {
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
}

.search-result-info p {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
}

.search-category-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
}

.search-category-title:first-child {
    margin-top: 0;
}

.search-view-all {
    display: block;
    text-align: left;
}

.categories-dropdown {
    border-radius: 0 0 1rem 1rem !important;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
}

.categories-dropdown.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.search-section + .search-section {
    margin-top: 1rem;
}

@media (min-width: 768px) {
    #header-search-results .search-results-scroll {
        max-height: 420px;
        overflow-y: auto;
    }
}

@media (max-width: 767px) {

    .categories-dropdown,
    .categories-dropdown.show {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: scale(0) !important;
    }

    #header-search-results {
        left: 50% !important;
        top: 5.5rem !important;
        width: calc(100vw - 2.5rem) !important;
        max-width: 360px;
        transform: translateX(-50%);
        border-radius: 1rem !important;
        padding: 1.25rem !important;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
        border: 1px solid rgba(148, 163, 184, 0.2);
        background: rgba(24, 27, 32, 0.96) !important;
        max-height: 60vh;
        overflow: hidden;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
    }

    #header-search-results.hidden {
        display: none !important;
    }

    #header-search-results .search-results-scroll {
        flex: 1 1 auto;
        overflow-y: auto;
        padding-right: 0.35rem;
        margin-right: -0.35rem;
    }

    #header-search-results .search-section {
        flex-shrink: 0;
        padding-right: 0.35rem;
    }

    #header-search-results-list {
        max-height: none;
        overflow: visible !important;
        padding-bottom: 0.75rem;
    }

    #header-search-results .search-results-footer {
        position: sticky !important;
        bottom: 0;
        background: linear-gradient(180deg, rgba(24, 27, 32, 0) 0%, rgba(24, 27, 32, 0.92) 35%, rgba(24, 27, 32, 0.96) 100%) !important;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
        margin-top: 0;
        padding-top: 0.75rem;
    }
}

.screenshot-container:hover .screenshot-overlay {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.screenshot-container:hover .screenshot-description {
    opacity: 1 !important;
}

.screenshot-container {
    position: relative;
}

.screenshot-overlay {
    overflow: hidden;
    padding: 0.75rem !important;
}

.screenshot-description {
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    padding: 0.5rem 0.75rem;
    word-break: break-word;
    overflow-wrap: anywhere;
    border-radius: 0.5rem;
}

.screenshot-description p {
    margin: 0;
}

.search-view-all {
    padding: 0.75rem;
    border-radius: 0.5rem;
    color: #f8fafc;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
}

.search-view-all:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.spinner-border {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.news-images,
.news-video {
    margin-bottom: 1rem;
}

.news-images h4,
.news-video h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.2s ease-in-out;
}

.image-container img {
    width: 100%;
    height: 8rem;
    object-fit: cover;
    border: 1px solid #475569;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

.image-container img:hover {
    opacity: 0.8;
}

.image-container img.scale-110 {
    transform: scale(1.1);
}

.video-container {
    position: relative;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    width: 100%;
    border: 1px solid #475569;
    border-radius: 0.5rem;
}

@media (max-width: 640px) {
    .news-images .grid {
        grid-template-columns: 1fr;
    }

    .image-container img {
        height: 6rem;
    }

    .video-container iframe {
        height: 150px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .news-images .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-container img {
        height: 7rem;
    }

    .video-container iframe {
        height: 180px;
    }
}

@media (min-width: 1025px) {
    .news-images .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .image-container img {
        height: 8rem;
    }

    .video-container iframe {
        height: 200px;
    }
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.news-content {
    flex-grow: 1;
    overflow: hidden;
}

.news-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    position: relative;
}

.news-content p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: none;
    pointer-events: none;
}

#image-modal.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

#image-modal {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

#full-image {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#image-modal.active #full-image {
    transform: scale(1);
    opacity: 1;
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}

#full-image[style*="opacity"] {
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

#image-counter {
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

#image-counter:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateX(-50%) scale(1.05);
}

.max-h-screen {
    max-height: 100vh;
}

.max-w-screen {
    max-width: 100vw;
}

.image-modal-arrow {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-modal-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1); /* ИЗМЕНЕНО */
}

.image-modal-arrow:active {
    transform: translateY(-50%) scale(0.95);
    transition: transform 0.1s ease;
}

#full-image {
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
}

.read-more-btn {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
    border-radius: 0;
    font: inherit;
    text-decoration: underline;
    display: inline;
    width: auto;
    margin: 0 0 0.5rem 0;
    cursor: pointer;
    transition: color 0.3s ease;
    align-self: flex-start;
    text-align: left;
}

.bg-gray-800.rounded-lg {
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: height 0.3s ease;
}

#news-list {
    align-items: start !important;
}

.news-content {
    position: relative;
    z-index: 1;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.news-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    position: relative;
    flex-grow: 1;
    transition: all 0.3s ease;
}

.news-content p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: none;
    pointer-events: none;
}

.news-footer {
    margin-top: auto;
    padding-top: 0.75rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.read-more-btn:hover {
    background: none;
    color: inherit;
    text-decoration: underline;
    transition: none;
}

.news-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: pointer;
}

.news-modal-media {
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.news-modal-media .news-modal-images,
.news-modal-media .news-modal-video {
    margin-bottom: 1.5rem;
}

.news-modal-images h4,
.news-modal-video h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.news-modal-images .grid {
    display: grid;
    gap: 0.75rem;
}

.news-modal-images .image-container img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-modal-images .image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.news-modal-images .image-container img:hover {
    opacity: 0.8;
}

.news-modal-video .video-container {
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #4b5563;
}

.news-modal-video .video-container iframe,
.news-modal-video .video-container video {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 1px solid #4b5563;
}

.news-modal-overlay.active {
    display: flex;
}

.news-modal {
    background: #1f2937;
    border-radius: 0.75rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    border: 1px solid #374151;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
}

.news-modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #232946;
}

.news-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.news-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

.news-modal-close:hover {
    background: #374151;
    color: white;
}

.news-modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #4b5563 transparent;
}

.news-modal-body::-webkit-scrollbar {
    width: 6px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.news-modal-body::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.news-modal-content {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    padding-bottom: 1rem;
}

.news-modal-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    margin-bottom: 1rem;
}

.news-modal-meta {
    color: #9ca3af;
    font-size: 0.875rem;
    border-top: 1px solid #374151;
    padding-top: 1rem;
    flex-shrink: 0;
    background: #232946;
}

.news-modal-meta div {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .news-modal {
        margin: 0.5rem;
        max-height: 95vh;
        width: calc(100% - 1rem);
    }

    .news-modal-header {
        padding: 1rem;
    }

    .news-modal-body {
        padding: 1rem;
    }

    .news-modal-meta {
        padding: 1rem;
    }

    .read-more-btn {
        width: auto;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }

    .news-modal-images .grid {
        grid-template-columns: 1fr;
    }

    .news-modal-video .video-container iframe,
    .news-modal-video .video-container video {
        max-height: 250px;
    }
}

.news-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.video-toggle-buttons {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
}

.btn-video-toggle {
    background-color: rgba(52, 152, 219, 0.7);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-video-toggle:active {
    transform: scale(0.97);
    background-color: rgba(52, 152, 219, 0.9);
}

.btn-video-toggle.active {
    background-color: #f39c12;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-video-toggle.active:active {
    background-color: #e67e22;
}

.video-container-youtube,
.video-container-local {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.video-container-youtube iframe,
.video-container-local video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.auth-form input,
.profile-form input,
#login-email,
#login-password,
#register-email,
#register-password,
#register-password-confirm,
#username {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    height: auto !important;
    min-height: auto !important;
    line-height: normal !important;
}

.profile-form textarea,
#user-description {
    padding: 0.72rem !important;
    margin-bottom: 0.72rem !important;
    height: auto !important;
    min-height: auto !important;
    line-height: normal !important;
}

.admin-checkmark {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

#burger-profile-username {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

@media (max-width: 768px) {
    #notification-history-modal {
        width: min(380px, 95vw);
        right: 0.5rem;
        left: 0.5rem;
        margin: 0 auto;
    }

    .notification-item {
        padding: 14px;
        margin-bottom: 8px;
    }

    .notification-item.admin-comment .notification-message {
        padding: 6px 10px;
        font-size: 12px;
    }

    .notification-item {
        font-size: 15px !important;
    }

    .notification-item .notification-title {
        font-size: 17px !important;
    }

    .notification-item .notification-message {
        font-size: 16px !important;
    }

    .notification-item .notification-time {
        font-size: 12px !important;
    }
}

.notification-item * {
    text-align: left !important;
}

.notification-title {
    margin-bottom: 8px !important;
    display: block !important;
}

.notification-message {
    margin: 8px 0 !important;
    display: block !important;
}

.notification-time {
    margin-top: 8px !important;
    display: block !important;
}

.mark-read-btn {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
}

#burger-profile-username img {
    flex-shrink: 0;
    position: relative;
    top: 1px;
}

.news-meta .admin-checkmark {
    width: 18px;
    height: 18px;
    margin-left: 2px;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.admin-checkmark {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

body.reviews-no-scroll {
    overflow: hidden !important;
}

#reviews-page {
    overflow: hidden !important;
}

.mobile-nav-btn.active {
    color: #3b82f6 !important;
}

.mobile-nav-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    outline: inherit;
}


/* --- Enhancements --- */
.burger-menu-content {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    border-radius: 12px;
}

.burger-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    min-height: 56px;
}

.burger-menu-item i {
    color: #ffffff !important;
}

.mobile-nav-btn {
    border-radius: 12px;
    padding: 8px 6px;
    transition: background-color 0.2s ease;
}

.mobile-nav-btn.active {
    background-color: rgba(255, 255, 255, 0.10);
}

@media (max-width: 767px) {
    #mobile-logout-btn {
        margin-top: auto;
    }
}

/* Star buttons click effect (no hover background) */
.star-btn:active,
.library-star-btn:active {
    transform: scale(0.96);
}

/* Navigation Sidebar Buttons - No hover, click effect and active state */
.nav-sidebar-btn {
    position: relative;
    transition: all 0.2s ease;
}

.nav-sidebar-btn:hover {
    /* Убираем hover эффекты */
    transform: none !important;
    background: transparent !important;
}

.nav-sidebar-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.nav-sidebar-btn.active {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.nav-sidebar-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 3px 3px 0;
}

/* Profile Page */
.profile-page-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.profile-card-body {
    display: flex;
    gap: 2.5rem;
    padding: 1.5rem 3rem 3rem;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-page-avatar {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 6px solid rgba(15, 17, 25, 0.95);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.profile-info-wrapper {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-info-header h1 {
    font-size: 2.125rem;
    font-weight: 700;
    color: #f8fafc;
}

.profile-username-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-id-mobile {
    display: none;
}

.profile-role {
    display: none;
}

.profile-role.admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.profile-role.admin svg {
    width: 100%;
    height: 100%;
    display: block;
}

.profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 17, 25, 0.45);
    color: #f8fafc;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-edit-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

.profile-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #94a3b8;
}

.profile-id-tag {
    background: rgba(148, 163, 184, 0.15);
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.profile-joined {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.profile-stat {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 0.9rem 1.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.profile-stat span {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
}

.profile-stat p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.75);
    letter-spacing: 0.02em;
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-line;
}

.profile-extra {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #cbd5f5;
}

.profile-section-card {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 17, 25, 0.75);
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(24px);
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.profile-section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
}

.profile-section-subtitle {
    font-size: 0.9rem;
    color: rgba(203, 213, 225, 0.8);
}

.profile-saved-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.profile-saved-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 17, 25, 0.6);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease;
}

.profile-saved-card img {
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.profile-saved-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(12, 14, 20, 0) 35%, rgba(12, 14, 20, 0.88) 100%);
    color: #f8fafc;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-saved-card-overlay h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.profile-saved-card-overlay p {
    font-size: 0.82rem;
    margin: 0;
    color: rgba(226, 232, 240, 0.75);
}

.profile-saved-card-overlay span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.9);
}

.profile-saved-card:hover img {
    transform: scale(1.05);
}

.profile-saved-card:hover .profile-saved-card-overlay {
    opacity: 1;
}

.profile-saved-card a {
    display: block;
    height: 100%;
}

.profile-empty-state {
    width: 100%;
    padding: 3rem 1.5rem;
    border-radius: 18px;
    text-align: center;
    color: rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

@media (max-width: 1024px) {
    .profile-card-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 2rem 2rem;
        gap: 2rem;
    }

    .profile-avatar-wrapper {
        margin-top: 0;
    }

    .profile-page-avatar {
        width: 140px;
        height: 140px;
        border: 4px solid rgba(15, 17, 25, 0.95);
    }

    .profile-info-wrapper {
        align-items: center;
        width: 100%;
    }

    .profile-info-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .profile-username-wrapper {
        justify-content: center;
    }

    .profile-info-header h1 {
        font-size: 1.75rem;
    }

    .profile-edit-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .profile-meta {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .profile-bio {
        text-align: center;
    }
}

@media (max-width: 640px) {
    #profile-page {
        padding: 0 !important;
    }

    #profile-page section {
        padding: 0 !important;
    }

    #profile-page .max-w-6xl {
        max-width: 100%;
        padding: 0;
    }

    .profile-page-card {
        margin: 0;
    }

    .profile-card-body {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 0.75rem;
    }

    .profile-avatar-wrapper {
        margin-top: 0;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .profile-page-avatar {
        width: 86px;
        height: 86px;
        border: 3px solid rgba(15, 17, 25, 0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .profile-info-wrapper {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .profile-info-header {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .profile-username-wrapper {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        width: 100%;
    }

    .profile-info-header h1 {
        font-size: 1.125rem;
        font-weight: 600;
        margin: 0;
    }

    .profile-role.admin {
        width: 18px;
        height: 18px;
    }

    .profile-id-mobile {
        display: block;
        font-size: 0.78rem;
        color: rgba(148, 163, 184, 0.9);
        flex-basis: 100%;
        margin-top: -0.1rem;
    }

    .profile-edit-btn {
        align-self: flex-start;
        width: auto;
        padding: 0.5rem 1.05rem;
        font-size: 0.875rem;
        font-weight: 600;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .profile-meta {
        display: none;
    }

    .profile-bio {
        font-size: 0.875rem;
        line-height: 1.5;
        text-align: left;
        width: 100%;
        padding: 0;
        color: #e2e8f0;
        margin-top: 0.5rem;
    }
}