:root {
    --bg-black: #04060b;
    --bg-card: #0a1020;
    --bg-card-hover: #0e172e;
    --bg-input: #060a14;
    --border-blue: #172544;
    --border-bright: #2563eb;
    --primary-blue: #1d4ed8;
    --primary-blue-hover: #2563eb;
    --accent-cyan: #38bdf8;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    background-color: var(--bg-black);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

.bg-glow {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 850px;
    height: 450px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.18) 0%, rgba(4, 6, 11, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(37, 99, 235, 0.14);
    color: var(--accent-cyan);
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 0.9em;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Навигация */
.navbar {
    background: rgba(10, 16, 32, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-blue);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
}

.brand-logo span {
    color: var(--accent-cyan);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-blue);
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Авторизация */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-blue);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 34px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-input);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-blue);
    margin-bottom: 22px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.tab-btn.active {
    background: var(--primary-blue);
    color: #fff;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #cbd5e1;
}

.form-group input,
.dark-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-blue);
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s;
}

.form-group input:focus,
.dark-select:focus {
    border-color: var(--border-bright);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff;
    border: 1px solid #3b82f6;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.btn-outline,
.btn-outline-sm {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-blue);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.88rem;
    transition: 0.2s;
}

.btn-outline:hover,
.btn-outline-sm:hover {
    border-color: var(--border-bright);
    background: rgba(37, 99, 235, 0.1);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.full-width {
    width: 100%;
}

/* Сетка личного кабинета */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 50px;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-blue);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(135deg, #0a1226 0%, #070b16 100%);
}

.status-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 10px 0;
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-pill.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.download-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.btn-download {
    background: linear-gradient(135deg, #0284c7, #1d4ed8);
    color: #fff;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid var(--accent-cyan);
    transition: 0.2s;
}

.btn-download:hover {
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

.version-tag {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Тарифы */
.section-header {
    margin-bottom: 20px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

.plan-card {
    background: var(--bg-input);
    border: 1px solid var(--border-blue);
    border-radius: 14px;
    padding: 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: 0.2s;
}

.plan-card:hover {
    border-color: var(--border-bright);
    background: var(--bg-card-hover);
}

.plan-card.featured {
    border-color: #2563eb;
    box-shadow: 0 0 25px rgba(29, 78, 216, 0.18);
}

.plan-badge {
    position: absolute;
    top: -11px;
    right: 16px;
    background: var(--primary-blue);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    text-transform: uppercase;
}

.plan-duration {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.plan-price {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 10px 0 16px;
}

.plan-price span {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-left: 2px;
}

.plan-features {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.plan-features li {
    font-size: 0.86rem;
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* Таблица платежей */
.payments-history {
    margin-top: 26px;
    border-top: 1px solid var(--border-blue);
    padding-top: 18px;
}

.payments-history h4 {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.dark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.dark-table th,
.dark-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-blue);
}

.dark-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.tag-success { color: var(--success); font-weight: 600; }
.tag-danger { color: var(--danger); font-weight: 600; }
.tag-pending { color: var(--warning); font-weight: 600; }

/* --- Страница инструкции (/guide) --- */
.guide-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 60px;
}

@media (max-width: 992px) {
    .guide-container {
        grid-template-columns: 1fr;
    }
}

.guide-nav-card {
    position: sticky;
    top: 86px;
}

.guide-nav-card h4 {
    margin-bottom: 12px;
    color: var(--accent-cyan);
    font-size: 0.95rem;
}

.guide-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-nav-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 6px 10px;
    border-radius: 8px;
    display: block;
    transition: 0.2s;
}

.guide-nav-list a:hover {
    color: #fff;
    background: rgba(37, 99, 235, 0.15);
}

.guide-section h1 {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.guide-section h2 {
    font-size: 1.25rem;
    color: var(--accent-cyan);
    margin-bottom: 16px;
}

.guide-section h3 {
    font-size: 1.08rem;
    margin: 16px 0 10px;
}

.guide-section h4 {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 16px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.guide-section p {
    font-size: 0.92rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.guide-list {
    list-style: none;
    margin-bottom: 14px;
}

.guide-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.guide-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: bold;
}

.guide-photo {
    margin: 16px 0;
    background: var(--bg-input);
    border: 1px solid var(--border-blue);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
}

.guide-photo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.guide-divider {
    border: none;
    border-top: 1px solid var(--border-blue);
    margin: 24px 0;
}

.guide-footer-note {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-bright);
    border-radius: 12px;
}

.guide-footer-note a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

/* Чат техподдержки */
.support-card {
    display: flex;
    flex-direction: column;
    height: 620px;
    position: sticky;
    top: 86px;
}

.support-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-blue);
}

.support-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.online-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin: auto;
}

.msg-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    position: relative;
    word-wrap: break-word;
}

.msg-user {
    background: var(--primary-blue);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.msg-worker {
    background: var(--bg-input);
    border: 1px solid var(--border-blue);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg-meta {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-blue);
}

.chat-input-area input {
    flex-grow: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-blue);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--border-bright);
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 10, 0.82);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.modal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.generated-login-box,
.wallet-copy-box {
    background: var(--bg-input);
    border: 1px solid var(--border-blue);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    word-break: break-all;
}

.amount-display {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.warning-text {
    color: var(--warning);
    font-size: 0.86rem;
    margin-bottom: 16px;
    text-align: center;
}

.muted-text {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Раскладка для прижатия футера к низу экрана */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1 0 auto;
}

/* Плашка копирайта */
.site-footer {
    flex-shrink: 0;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

/* Обновленные карточки тарифов */
.plan-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    gap: 20px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
    transform: translateY(-4px);
}

.plan-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.plan-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 4px;
}

.plan-tag.accent {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.plan-tag.gold {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.plan-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
}

.plan-pricing {
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.plan-per-month {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}