:root {
--header: #1e347c;
--primary: #1e347c;
--secondary: #2a4494;
--background: #e4e8f2;
--text: #1a1a2e;
--white: #ffffff;
--accent: #4a6bc5;
--dop: #3557a8;
--shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;}
/* Премиум emoji с известной картинкой — скрываем текст, показываем фон */
emoji[id="5458443326254509941"] {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-indent: -9999px;
    position: relative;
}
emoji[id="5458443326254509941"]:after {
    content: '';
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url(/public/img/icon.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.news-text p emoji[id="5458443326254509941"] {
    width: 17px;
    height: 17px;
    line-height: 17px;
}
/* Остальные премиум emoji без картинки — показываем как обычный текст */
emoji {
    display: inline;
    font-style: normal;
}
emoji:after {
    display: none;
}
#load-scr {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1002;
    display: none;
    align-items: center;
    justify-content: center;
}
#load-scr.open {
    display: flex;
}
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
header {
    background: var(--header);
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 999;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo img {
    -webkit-filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.3));
    filter: drop-shadow(3px 3px 10px rgba(0,0,0,0.3));
    max-width: 87px;
    height: auto;
    display: block;
}
.container {
    max-width: 1200px;
    display: grid;
}
.section {
    background: #f0f2f8;
    padding: 0.5rem;
    box-shadow: var(--shadow);
}
.main-content {
    background: var(--white);
    box-shadow: var(--shadow);
}
.news-item {
    display: flex;
    gap: 1rem;
    padding: 0.7rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: var(--transition);
    position: relative;
    align-items: center;
}
.news-item:hover {
    box-shadow: 0 6px 20px rgba(30, 52, 124, 0.15);
}
.news-item img, .news-item video {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    aspect-ratio: 1/1;
}
.news-text {
    flex: 1;
}
.news-text h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}
.news-text p {
    font-size: 12px;
    color: #555;
}
.details-btn {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border: none;
    margin: 1em 0;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.details-btn:hover {
    background: var(--accent);
    transform: scale(1.05);
}
.sidebar {
    height: fit-content;
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 6.5rem;
}
.currency {
    font-size: 0.8rem;
    line-height: 1.2;
}
.load-more {
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: var(--transition);
}
.load-more:hover {
    background: var(--secondary);
    transform: scale(1.02);
}
footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}
.header-buttons a h3, .mobile-currency h1 strong {
    font-size: 16px;
}
@media (max-width: 767px) {
    .header-buttons {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .header-buttons a {
        background: var(--secondary);
        color: var(--white);
        padding: 0.5rem 0.5rem;
        border-radius: 5px;
        text-decoration: none;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        width: 48%;
        height: 5em;
        gap: 0.3rem;
        transition: var(--transition);
    }
    .header-buttons a img {
        height: 50px;
        border-radius: 25em;
    }
    .header-buttons a:hover {
        background: var(--accent);
        transform: translateY(-2px);
    }
    .header-buttons svg {
        width: 1rem;
        height: 1rem;
        fill: var(--white);
    }
    .main-content {
        padding: 0.5rem;
    }
    .news-text p {
        font-size: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 6;
        -webkit-box-orient: vertical;
        line-clamp: 6;
        box-orient: vertical;
    }
    header .header-buttons {
        display: none;
    }
    .container {
        gap: 0.8rem;
    }
    .mobile-buttons {
        padding-inline: 0.5rem;
    }
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    .header-buttons {
        margin-top: 1rem;
    }
    .news-item {
        font-weight: 400;
    }
    .news-item img, .news-item video {
        height: auto;
    }
    .sidebar {
        display: none;
    }
    .main-content h2 {
        text-align: center;
        margin-bottom: 0.5em;
    }
}
@media(max-width: 580px) {
    .news-text p {
        font-size: 14px;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}
@media(max-width: 460px) {
    .news-text p {
        font-size: 12px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}
@media (min-width: 768px) {
    .header-container .logo{
        margin-top: 6px;
    }
    .header-container {
        justify-content: space-around;
    }
    .header-buttons {
        display: flex;
        gap: 0.5rem;
        margin-left: 12px;
    }
    .header-buttons a {
        background: var(--secondary);
        color: var(--white);
        padding: 0.3rem 0.5rem;
        border-radius: 5px;
        text-decoration: none;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.3rem;
        transition: var(--transition);
    }
    .header-buttons a img {
        height: 32px;
        border-radius: 25em;
    }
    .header-buttons a:hover {
        background: var(--accent);
        transform: translateY(-2px);
    }
    .header-buttons svg {
        width: 1rem;
        height: 1rem;
        fill: var(--white);
    }
    .news-text p {
        font-size: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        line-clamp: 4;
        box-orient: vertical;
    }
    .main-content {
        padding: 1.5rem;
    }
    .section, .main-content {
        border-radius: 8px;
    }
    .mobile-buttons, .mobile-currency {
        display: none;
    }
    .container {
        gap: 1.5rem;
        margin: 1.5rem auto;
        padding: 0 1rem;
        grid-template-columns: 3fr 1fr;
    }
}
.currency-block {
    display: flex;
    justify-content: space-around;
}
.currency-block h3 {
    width: auto;
    font-size: 18px;
}
.mobile-currency h1 {
    font-size: 20px;
    line-height: 1;
    text-align: center;
}
.currency-block-text {
    text-align: center;
    margin: auto;
}
.currency .currency-block-text h3 {
    font-size: 16px;
}
.currency-block-text-v {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.currency-flag {
    width: 30px;
    height: 20px;
    margin-left: 3px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.currency-block-text-v h3 {
    margin: 0;
    font-size: 15px;
    white-space: nowrap;
}
.currency-block-text-v-inner {
    display: flex;
    justify-content: space-around;
}
@media(max-width: 450px) {
    .currency-block-text-v {
        text-align: center;
        display: block;
        justify-content: center;
        gap: 0.3rem;
    }
    .currency-flag {
        width: 20px;
        height: 14px;
    }
    .currency-block-text-v h3 {
        font-size: 16px;
    }
}
.logo-container {
    position: relative;
    display: inline-block;
}
.header-buttons .tglg {
    height: 12px;
    margin: 0 4px;
    color: var(--white);
}
/* Попапы */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 0;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
    overflow-y: auto;
}
.popup-close {
    position: fixed;
    right: 16px;
    font-size: 50px;
    cursor: pointer;
    color: #333;
}
.popup-close-back {
    position: relative;
}
.popup-image {
    text-align: center;
    margin-bottom: 20px;
}
.popup-image img, .popup-image video {
    max-height: 80vh;
    object-fit: contain;
    max-width: 100%;
    height: auto;
}
.popup-image img {
    border-radius: 10px;
}
#popup-content {
    padding: 2em;
    text-align: left;
}
#popup-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}
#popup-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}
.popup-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.discuss-btn {
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    margin-top: 1rem;
}
.discuss-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .popup {
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    #popup-content h2 { font-size: 20px; }
    #popup-content p { font-size: 17px; }
    .popup-content { text-align: left; }
    .popup-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(200, 200, 200, 0.8);
        border-radius: 50%;
        font-size: 28px;
        line-height: 1;
        top: 20px;
        z-index: 10000;
    }
    .discuss-btn { font-size: 17px; width: 100%; }
}
@media (min-width: 769px) and (max-width: 1020px) {
    .popup {
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 90%; max-height: 80vh;
    }
    #popup-content h2 { font-size: 20px; }
    #popup-content p { font-size: 19px; }
    .popup-content { text-align: left; }
    .popup-close { display: block; }
}
@media (min-width: 1021px) {
    .popup {
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 80%; max-height: 90vh;
        border-radius: 10px;
    }
    .popup-content { flex-direction: row; gap: 2rem; }
    #popup-content h2 { font-size: 28px; }
    #popup-content p { font-size: 18px; }
    .popup-image, .popup-text { flex: 2; }
    .popup-close { display: block; }
}
@media (min-width: 769px) {
    .popup-text p { margin-right: 12px; }
    .popup-text, .popup-image { flex: 1; }
}
/* Кнопки и системные */
.news-item { transition: 0.3s ease; }
.news-item.hidden { opacity: 0; }
.refresh-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: var(--white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 1001;
}
.refresh-btn.visible {
    opacity: 1 !important;
    display: block !important;
    pointer-events: auto;
}
.refresh-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}
/* Загрузка */
.loading-screen {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #1a2a5c;
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--white);
    border-radius: 50%;
    width: 50px; height: 50px;
    animation: spin 1s linear infinite;
}
.offline-message, .no-js-message {
    padding: 1em;
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #1a2a5c;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 9998; display: none;
    color: var(--white);
}
.offline-message h2, .no-js-message h2 {
    color: var(--white);
    margin-bottom: 1rem; font-size: 1.5rem;
}
.offline-message p, .no-js-message p {
    color: rgba(255,255,255,0.8); font-size: 1rem;
}
.offline-message.visible, .no-js-message.visible { display: flex; }
img { pointer-events: none; }
/* Скелетоны */
.news-item.loading {
    position: relative; min-height: 200px;
    background: var(--white); border-radius: 10px;
    box-shadow: var(--shadow); overflow: hidden;
}
.news-item.loading::before {
    content: ''; position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(30, 52, 124, 0.05) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.news-item.loading .news-text { padding: 1rem; }
.news-item.loading .news-text p {
    height: 1em; background: #e4e8f2;
    margin-bottom: 0.5em; border-radius: 4px;
}
.news-item.loading .news-text p:nth-child(1) { width: 80%; }
.news-item.loading .news-text p:nth-child(2) { width: 60%; }
.news-item.loading .news-text p:nth-child(3) { width: 40%; }
.news-image-container {
    position: relative; width: 150px; height: 150px;
    border-radius: 8px; overflow: hidden; background: #e4e8f2;
}
.news-image-container.loading { position: relative; }
.news-image-container.loading::before {
    content: ''; position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}
.news-image-container img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
/* Слайдер медиа */
.media-slider { position: relative; width: 100%; max-width: 600px; }
.slider-content { width: 100%; text-align: center; }
.slider-content img, .slider-content video, .single-photo {
    max-width: 100%; max-height: 400px;
    object-fit: contain; cursor: pointer; pointer-events: all;
}
.slider-prev, .slider-next {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 52, 124, 0.7);
    border: none; border-radius: 50%;
    width: 40px; height: 40px; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    transition: background 0.3s ease;
}
.slider-prev:hover, .slider-next:hover { background: rgba(30, 52, 124, 0.9); }
.slider-prev:disabled, .slider-next:disabled { opacity: 0.5; cursor: not-allowed; }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.media-thumbs {
    display: flex; justify-content: center;
    gap: 10px; margin-top: 10px;
}
.media-thumbs .thumb {
    width: 60px; height: 60px; object-fit: cover;
    border: 2px solid transparent; border-radius: 4px;
    cursor: pointer; transition: border 0.3s ease;
}
.media-thumbs .thumb.active { border-color: var(--primary); }
.video-preview { position: relative; display: inline-block; width: 100%; }
.video-preview img { width: 100%; height: auto; border-radius: 8px; }
.play-button {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: rgba(30, 52, 124, 0.7);
    border-radius: 50%; cursor: pointer;
}
.play-button:hover { background: rgba(30, 52, 124, 0.9); }
.play-button::before {
    content: ''; position: absolute;
    top: 50%; left: 55%;
    transform: translate(-50%, -50%);
    width: 0; height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}
