/* === (v51.0 FINAL CLEAN: NO DUPLICATES + TERMINAL FIX) === */

/* =========================================== */
/* === 1. ЗМІННІ ТА ТЕМИ === */
/* =========================================== */

:root {
  --nav-height: 56px;
}

body.light-mode {
    --bg: #f8f9fa;
    --card: #ffffff;
    --ink: #212529;
    --muted: #6c757d;
    --line: #dee2e6;
    --accent: #0056b3;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --card-translucent: rgba(255,255,255,0.95);
    --nav-active-bg: #e9ecef;
    --card-news-bg: #f8f9fa;
    --vpn-btn-color: #ffffff;
    --input-bg: #ffffff;
    --source-color: #adb5bd;
}

body {
  --bg: #0d1117;
  --card: #161b22;
  --ink: #e6edf3;
  --muted: #8b949e;
  --line: #30363d;
  --accent: #58a6ff;
  --danger: #d9534f;
  --success: #238636;
  --warning: #d29922;
  --card-translucent: rgba(13,17,23,0.95);
  --nav-active-bg: #21262d;
  --card-news-bg: #0f1418;
  --vpn-btn-color: var(--bg);
  --input-bg: #0d1117;
  --source-color: #484f58;
}

/* =========================================== */
/* === 2. БАЗОВІ СТИЛІ === */
/* =========================================== */

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

p { line-height: 1.6; }
h1, h2, h3 { color: var(--accent); }
h1, .h1 { margin-top: 10px; margin-bottom: 2px; }

/* Ховаємо заголовок "Останні пости" */
#newsTitle { display: none !important; }

main { flex: 1; max-width: 900px; width: 100%; margin: 0 auto; padding: 1rem; }

footer {
  text-align: center; font-size: 0.8rem; color: var(--muted); padding: 1rem;
  border-top: 1px solid var(--line); margin-top: 2rem;
}

/* === HEADER === */
header:not(.about-header) {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem; position: relative; z-index: 30; max-width: 100%;
}

.news-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem 2%;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.site-title { flex: 1; text-align: center; margin: 0; order: 2; }
#siteMain { font-size: 3rem; color: var(--accent); margin: 0; line-height: 1.1; animation: pulse-text-glow 2s infinite ease-in-out; }
#siteTitle { margin-top: 5px; font-size: 0.9rem; color: var(--muted); letter-spacing: 1px; }

/* =========================================== */
/* === 3. НАВІГАЦІЯ === */
/* =========================================== */

nav {
  position: sticky; top: 0;
  background: var(--card-translucent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  height: var(--nav-height); z-index: 1000; transition: height 0.3s ease;
  padding: 0;
}

nav.alert-nav-state {
    border-bottom: 2px solid var(--danger) !important;
    animation: nav-border-pulse 2s infinite;
}

.nav-inner {
  max-width: 900px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between; padding: 15px 1rem;
  min-height: 60px;
}

.nav-group-left { display: flex; align-items: center; }
.nav-group-right { display: flex; align-items: center; gap: 0.8rem; margin-left: auto; }
.nav-main-links { display: flex; align-items: center; gap: 0.6rem; }

.nav-group-right a, .nav-btn-icon, .nav-btn-logout {
  color: var(--ink); text-decoration: none; padding: 0.35rem 0.6rem;
  border: 1px solid var(--line); border-radius: 6px; white-space: nowrap;
  background: transparent; cursor: pointer; font-size: 1rem;
  transition: background 0.2s; display: inline-flex; align-items: center; justify-content: center;
}
.nav-group-right a.active, .nav-group-right a:hover, .nav-btn-icon:hover { background: var(--nav-active-bg); }

/* Кнопка VPN (Fix) */
.nav-btn-vpn {
    background-color: var(--accent, #3498db) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 25px !important;
    font-weight: bold; text-transform: uppercase; font-size: 0.9rem;
    position: relative; transition: all 0.3s ease;
    animation: vpn-pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none !important;
}
.nav-btn-vpn:hover {
    transform: scale(1.05); background-color: #fff !important; color: var(--accent, #3498db) !important;
}

.nav-alert-btn {
    display: flex; align-items: center; gap: 8px; background-color: var(--danger) !important; color: white !important;
    border: 1px solid var(--danger) !important; font-weight: bold; text-transform: uppercase;
    padding: 0.35rem 0.8rem; border-radius: 6px; text-decoration: none; cursor: pointer;
}
.nav-alert-btn .icon-pulse { animation: spin-pulse 2s infinite linear; }
.nav-divider { width: 1px; height: 24px; background-color: var(--line); margin: 0 5px; }
.mobile-menu-btn { display: none !important; font-size: 1.3rem; padding: 0.4rem 0.7rem; }
#langBtn { background-color: var(--nav-active-bg); border: 1px solid var(--line); color: var(--ink); padding: 0.35rem 0.6rem; font-weight: bold; }
.nav-btn-icon { width: 2.2rem; height: 2.2rem; padding: 0; }
.nav-btn-logout { background-color: var(--danger); color: white !important; border-color: var(--danger) !important; width: 2.2rem; height: 2.2rem; padding: 0; }
#themeToggleBtn .fas { display: inline-block; }
#themeToggleBtn .fa-sun { display: none; }
body.light-mode #themeToggleBtn .fa-moon { display: none; }
body.light-mode #themeToggleBtn .fa-sun { display: inline-block; }

/* =========================================== */
/* === 4. КОМПОНЕНТИ (Погода, Категорії) === */
/* =========================================== */

/* Блок погоди (Ізольований стиль) */
.weather-info {
    order: 1; display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, 0.05); padding: 8px 16px; border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1); font-size: 1rem; position: relative; white-space: nowrap;
    color: var(--ink); box-shadow: 0 2px 5px rgba(0,0,0,0.1); width: auto;
}
.weather-info #weatherIcon { font-size: 1.4rem; margin-right: 5px; }
.weather-info #weatherTemp { font-weight: bold; font-size: 1.1rem; margin-right: 5px;}
.weather-info #weatherCondition { color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }

