/* Только тёмная тема */

:root {
    --bg-main: #020207;
    --bg-grad-1: #121221;
    --bg-grad-2: #080812;
    --bg-elevated: #14141f;
    --bg-elevated-soft: #1a1a27;

    --text-main: #e0e0e0;
    --text-muted: #8d8fa4;

    --accent: #4f9cff;
    --accent-soft: rgba(79, 156, 255, 0.16);

    --border-subtle: rgba(255, 255, 255, 0.05);
    --danger: #ff6b6b;

    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.85);

    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    height: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* Фиксированный фон */
.bg-layer {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% -10%, var(--bg-grad-1) 0, transparent 55%),
        radial-gradient(circle at 85% -10%, var(--bg-grad-2) 0, transparent 55%),
        radial-gradient(circle at 50% 120%, #050509 0, var(--bg-main) 70%);
    z-index: -1;
}

/* Контент прокручивается поверх */
body {
    width: 100%;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

body, p, li, h1, h2, h3, h4, h5 {
    color: var(--text-main);
}

/* Корневой контейнер */
.page-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-hidden {
    display: none;
}

/* Первый экран */
.hero-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
}

.hero-center {
    max-width: 960px;
    width: 100%;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.4rem, 4vw, 3.1rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 0.96rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 26px auto;
}

/* Основные карточки действий */
.actions-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.action-card {
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 16px 14px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    text-align: left;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    border-color: rgba(79, 156, 255, 0.45);
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.action-card h3 {
    font-size: 0.98rem;
    margin-bottom: 3px;
}

.action-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Кнопка-призыв прокрутить вниз */
.scroll-hint {
    margin: 2px auto 0 auto;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-hint i {
    font-size: 0.9rem;
}

.scroll-hint:hover {
    opacity: 1;
    transform: translateY(2px);
}

/* Детальная часть страницы */
.details {
    padding: 30px 14px 26px 14px;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

.details-section {
    margin-bottom: 26px;
}

.details-section h2 {
    font-size: 1.18rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-section h2 i {
    color: var(--accent);
}

.details-block {
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    margin-bottom: 8px;
}

.details-block h3 {
    font-size: 0.98rem;
    margin-bottom: 5px;
}

.details-block p {
    font-size: 0.88rem;
}

.details-block ul {
    margin-left: 18px;
    margin-top: 4px;
    font-size: 0.88rem;
}

.details-block li {
    margin-bottom: 4px;
}

/* Доп. текст */
.small-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Списки сервисов */
.tag-list {
    list-style: disc;
    margin-left: 18px;
    font-size: 0.88rem;
}

.tag-list li {
    margin-bottom: 4px;
}

/* Ссылки */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
.page-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    margin-top: 16px;
    font-size: 0.78rem;
    text-align: center;
}

.footer-line {
    color: rgba(170, 172, 196, 0.38);
    letter-spacing: 0.03em;
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 2, 8, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 1000;
}

/* по умолчанию модалки скрыты, пока JS не инициализируется */


.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-window {
    width: min(540px, 92vw);
    max-height: 85vh;
    background: #14141f;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
}

.modal-header h2 {
    font-size: 1.02rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header i {
    color: var(--accent);
}

.modal-body {
    padding: 12px 16px 14px 16px;
    font-size: 0.88rem;
    overflow-y: auto;
}

.modal-body p {
    margin-bottom: 8px;
}

.modal-body ul {
    margin-left: 18px;
    margin-bottom: 8px;
}

.modal-body li {
    margin-bottom: 3px;
}

.modal-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 8px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Кнопки */
.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Кнопка закрытия модали */
.close-modal {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
}

/* Адресные блоки */
.addr-block {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.addr-block:last-child {
    border-bottom: none;
}

.addr-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.addr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1b1b28;
    border-radius: var(--radius-sm);
    padding: 7px 9px;
    border: 1px solid var(--border-subtle);
}

.addr-row code {
    font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    word-break: break-all;
}

.copy-btn {
    border: none;
    background: #242436;
    color: var(--text-main);
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
}

.copy-btn:hover {
    background: #303048;
}

.addr-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Источники */
.source-list {
    list-style: disc;
    margin-left: 18px;
    font-size: 0.88rem;
}

.source-note {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Тост "скопировано" */
.toast-container {
    position: fixed;
    inset: 0;                 /* растягиваем контейнер на весь экран */
    display: flex;
    justify-content: center;  /* по центру по горизонтали */
    align-items: flex-start;  /* прижать к верху */
    padding-top: 18px;        /* отступ сверху */
    z-index: 1100;
    pointer-events: none;
}

.toast {
    min-width: 260px;         /* шире, чтобы текст был в одну строку */
    max-width: 320px;
    background: rgba(10, 10, 18, 0.96);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    padding: 8px 18px;
    font-size: 0.82rem;
    color: rgba(225, 226, 240, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast-icon {
    color: #4ade80;
    font-size: 0.9rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптив */
@media (max-width: 768px) {
    .actions-row {
        grid-template-columns: 1fr;
    }

    .hero-screen {
        padding-top: 28px;
        padding-bottom: 6px;
        align-items: flex-start;
    }

    .details {
        padding-top: 24px;
    }

    .modal-window {
        max-width: 94vw;
    }
}