/* Полноэкранный режим */
.fullscreen-media {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
}
.fullscreen-img, .fullscreen-media video {
    max-width: 90%; max-height: 90%;
    object-fit: contain; cursor: pointer;
}
.fullscreen-close, .zoom-close {
    position: absolute; top: 20px; right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none; color: white;
    font-size: 24px; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer;
    transition: background 0.3s ease;
}
.fullscreen-close:hover, .zoom-close:hover { background: rgba(0, 0, 0, 0.9); }
.zoom-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex; align-items: center; justify-content: center;
    z-index: 3000;
}
.popup-image img, .fullscreen-media img, .fullscreen-media video { pointer-events: all; }
.onesignal-bell-container { display: none !important; }
/* PWA */
.pwa-prompt {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(26, 42, 92, 0.95);
    color: white; padding: 15px; z-index: 1000;
    display: none; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}
.pwa-prompt-content {
    max-width: 600px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 10px;
}
.pwa-prompt p { margin: 0; font-size: 14px; line-height: 1.4; }
.pwa-buttons { display: flex; gap: 10px; justify-content: flex-end; }
.pwa-install-btn {
    background: var(--white); color: var(--primary);
    border: none; padding: 8px 16px; border-radius: 4px;
    cursor: pointer; font-size: 14px; font-weight: 600;
    transition: background 0.3s;
}
.pwa-install-btn:hover { background: #e4e8f2; }
.pwa-prompt-close {
    background: transparent; color: white;
    border: 1px solid white; padding: 8px 16px;
    border-radius: 4px; cursor: pointer; font-size: 14px;
    transition: all 0.3s;
}
.pwa-prompt-close:hover { background: rgba(255, 255, 255, 0.1); }
.pwa-guide {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8); z-index: 1001;
    display: none; justify-content: center; align-items: center;
}
.pwa-guide-content {
    background: white; padding: 20px; border-radius: 8px;
    max-width: 90%; width: 400px; position: relative;
}
.pwa-guide-content h3 { margin: 0 0 15px 0; color: var(--primary); }
.install-instructions {
    margin-bottom: 15px; padding: 10px;
    background: #f0f2f8; border-radius: 4px;
}
.install-instructions p { margin: 0; font-size: 14px; line-height: 1.4; color: #333; }
.pwa-guide-close {
    background: var(--primary); color: white;
    border: none; padding: 8px 16px; border-radius: 4px;
    cursor: pointer; font-size: 14px; width: 100%;
    transition: background 0.3s;
}
.pwa-guide-close:hover { background: var(--secondary); }
.pwa-prompt.show { display: block; animation: slideUp 0.3s ease-out; }
.pwa-guide.show { display: flex; animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
    .pwa-prompt-content { flex-direction: column; text-align: center; }
    .pwa-prompt-content p { margin-bottom: 10px; }
}
@media(min-width: 601px) { .hidden-pc { display: none; } }
@media(min-width: 767px) { .wrapper { min-height: calc(100vh - 122px); } }
@media(max-width: 768px) { .wrapper { min-height: calc(100vh - 92px); } }
.wrapper { display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.news-text p {
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-clamp: 4;
    box-orient: vertical;
}
@media(max-width: 390px) {
    .mobile-currency h1 { font-size: 18px; }
    .header-buttons a h3, .mobile-currency h1 { font-size: 14px; }
}
@media(max-width: 350px) {
    .mobile-buttons { padding: 0; }
    .header-buttons a img { height: 40px; }
}
@media(max-width: 320px) { .currency-block-text-v h3 { font-size: 16px; } }
.header-buttons a:hover { background: var(--dop); }
/* Форматирование текста */
blockquote { margin: 10px 0; padding: 10px; border-left: 4px solid var(--primary); background: #edf0f8; border-radius: 10px; }
b { font-weight: bold; }
i { font-style: italic; }
u { text-decoration: underline; }
s { text-decoration: line-through; }
code { font-family: monospace; background: #f0f0f0; padding: 2px; }
a { color: var(--primary); text-decoration: underline; }
.alert.alert-info { border-left: 8px solid var(--primary); }