.city-selector-container { position: relative; margin-left: auto; padding-left: 8px; border-left: 1px solid var(--line); display: inline-flex; align-items: center; }
button#cityBtn {
  background: transparent !important; border: none !important; box-shadow: none !important;
  color: var(--accent) !important; padding: 0 5px !important; margin: 0 !important; width: auto !important;
  font-weight: bold; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.city-dropdown {
  display: none; position: absolute; top: 140%; right: -5px; min-width: 140px; background-color: var(--card);
  border: 1px solid var(--accent); border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  z-index: 9999; padding: 5px 0; text-align: left;
}
.city-dropdown a { display: block; padding: 8px 15px; color: var(--ink); text-decoration: none; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.city-dropdown a:hover { background-color: var(--nav-active-bg); color: var(--accent); }
.city-dropdown a.active { background-color: var(--accent); color: white; }

/* Лічильник війни */
.war-counter {
    order: 3; margin-top: 0; font-family: 'Courier New', monospace; color: #aaa; font-size: 0.9rem;
    text-align: right; display: flex; flex-direction: column; align-items: flex-end; width: auto; background: transparent; border: none; box-shadow: none;
}
.war-line-1 { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.war-days { font-weight: bold; color: var(--danger); font-size: 1.2rem; }
.war-line-2 { font-size: 0.75rem; color: var(--muted); text-align: center; }

/* Категорії */
.cats-container { text-align: center; position: relative; margin-top: 0; }
.cats {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 12px 0 18px 0; position: sticky; top: 56px; z-index: 25;
  padding: 8px 0; background: var(--card-translucent); border-bottom: 1px solid var(--line); min-height: 45px;
}
.cat-btn { background: var(--card); color: var(--ink); border: 1px solid var(--line); padding: .35rem .6rem; border-radius: 6px; text-decoration: none; white-space: nowrap; }
.cat-btn.active { background: var(--accent); color: var(--vpn-btn-color); border-color: transparent; }
.cat-btn-project { color: var(--accent); border: 2px solid var(--accent); font-weight: 700; animation: pulse-box-glow 2s infinite ease-in-out; }
.cat-btn-health { color: var(--success); border: 2px solid var(--success); font-weight: 700; animation: pulse-health-glow 2s infinite ease-in-out; }

/* Категорія Війна */
.cat-btn-war {
    border-color: #ff4444 !important; color: #ff4444 !important; background: rgba(255, 68, 68, 0.05);
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.2); position: relative; overflow: hidden; font-weight: bold;
}
.cat-btn-war:hover, .cat-btn-war.active {
    background-color: #ff4444 !important; color: #fff !important; box-shadow: 0 0 15px rgba(255, 68, 68, 0.6);
    border-color: #ff4444 !important; transform: translateY(-2px);
}
.cat-btn-war::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg); animation: war-glint 3s infinite;
}
@keyframes war-glint { 0% { left: -100%; } 20% { left: 100%; } 100% { left: 100%; } }


