:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.main-wrapper {
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    text-align: center;
}

.limit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #312e81;
    border: 1px solid #4338ca;
    color: #e0e7ff;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.limit-badge span {
    color: var(--success);
}

.tabs {
    display: flex;
    background: #0f172a;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 1.5rem;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background: #111827;
    margin-bottom: 1rem;
}

.drop-zone:hover, .drop-zone--over {
    border-color: var(--primary);
    background: #151f32;
}

.drop-zone__input {
    display: none;
}

.drop-zone__prompt {
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.drop-zone__format {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-info {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: monospace;
    text-align: left;
    line-height: 1.5;
}

.btn-submit {
    margin-top: 0.5rem;
    width: 100%;
    padding: 12px 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.btn-submit:disabled {
    background-color: #334155;
    color: #64748b;
    cursor: not-allowed;
}

.loader {
    display: none;
    margin: 1.5rem auto 0 auto;
    border: 3px solid #334155;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preview-box {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
}

.btn-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-preview:hover {
    background: rgba(99, 102, 241, 0.1);
}

.seo-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

@media (max-width: 480px) {
    .seo-features { grid-template-columns: 1fr; }
}

.feature-card {
    background: #111827;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.feature-card h3 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.8;
    padding: 0 1rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-color);
    transition: color 0.2s;
}

footer a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* СТИЛИ ДЛЯ ИНТЕРАКТИВНОГО ДЕРЕВА ФАЙЛОВ */
.tree-container {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.tree-container::-webkit-scrollbar {
    width: 6px;
}
.tree-container::-webkit-scrollbar-track {
    background: #0f172a;
}
.tree-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.tree-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tree-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.tree-node {
    margin-left: 1.25rem;
    font-family: monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.tree-node--root {
    margin-left: 0;
}

.tree-item-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.1rem 0;
    cursor: pointer;
}

.tree-item-wrapper:hover {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.tree-node--ignored {
    color: #475569;
}
.tree-node--ignored .tree-item-wrapper {
    cursor: not-allowed;
}

.tree-icon {
    font-size: 0.9rem;
    user-select: none;
}

.tree-checkbox {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: #111827;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.tree-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.tree-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.tree-checkbox:disabled {
    background: #1e293b;
    border-color: #334155;
    cursor: not-allowed;
}

/* Управление видимостью свернутых папок */
.tree-node--collapsed > .tree-child-nodes {
    display: none;
}
.tree-clickable {
    cursor: pointer;
    user-select: none;
}

.stepper-container {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: left;
    flex-direction: column;
    gap: 0.75rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.step-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #334155;
    transition: all 0.3s ease;
}

/* Состояния шагов */
.step-item--pending .step-icon {
    border-color: #334155;
    color: #334155;
}

.step-item--active {
    color: var(--text-main);
}
.step-item--active .step-icon {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
    animation: pulse-border 1.5s infinite ease-in-out;
}

.step-item--success {
    color: var(--success);
}
.step-item--success .step-icon {
    border-color: var(--success);
    background-color: var(--success);
    color: #0f172a;
}

@keyframes pulse-border {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ОПЛАТЫ (PAYWALL) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    background: transparent; border: none;
    color: var(--text-muted); font-size: 1.25rem;
    cursor: pointer;
}
.modal-close:hover { color: var(--text-main); }

.pricing-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.price-item {
    border: 1px solid var(--border-color);
    background: #111827;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.price-item:hover {
    border-color: var(--primary);
    background: #151f32;
}
.price-item--popular {
    position: relative;
}
.price-tag-badge {
    position: absolute;
    top: -10px; right: 15px;
    background: var(--primary);
    color: white; font-size: 0.65rem; font-weight: bold;
    padding: 2px 8px; border-radius: 99px;
}

.price-info h4 { font-size: 1rem; color: var(--text-main); margin-bottom: 0.25rem; }
.price-info p { font-size: 0.75rem; color: var(--text-muted); margin: 0; }
.price-value { font-size: 1.25rem; font-weight: bold; color: var(--text-main); }
.price-value span { font-size: 0.8rem; color: var(--text-muted); font-weight: normal; }

.btn-pay-sbp {
    width: 100%;
    padding: 12px 1rem;
    background: #000000;
    color: white;
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: background 0.2s;
}
.btn-pay-sbp:hover { background: #111827; border-color: var(--primary); }
.sbp-logo-text { color: #ff3366; font-weight: 800; } /* Фирменный розовый цвет СБП */

/* КНОПКА АВТОРИЗАЦИИ GITHUB (CTA-ЭЛЕМЕНТ) */
.btn-github-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: #ffffff; /* Контрастный белый цвет на темной теме */
    color: #0f172a; /* Темный текст */
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-github-auth:hover {
    background-color: #f1f5f9; /* Мягкое затемнение при наведении */
    transform: translateY(-1px); /* Легкий подъем кнопки */
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15); /* Индиго-свечение вокруг */
}

.btn-github-auth:active {
    transform: translateY(0);
}

.btn-github-auth svg {
    width: 20px;
    height: 20px;
    fill: #0f172a; /* Цвет иконки совпадает с текстом */
}

/* ОБНОВЛЕННЫЙ БЛОК ПРОФИЛЯ ЛИЧНОГО КАБИНЕТА */
.user-profile-card {
    margin-bottom: 2rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #1e293b;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid #334155;
    text-align: left;
}

.user-info-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    background: #475569;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #f8fafc;
}

/* =================================================================
   ЕДИНЫЕ СТИЛИ ДЛЯ ИНФОРМАЦИОННЫХ СТРАНИЦ И СТРАНИЦЫ ТАРИФОВ
   ================================================================= */
/* УНИВЕРСАЛЬНЫЕ СТИЛИ ДЛЯ ИНФОРМАЦИОННЫХ СТРАНИЦ (КОНТАКТЫ, ОФЕРТА, ПОЛИТИКА) */
.info-container {
    text-align: left;
}

.info-container h1 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.info-container h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin: 1.75rem 0 0.75rem 0;
}

.info-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.requisites-list {
    list-style: none;
    margin-bottom: 1.5rem;
    background: #111827;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.requisites-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.85rem;
}

.requisites-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.requisites-list li:first-child {
    padding-top: 0;
}

.requisites-list span:first-child {
    color: var(--text-muted);
}

.requisites-list span:last-child {
    color: var(--text-main);
    font-weight: 500;
    text-align: right;
}

.nav-back-wrapper {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ВЫДЕЛЕНИЕ АКТИВНОГО ТАРИФА ПРИ КЛИКЕ */
.price-item--selected {
    border-color: var(--primary) !important; /* Оставляем толщину 1px, меняем только цвет */
    background: rgba(99, 102, 241, 0.12) !important;
    /* Эмулируем толстую рамку в 2px через box-shadow (не сдвигает соседние элементы) */
    box-shadow: 0 0 0 1px var(--primary), 0 0 15px rgba(99, 102, 241, 0.25);
}

/* ЗАГЛУШКА ОПЛАТЫ (УВЕДОМЛЕНИЕ О МОДЕРАЦИИ КАССЫ) */
.payment-stub-notice {
    display: none;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: left;
    animation: fadeInStub 0.25s ease-in-out;
}

.payment-stub-notice strong {
    color: #ffffff;
    display: block;
    margin-bottom: 0.25rem;
}

.payment-stub-notice a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
}

@keyframes fadeInStub {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}