/* ===== Base ===== */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Arial, sans-serif;
    padding: 0;
    margin: 0;
    background: #fff;
}

/* Контент */
.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.6;
    color: #000;
}

/* Последнее обновление */
.updated {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 30px;
}

/* ===== Language Panel ===== */
.lang-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Toggle button */
.lang-toggle {
    background: #f1f3f4;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    user-select: none;
    color: #000;
    transition: all 0.2s ease;
}

.lang-toggle:hover {
    background: #e8eaed;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Dropdown */
.lang-dropdown {
    display: none;
    margin-top: 10px;
    background: #f1f3f4;
    border-radius: 18px;
    padding: 14px;
    width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Open state */
.lang-panel.open .lang-dropdown {
    display: block;
}

/* Search box */
.lang-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 999px;
    border: none;
    outline: none;
    background: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    color: #000;
    box-sizing: border-box;
}

/* Language list */
.lang-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 360px;
    overflow-y: auto;
}

/* Language item */
.lang-list li {
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #000;
}

/* Hover effect */
.lang-list li:hover {
    background: #e8f0fe;
    transform: translateX(5px);
}

/* ===== Notification ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Reset Button ===== */
.reset-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 1px solid #dadce0;
    border-radius: 24px;
    cursor: pointer;
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.reset-btn:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    color: #1a73e8;
}

.reset-btn:active {
    transform: scale(0.95) translateY(0) !important;
}

/* ===== ПОЛНОСТЬЮ СКРЫВАЕМ GOOGLE TRANSLATE UI ===== */
#google_translate_element,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
body>.skiptranslate,
iframe.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-logo-link,
.goog-te-gadget,
.goog-te-gadget span,
div#goog-gt-,
#goog-gt-tt,
.goog-te-spinner-pos {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Убираем сдвиг страницы от Google Translate */
html,
body {
    top: 0 !important;
    position: static !important;
    margin-top: 0 !important;
}

body {
    position: relative !important;
}

/* Скрываем верхнюю панель Google Translate */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

/* Скрываем нижний правый виджет */
.goog-te-ftab {
    display: none !important;
}

/* ===== Dark mode ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f0f0f;
        color: #fff;
    }

    .content {
        color: #fff;
    }

    .updated {
        color: #b5b5b5;
    }

    .lang-toggle {
        background: #2a2a2a;
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .lang-toggle:hover {
        background: #3a3a3a;
    }

    .lang-dropdown {
        background: #1f1f1f;
    }

    .lang-search {
        background: #2a2a2a;
        color: #ffffff;
    }

    .lang-list li {
        color: #ffffff;
    }

    .lang-list li:hover {
        background: #2f3b52;
    }

    .reset-btn {
        background: rgba(42, 42, 42, 0.95);
        color: #ffffff;
        border-color: #444;
    }

    .reset-btn:hover {
        background: rgba(58, 58, 58, 0.95);
        color: #8ab4f8;
    }
}