/* =========================================== */
/* === 5. VPN, FORMS & OTHERS === */
/* =========================================== */
.vpn-intro { text-align: center; padding: 40px 20px; max-width: 800px; margin: 0 auto; }
.vpn-intro h1 { font-size: 2.5rem; margin-bottom: 15px; color: #fff; }
.vpn-intro p { font-size: 1.1rem; color: #bbb; line-height: 1.6; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin: 40px 0; padding: 0 10px; }
.feature-item {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px;
    padding: 25px; display: flex; flex-direction: column; align-items: flex-start; transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.feature-item:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.07); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.feature-icon {
    font-size: 2.5rem; color: var(--accent); margin-bottom: 15px; background: rgba(255, 255, 255, 0.05);
    padding: 15px; border-radius: 12px; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
}
.feature-text h4 { margin: 0 0 10px 0; font-size: 1.3rem; color: #fff; }
.feature-text p { margin: 0; font-size: 0.95rem; color: #aaa; line-height: 1.5; }

.tariffs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.tariff-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; text-align: center; transition: transform 0.2s ease; }
.tariff-card .price { font-size: 2.2rem; font-weight: bold; color: var(--accent); margin: 0.5rem 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; background-color: var(--accent); color: #ffffff !important; text-decoration: none; border-radius: 8px; font-weight: 600; border: 1px solid transparent; transition: all 0.2s ease; cursor: pointer; font-size: 1rem; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); opacity: 0.9; }
.btn-success { background-color: var(--success); border-color: var(--success); }
.btn-secondary { background-color: var(--nav-active-bg); color: var(--ink) !important; border: 1px solid var(--line); }
.btn-secondary:hover { background-color: var(--line); }

/* ФОРМИ */
.contact-form-section, .form-container {
    margin-top: 3rem; max-width: 500px; margin-left: auto; margin-right: auto;
    background-color: var(--card); padding: 2rem; border-radius: 12px;
    border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.contact-form-section h2, .form-container h1, .form-container h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.8rem; color: var(--accent); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: var(--ink); font-size: 1rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px;
    background-color: var(--input-bg); color: var(--ink); font-size: 1rem;
    font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2); }
#submitBtn, .form-container button[type="submit"] {
    width: 100%; padding: 14px; font-size: 1.1rem; text-transform: uppercase;
    letter-spacing: 1px; background-color: var(--accent); color: #fff;
    border: none; border-radius: 8px; cursor: pointer; font-weight: bold;
    transition: background-color 0.2s, transform 0.1s; margin-top: 10px;
}
#submitBtn:hover, .form-container button[type="submit"]:hover { background-color: #4091e8; transform: translateY(-2px); }
.form-link { text-align: center; margin-top: 1.5rem; font-size: 0.95rem; }
.form-link p { margin: 0.5rem 0; }
.form-link a { color: var(--accent); text-decoration: none; font-weight: 600; }
.form-link a:hover { text-decoration: underline; }


/* =========================================== */
/* === 6. СТОРІНКА 'ABOUT ME' === */
/* =========================================== */
.about-header {
    display: block; text-align: center; padding: 3rem 1rem 2rem 1rem; margin-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}
.about-header .avatar {
    width: 160px; height: 160px; border-radius: 50%; border: 4px solid var(--accent);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.2); object-fit: cover; display: block;
    margin: 0 auto 1.5rem auto; transition: transform 0.3s ease;
}
.about-header .avatar:hover { transform: scale(1.05) rotate(2deg); }
.about-header h1 { margin: 0.5rem 0; font-size: 2.5rem; color: var(--ink); font-weight: 800; }
.about-header h2 {
    color: var(--accent); font-weight: normal; margin-top: 0; font-size: 1.2rem;
    opacity: 0.9; text-transform: uppercase; letter-spacing: 1px;
}
.skills { margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills span {
    display: inline-block; background-color: var(--nav-active-bg); color: var(--ink);
    padding: 0.4rem 0.8rem; border-radius: 6px; font-size: 0.9rem; font-weight: 600;
    border: 1px solid var(--line); transition: all 0.2s ease;
}
.skills span:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.contacts { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.contacts a {
    display: inline-flex; align-items: center; padding: 0.7rem 1.2rem; color: #fff;
    text-decoration: none; border-radius: 8px; font-weight: bold;
    transition: opacity 0.2s ease, transform 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.contacts a:hover { opacity: 0.9; transform: translateY(-2px); }
.contacts a.email { background-color: var(--success); }
.contacts a.telegram { background-color: #229ED9; }
.contacts a.linkedin { background-color: #0a66c2; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.service-item { display: flex; align-items: flex-start; background-color: var(--card); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--line); height: 100%; }
.service-icon { font-size: 1.8rem; color: var(--accent); margin-right: 1rem; flex-shrink: 0; margin-top: 3px; }
.service-text h4 { margin: 0 0 0.5rem 0; color: var(--ink); font-size: 1.1rem; font-weight: bold; }
.service-text p { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.support { text-align: center; margin: 4rem 0 2rem 0; padding-top: 2rem; border-top: 1px dashed var(--line); }
.support h2 { margin-bottom: 1.5rem; font-size: 1.4rem; }
.support-row { display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }
.donate-btn {
    width: 70px; height: 70px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 2px solid var(--line); background-color: var(--card);
    transition: transform 0.2s ease, border-color 0.2s ease; text-decoration: none;
}
.donate-btn img { width: 36px; height: 36px; object-fit: contain; }
.donate-btn:hover { transform: scale(1.15); }
.donate-btn.patreon:hover { border-color: #F96854; background: rgba(249,104,84, 0.1); }
.donate-btn.paypal:hover { border-color: #0070BA; background: rgba(0,112,186, 0.1); }
.donate-btn.mono:hover { border-color: #000; background: #fff; }

/* =========================================== */
/* === 7. НОВИНИ (Compact + Bold + Source) === */
/* =========================================== */

.news {
    background-color: var(--card-news-bg); padding: 1rem; border-radius: 10px;
    border: 1px solid var(--line); display: flex; flex-direction: column;
}
.news ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.news-item-row {
    display: flex !important; flex-direction: row !important; align-items: baseline;
    padding: 8px 0; border-bottom: 1px solid var(--line); width: 100%;
}
.news-item-row:last-child { border-bottom: none; }
.news-time-col {
    flex: 0 0 55px; text-align: right; padding-right: 12px; font-size: 0.9rem;
    color: var(--accent); font-weight: 600; white-space: nowrap;
}
.news-title-col { flex: 1; min-width: 0; line-height: 1.4; }
.news-link-item { text-decoration: none; color: var(--ink); font-size: 1.05rem; font-weight: 700; display: block; line-height: 1.45; }
.news-link-item:hover { color: var(--accent); }
.news-link-item:visited { color: var(--muted); font-weight: 500; }
.news-icon { margin-right: 6px; font-size: 0.9em; vertical-align: middle; opacity: 0.9; }
.news-source-tag {
    display: inline-block; font-size: 0.75rem; text-transform: uppercase;
    color: var(--source-color); background-color: var(--nav-active-bg);
    padding: 1px 5px; border-radius: 4px; margin-right: 6px;
    vertical-align: middle; font-weight: 600; letter-spacing: 0.5px;
    border: 1px solid var(--line);
}

/* =========================================== */
/* === 8. МОДАЛЬНЕ ВІКНО (ЗАГАЛЬНЕ) === */
/* =========================================== */

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; bottom: 0; right: 0;
    width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7);
    z-index: 9999; align-items: center; justify-content: center;
}
.modal-overlay.is-active { display: flex !important; opacity: 1; visibility: visible; }
.modal-content {
    background: var(--card); padding: 2rem; border-radius: 10px;
    max-width: 500px; width: 90%; position: relative; color: var(--ink);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); border: 1px solid var(--line);
}
.modal-close {
    position: absolute; top: 8px; right: 10px; width: 30px; height: 30px;
    background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.6rem;
}

/* =========================================== */
/* === 9. АДМІН ПАНЕЛЬ === */
/* =========================================== */

.admin-nav {
    display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
    padding-bottom: 10px; overflow-x: auto; white-space: nowrap;
}
.nav-tab {
    padding: 8px 16px; background: var(--card); border: 1px solid var(--line);
    border-radius: 6px; text-decoration: none; color: var(--ink);
    font-size: 0.95rem; font-weight: 600; transition: all 0.2s ease;
}
.nav-tab:hover { background: var(--nav-active-bg); border-color: var(--accent); }
.nav-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
.admin-table-container {
    width: 100%; overflow-x: auto; margin-top: 1rem; border-radius: 10px;
    border: 1px solid var(--line); background-color: var(--card); box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background-color: var(--nav-active-bg); color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; }
tr:hover { background-color: rgba(88, 166, 255, 0.05); }
.action-buttons { white-space: nowrap; }
.btn-action {
    display: inline-block; padding: 5px 10px; font-size: 0.8rem; border-radius: 4px;
    text-decoration: none; color: white !important; margin-right: 4px; font-weight: 600; transition: opacity 0.2s;
}
.btn-action:hover { opacity: 0.85; }
.btn-edit { background-color: var(--accent); }
.btn-delete { background-color: var(--danger); }
.btn-reset { background-color: var(--muted); }

/* =========================================== */
/* === 10. МОБІЛЬНА ВЕРСІЯ === */
/* =========================================== */

@media (max-width: 900px) {
    .mobile-menu-btn { display: block !important; }
    .nav-alert-btn .alert-text { display: none; }
    .nav-alert-btn { padding: 0.4rem; }
    .news-header { flex-direction: column; gap: 20px; }
    .site-title { order: 1; }
    .weather-info { order: 2; width: auto; justify-content: center; }
    .war-counter { order: 3; align-items: center; text-align: center; }

    /* Меню */
    .nav-main-links {
        display: none; position: absolute; top: var(--nav-height); left: 0; width: 100%;
        flex-direction: column; background-color: var(--card);
        padding: 1.5rem; border-bottom: 1px solid var(--line);
        box-shadow: 0 10px 20px rgba(0,0,0,0.3); align-items: stretch; gap: 10px; z-index: 1000;
    }
    .nav-main-links.active { display: flex; animation: slideDown 0.3s ease; }
    @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
    .nav-main-links a { text-align: left; padding: 12px 15px; font-size: 1.1rem; border: 1px solid var(--line); background: var(--bg); display: block; width: 100%; }

    .nav-divider { display: none; }

    /* ФІКС: КАТЕГОРІЇ */
    .cats {
        position: static !important; top: auto !important;
        display: flex !important; flex-wrap: nowrap !important;
        overflow-x: auto !important; justify-content: flex-start !important;
        padding: 10px 5px; scrollbar-width: none; border-bottom: none;
    }
    .cats::-webkit-scrollbar { display: none; }
    .cat-btn { flex: 0 0 auto !important; margin-right: 5px; }
    .cats-container { position: static !important; top: auto !important; background: transparent; }
    .cats-container::after { display: none; }

    /* Інші фікси */
    .site-title { display: none !important; }
    header:not(.about-header) { flex-direction: column; gap: 10px; padding: 10px 0; }
    .about-header h1 { font-size: 2rem; }
    .about-header .avatar { width: 120px; height: 120px; }
    .services-grid { grid-template-columns: 1fr; }
    .contacts { flex-direction: column; }
    .contacts a { width: 100%; text-align: center; justify-content: center; }
    main { padding: 0 10px; }
    .news { margin: 0 -10px; border-radius: 0; border-left: none; border-right: none; }
    .modal-content { width: 95%; max-height: 85vh; overflow-y: auto; }

    .news-item-row { padding: 10px 0; align-items: flex-start; }
    .news-time-col { flex: 0 0 45px; padding-right: 8px; font-size: 0.8rem; margin-top: 3px; }
    .news-link-item { font-size: 0.95rem; font-weight: 600; }
    .news-source-tag { font-size: 0.65rem; padding: 0 3px; }
    
    .features-grid { grid-template-columns: 1fr; }
    .vpn-intro h1 { font-size: 1.8rem; }
}

/* Анімації */
@keyframes nav-border-pulse {
    0% { box-shadow: 0 4px 5px rgba(220, 53, 69, 0.1); border-bottom-color: var(--danger); }
    50% { box-shadow: 0 4px 20px rgba(220, 53, 69, 0.6); border-bottom-color: #ff4d4d; }
    100% { box-shadow: 0 4px 5px rgba(220, 53, 69, 0.1); border-bottom-color: var(--danger); }
}
@keyframes pulse-text-glow { 0%, 100% { text-shadow: 0 0 5px rgba(88, 166, 255, 0.5); } 50% { text-shadow: 0 0 15px rgba(88, 166, 255, 0.9); } }
@keyframes pulse-vpn { 0% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(88, 166, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0); } }
@keyframes spin-pulse { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =========================================== */
/* === 11. ПОГОДНІ ЕФЕКТИ (WEATHER FX) === */
/* =========================================== */

#weather-fx {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1; overflow: hidden; display: none;
}

/* --- ДОЩ (RAIN) --- */
body.weather-rain #weather-fx {
    display: block; opacity: 1;
    background-image: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.4));
    background-size: 1px 100px;
    animation: rain-fall 0.8s linear infinite;
}
body.light-mode.weather-rain #weather-fx {
    background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.3));
}
@keyframes rain-fall { 0% { background-position: 0 0; } 100% { background-position: 10px 100vh; } }

/* --- СНІГ (SNOW) --- */
body.weather-snow #weather-fx { display: block; opacity: 1; } /* Обробляється snow.js, тут тільки видимість */

/* --- ТУМАН (FOG) --- */
body.weather-fog #weather-fx,
body.weather-clouds #weather-fx {
    display: block;
    background: url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png') repeat-x;
    background-size: 200% auto; opacity: 0.4;
    animation: fog-anim 60s linear infinite;
}
body.weather-fog #weather-fx::after,
body.weather-clouds #weather-fx::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog2.png') repeat-x;
    background-size: 200% auto; opacity: 0.3;
    animation: fog-anim 40s linear infinite reverse;
}
@keyframes fog-anim { 0% { background-position: 0 0; } 100% { background-position: -200% 0; } }

/* --- ЯСКРАВИЙ ДЕНЬ (CLEAR) --- */
body.weather-clear #weather-fx {
    display: block;
    background: radial-gradient(circle at 50% -20%, rgba(255, 255, 200, 0.4), transparent 60%);
    animation: sun-pulse 10s ease-in-out infinite alternate;
}
@keyframes sun-pulse { 0% { opacity: 0.5; } 100% { opacity: 0.8; } }


/* =========================================== */
/* === 12. ПЛАВАЮЧІ СПОВІЩЕННЯ (Limits etc) === */
/* =========================================== */

.floating-notices-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 10000;
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.tg-blink-link {
    text-decoration: none; font-weight: bold; font-size: 1.1rem; color: #00e5ff;
    font-family: 'Courier New', monospace; letter-spacing: 1px; padding: 8px 12px;
    border: 1px solid transparent; border-radius: 5px;
    animation: blue-pulse 2s infinite alternate;
}
@keyframes blue-pulse {
    0% { opacity: 0.6; text-shadow: 0 0 2px #00e5ff; border-color: rgba(0, 229, 255, 0.3); }
    100% { opacity: 1; text-shadow: 0 0 10px #00e5ff, 0 0 20px #0000ff; border-color: #00e5ff; }
}
.tg-blink-link:hover { animation: none; text-shadow: 0 0 15px #00e5ff; transform: scale(1.05); cursor: pointer; }

.floating-notice {
    text-decoration: none; font-weight: bold; font-size: 1.1rem; padding: 8px 12px;
    border-radius: 5px; margin-top: 10px; cursor: pointer; text-align: center; transition: all 0.3s ease;
}
.notice-warning {
    color: #ff4444; background: rgba(255, 68, 68, 0.1); border: 1px solid #ff4444;
    animation: danger-pulse 2s infinite alternate;
}
.notice-warning:hover { background: #ff4444; color: white; box-shadow: 0 0 15px rgba(255, 68, 68, 0.6); }
@keyframes danger-pulse {
    0% { opacity: 0.6; text-shadow: 0 0 2px #ff4444; border-color: rgba(255, 68, 68, 0.3); }
    100% { opacity: 1; text-shadow: 0 0 10px #ff4444, 0 0 20px #ff0000; border-color: #ff4444; }
}


/* ========================================================= */
/* === 13. SIDEBARS & MOBILE WIDGETS (FIXED) === */
/* ========================================================= */

/* --- 1. МОБІЛЬНА ВЕРСІЯ --- */
.pc-sidebars-wrapper { display: none !important; }

.mobile-dashboard-wrapper {
    display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; width: 100%;
}
.mob-widget {
    background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    padding: 10px 15px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: background 0.2s;
}
.mob-widget:active { background-color: var(--nav-active-bg); }
.mob-widget.status-ok { border-color: var(--success); background: rgba(35, 134, 54, 0.05); }
.mob-icon { font-size: 1.2rem; color: var(--success); }
.mob-info { display: flex; flex-direction: column; line-height: 1.2; }
.mob-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; }
.mob-val { font-weight: bold; font-size: 1rem; color: var(--ink); display: flex; align-items: center; gap: 6px; }

.mob-donate-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5px; font-weight: bold; color: var(--muted);
}
.mob-don-icons { display: flex; gap: 15px; font-size: 1.2rem; }
.mob-don-icons a { color: var(--ink); }
.pulse-dot {
    display: inline-block; width: 8px; height: 8px; background: var(--success);
    border-radius: 50%; box-shadow: 0 0 5px var(--success); animation: pulse-dot-anim 1.5s infinite;
}
@keyframes pulse-dot-anim { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }


/* --- 2. ПК ВЕРСІЯ (ТІЛЬКИ ШИРОКІ ЕКРАНИ > 1350px) --- */
@media (min-width: 1350px) {

    .mobile-dashboard-wrapper { display: none !important; }

    .pc-sidebars-wrapper {
        display: flex !important; position: fixed; top: 85px; left: 0;
        width: 100%; height: 0; justify-content: center; z-index: 50;
        pointer-events: none;
    }

    .ds-panel {
        position: absolute; top: 0; width: 200px;
        background: var(--card); border: 1px solid var(--line); border-radius: 12px;
        padding: 15px; pointer-events: auto; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        transition: transform 0.3s ease, border-color 0.3s; cursor: pointer;
    }
    .ds-panel:hover { transform: translateY(-3px); border-color: var(--accent); }

    /* Позиціонування */
    .ds-left { right: 50%; margin-right: 470px; display: flex; align-items: center; gap: 10px; }
    .ds-right { left: 50%; margin-left: 470px; text-align: center; }

    /* Елементи панелей */
    .ds-icon { font-size: 1.5rem; color: var(--success); }
    .ds-content { display: flex; flex-direction: column; line-height: 1.2; text-align: left;}
    .ds-title { font-size: 0.7rem; color: var(--muted); letter-spacing: 1px; }
    .ds-status { font-weight: bold; font-size: 1.1rem; color: var(--ink); }
    .status-ok .ds-status { color: var(--success); }

    .ds-title-center { font-size: 0.8rem; font-weight: bold; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
    .ds-icons-grid { display: flex; justify-content: center; gap: 12px; }
    .ds-link { font-size: 1.3rem; color: var(--ink); transition: color 0.2s; }
    .ds-link:hover { color: var(--accent); }

    /* Нижні блоки */
    .ds-left-bottom {
        position: absolute; top: 240px; right: 50%; margin-right: 470px;
        width: 200px; background: var(--card); border: 1px solid var(--line);
        border-radius: 12px; padding: 12px; pointer-events: auto;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 8px;
    }
    .ds-right-bottom {
        position: absolute; top: 240px; left: 50%; margin-left: 470px;
        width: 200px; background: var(--card); border: 1px solid var(--line);
        border-radius: 12px; padding: 12px; pointer-events: auto;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.2s;
        display: flex; flex-direction: column; gap: 5px;
    }
    .ds-right-bottom:hover { transform: translateY(-3px); border-color: var(--accent); }

    .ds-mini-header { font-size: 0.75rem; color: var(--muted); font-weight: bold; margin-bottom: 4px; }
    .ds-divider { height: 1px; background: var(--line); margin: 5px 0; opacity: 0.5; }
    .ds-vpn-row { display: flex; align-items: center; gap: 10px; }
    .ds-vpn-icon { font-size: 1.6rem; color: var(--accent); }
}

/* Стилі для кнопок моніторингу (Зліва) */
.ds-quick-links { display: flex; flex-direction: column; gap: 8px; }
.ds-big-btn {
    display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px;
    text-decoration: none; font-weight: bold; font-size: 0.9rem; transition: transform 0.2s, opacity 0.2s; color: white;
}
.ds-big-btn:hover { transform: translateX(5px); opacity: 0.9; }
.ds-big-btn i { width: 20px; text-align: center; font-size: 1.1rem; }
.ds-big-btn.tg { background-color: #229ED9; }
.ds-big-btn.dtek { background-color: #ff6b01; }
.ds-big-btn.yasno { background-color: #2c2c2c; border: 1px solid #555; }

/* Стилі для Net Tools (Справа) */
.ds-net-input {
    width: 100%; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line);
    color: var(--ink); padding: 8px 10px; border-radius: 6px; font-size: 0.9rem;
    font-family: monospace; margin-bottom: 10px; outline: none;
}
.ds-net-input:focus { border-color: var(--accent); background: rgba(0, 0, 0, 0.4); }

.ds-buttons-row { display: flex; gap: 5px; }
.ds-tool-btn {
    flex: 1; background: transparent; border: 1px solid var(--accent);
    color: var(--accent); font-size: 0.75rem; font-weight: bold; cursor: pointer;
    padding: 6px 0; border-radius: 6px; transition: all 0.2s;
}
.ds-tool-btn:hover {
    background: var(--accent); color: white; box-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}

/* =========================================== */
/* === 14. ENERGY MODAL (Стиль вікна) === */
/* =========================================== */

.energy-modal-theme {
    text-align: center; border-top: 4px solid var(--accent); padding: 25px 20px; max-width: 450px;
}
.em-header { margin-bottom: 20px; }
.em-icon { font-size: 2.5rem; color: var(--warning); margin-bottom: 10px; }
.em-header h3 { margin: 5px 0; color: var(--ink); }
.em-status { color: var(--muted); font-size: 0.9rem; margin: 0; }
.em-section { margin-bottom: 20px; }
.em-city-title {
    font-size: 0.8rem; font-weight: bold; color: var(--muted);
    text-transform: uppercase; margin-bottom: 8px; letter-spacing: 1px;
    border-bottom: 1px solid var(--line); display: inline-block; padding-bottom: 3px;
}
.em-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.em-group-box {
    height: 35px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; font-weight: bold; color: white; font-size: 1rem; cursor: help;
    transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.em-group-box:hover { transform: scale(1.1); }
.em-group-box.on { background-color: var(--success); }
.em-group-box.off { background-color: var(--danger); }
.em-group-box.maybe { background-color: #6c757d; }
.em-footer { margin-top: 20px; padding-top: 15px; border-top: 1px dashed var(--line); }
.em-footer p { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.em-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.em-btn {
    padding: 8px 12px; border-radius: 6px; text-decoration: none;
    font-size: 0.85rem; font-weight: bold; color: white; transition: opacity 0.2s;
}
.em-btn:hover { opacity: 0.8; }
.em-btn.dtek { background: #ff6b01; }
.em-btn.dtek-obl { background: #e65100; }
.em-btn.yasno { background: #232323; border: 1px solid #555; }
.em-btn.tg { background: #229ED9; }

/* ========================================= */
/* === 15. TERMINAL / WHOIS MODAL FIX === */
/* ========================================= */

.net-tool-modal-content {
    background-color: #0d1117; /* GitHub Dark */
    border: 1px solid #30363d;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    
    /* РОЗМІРИ ТА СКРОЛ */
    width: 95%; /* Ширше на мобільних */
    max-width: 800px;
    height: auto;
    max-height: 85vh; /* Ніколи не вище 85% екрану */
    
    display: flex;
    flex-direction: column; /* Вертикальне розташування */
    position: relative;
    padding: 0 !important; /* ПРИБИРАЄМО ТОВСТІ РАМКИ */
    overflow: hidden; /* Ховаємо зовнішній скрол */
    
    /* Центрування (flex у батька .modal-overlay це зробить, але margin для страховки) */
    margin: auto; 
    animation: modal-pop 0.3s ease-out;
}

@keyframes modal-pop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.nt-header {
    flex: 0 0 auto; /* Не стискається */
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #30363d;
    background: #161b22;
}

.nt-title {
    color: var(--accent); font-family: monospace; font-weight: bold;
    font-size: 1rem; display: flex; align-items: center; gap: 10px;
}

.nt-close {
    background: none; border: none; color: #8b949e; font-size: 1.8rem;
    cursor: pointer; transition: color 0.2s; line-height: 0.5;
    padding: 0; margin: 0;
}
.nt-close:hover { color: #f85149; }

.nt-body {
    flex: 1 1 auto; /* Займає всю доступну висоту */
    padding: 0;
    overflow-y: auto; /* ВМИКАЄ СКРОЛ ВСЕРЕДИНІ */
    background: #0d1117;
}

.nt-output {
    margin: 0; padding: 15px;
    color: #3fb950;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap; /* Зберігає форматування */
    word-break: break-word; /* Переносить довгі рядки Whois */
    line-height: 1.4;
}

@keyframes text-pulse {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); text-shadow: 0 0 5px rgba(220, 53, 69, 0.4); }
    100% { opacity: 0.8; transform: scale(1); }
}
