/* ==========================================
   Extended Professional Styles
   Pricing, Docs, Footer & More
   ========================================== */

/* ==========================================
   Demo Section - Extended Styles
   ========================================== */

.demo-kpis {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 0 10px;
}

.demo-kpi {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--edge);
    color: var(--txt);
    font-size: 12px;
}

.demo-kpi b {
    font-weight: 800;
}

.demo-progress {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.10));
    border: 1px solid var(--edge);
    overflow: hidden;
    margin-top: 10px;
}

.demo-progress .od-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ac1), var(--ac2));
    box-shadow: 0 0 14px color-mix(in srgb, var(--ac1) 45%, transparent);
    transition: width .33s ease;
}

.demo-input,
.demo-select,
.demo-textarea {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--edge);
    background: #0e1018;
    color: #fff;
    outline: none;
    font-family: inherit;
    transition: all 0.3s ease;
}

.demo-input:focus,
.demo-select:focus,
.demo-textarea:focus {
    border-color: var(--ac1);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac1) 22%, transparent);
}

.demo-textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.demo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
}

.demo-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.demo-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.demo-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.demo-radio {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-radio label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 26px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--edge);
    background: #0e1018;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.demo-radio label:has(input:checked) {
    border-color: var(--ac2);
    background: rgba(125,58,237,.15);
}

.demo-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.demo-radio i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.45);
    background: transparent;
}

.demo-radio input:checked + i {
    border-color: transparent;
    background: radial-gradient(circle at 50% 50%, var(--ac2), var(--ac1));
    box-shadow: 0 0 6px color-mix(in srgb, var(--ac1) 55%, transparent);
}

.demo-acc-list {
    display: grid;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 6px;
}

.demo-acc-item {
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
    border: 1px solid var(--edge);
    border-radius: 12px;
    padding: 10px 12px;
    transition: transform .15s ease, box-shadow .25s ease, border-color .2s ease;
}

.demo-acc-item:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, #fff 16%, var(--edge));
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

.demo-acc-item.is-selected {
    border-color: color-mix(in srgb, var(--ac2) 55%, var(--edge));
    background:
        radial-gradient(120% 150% at 8% -12%, color-mix(in srgb, var(--ac1) 18%, transparent) 0%, transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 0 0 1px color-mix(in srgb, var(--ac2) 45%, transparent),
        0 10px 26px rgba(100, 57, 140, .22);
    transform: translateY(-1px) scale(1.01);
}

.demo-acc-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.demo-acc-title {
    font-weight: 800;
}

.demo-acc-b .row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 2px 0;
}

.demo-acc-b .k {
    color: var(--muted);
    width: 80px;
}

.demo-acc-b .v {
    color: var(--txt);
}

.demo-log {
    background: var(--gradient-card);
    border: 1px solid var(--edge);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.demo-log-header {
    padding: 10px 12px;
    background: radial-gradient(120% 140% at 15% -10%, color-mix(in srgb, var(--ac1) 12%, transparent) 0%, transparent 60%);
    border-bottom: 1px solid var(--edge);
    font-weight: 700;
}

.demo-log-content {
    padding: 12px;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.demo-log-item {
    padding: 4px 0;
    color: var(--muted);
    border-left: 2px solid var(--ac2);
    padding-left: 10px;
    margin-bottom: 4px;
}

/* ==========================================
   Documentation Section
   ========================================== */

.docs-page {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 4rem;
    background: var(--panel-bg);
}

.docs-header-page {
    text-align: center;
    margin-bottom: 4rem;
}

.docs-header-page h1 {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,.90);
    margin-bottom: 0.75rem;
}

.docs-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
}

.docs-section {
    padding: 50px 0;
    background: var(--panel-bg);
    position: relative;
}

.docs-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--edge), transparent);
}

.docs-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    min-height: 800px;
}

.docs-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--gradient-card);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04),
                0 20px 48px rgba(0,0,0,.25);
}

.docs-nav-category {
    margin-bottom: 2rem;
}

.docs-nav-category:last-child {
    margin-bottom: 0;
}

.docs-nav-category h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 1rem;
    font-weight: 800;
}

.docs-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.docs-nav-link:hover {
    background: rgba(157, 78, 221, 0.1);
    color: var(--txt);
}

.docs-nav-link.active {
    background: rgba(157, 78, 221, 0.15);
    color: var(--txt);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(157,78,221,.25);
}

.docs-content {
    background: var(--gradient-card);
    border: 1px solid var(--edge);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04),
                0 20px 48px rgba(0,0,0,.25);
}

.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,.90);
    margin-bottom: 2rem;
}

.docs-content h2 {
    color: var(--ac2);
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-size: 1.75rem;
    font-weight: 800;
}

.docs-content h3 {
    color: var(--txt);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.docs-content p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.docs-content code {
    background: #0e1018;
    color: var(--ac2);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid var(--edge);
}

.docs-content pre {
    background: #0e1018;
    border: 1px solid var(--edge);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.docs-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--txt);
}

.docs-content ul,
.docs-content ol {
    margin-left: 1.5rem;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.docs-content li {
    margin-bottom: 0.5rem;
}

.doc-card {
    background: var(--gradient-card);
    border: 1px solid var(--edge);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    position: relative;
    overflow: hidden;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(120% 140% at 15% -10%, color-mix(in srgb, var(--ac1) 15%, transparent) 0%, transparent 60%);
    opacity: 0.5;
}

.doc-card > * {
    position: relative;
    z-index: 1;
}

.doc-callout {
    border-left: 4px solid var(--ac2);
    background: var(--gradient-card);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid var(--edge);
    border-left: 4px solid var(--ac2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    position: relative;
    overflow: hidden;
}

.doc-callout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(120% 140% at 15% -10%, color-mix(in srgb, var(--ac1) 18%, transparent) 0%, transparent 60%);
    opacity: 0.4;
}

.doc-callout > * {
    position: relative;
    z-index: 1;
}

.doc-callout h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.doc-callout-info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.doc-callout-success {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.doc-callout-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* ==========================================
   Pricing Section
   ========================================== */

.pricing-section {
    padding: 50px 0;
    background: var(--bg);
    position: relative;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

.pricing-card {
    background: var(--gradient-card);
    border: 1px solid var(--edge);
    border-radius: 20px;
    padding: 1.5rem 2.5rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    transform: none;
}


.pricing-card.featured {
    border-color: color-mix(in srgb, var(--ac2) 30%, var(--edge));
    transform: none;
    background: var(--gradient-card);
    box-shadow:
        0 18px 42px color-mix(in srgb, var(--ac2) 14%, transparent),
        0 0 34px color-mix(in srgb, var(--ac2) 10%, transparent),
        0 0 70px color-mix(in srgb, var(--ac2) 6%, transparent);
    filter: saturate(1.03);
    isolation: isolate;
}



.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Glow wash + dynamic light hotspot (controlled by --hl-x/--hl-y) */
    background:
        radial-gradient(
            165% 155% at var(--hl-x, 50%) var(--hl-y, -12%),
            color-mix(in srgb, rgba(255,255,255,.55) 14%, var(--ac2)) 0%,
            transparent 80%
        ),
        radial-gradient(95% 115% at 15% -10%, color-mix(in srgb, var(--ac2) 42%, transparent) 0%, transparent 58%),
        radial-gradient(75% 95% at 85% 20%, color-mix(in srgb, var(--ac2) 18%, transparent) 0%, transparent 56%);
    opacity: 0.125;
    border-radius: 20px;
    pointer-events: none;
}



.pricing-card.featured::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Specular highlight that follows the tilt/light */
    background:
        radial-gradient(
            165% 125% at var(--hl-x, 50%) var(--hl-y, -12%),
            rgba(100,57,140,.22) 0%,
            rgba(100,57,140,.10) 28%,
            transparent 82%
        );
    opacity: 0.125;
    border-radius: 20px;
}

.pricing-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(157, 78, 221, 0.2);
    color: var(--ac2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(157,78,221,.4);
}

.pricing-badge.best {
    background: var(--gradient-primary);
    color: white;
    border: 0;                 /* <-- важно: убираем бордер полностью */
    box-shadow: 0 4px 12px rgba(157,78,221,.3);
}


.pricing-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,.90);
    margin-bottom: 0.75rem;
}

.pricing-header {
    display: flex;
    flex-direction: column;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.75rem;
    font-size: 1.85rem; /* slightly bigger for 100 / 300 / Contact Us */
    font-weight: 700;
    color: var(--muted);
    min-height: 1.85em; /* keep price row height consistent across cards (tighter) */
}

.currency {
    color: var(--muted);
}

.amount {
    font-size: inherit;
    font-weight: inherit;
    /* Light tint from the gradient (emphasis only on 100 / 300 / Contact Us) */
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--ac2) 88%, white) 0%,
        var(--ac2) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.period {
    color: var(--muted);
    margin-left: 0.5rem;
}

.pricing-savings {
    color: var(--ac2);
    font-weight: 700;
    margin-bottom: 0;
    font-size: 0.9rem;
    min-height: 0.9em; /* keeps the header height consistent */
}

/* Keep the spacing, but show the text only for Monthly */
.pricing-card:not(.featured) .pricing-savings {
    visibility: hidden;
}

.pricing-header {
    padding-bottom: 0.5rem; /* gap between price and features list */
}

.pricing-features {
    list-style: none;
    margin: 0.5rem 0 1rem;
    padding: 0;
    flex: 1;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--muted);
    border-bottom: 1px solid var(--edge);
    font-size: 0.95rem;
    display: grid;
    grid-template-columns: 1.35rem 1fr;
    column-gap: 0.7rem;
    align-items: start;
    line-height: 1.35;
}

/* Align checkmarks + text across Weekly / Monthly / Custom */
.pricing-features .check {
    width: 1.35rem;
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.35;
    margin-top: 0.02em;
    color: rgba(255,255,255,.9);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-button {
    width: 100%;
    height: 44px;
    padding: 0 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
    color: var(--txt);
    border: 1px solid var(--edge);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

.pricing-button:hover {
    transform: translateY(-2px);
    border-color: var(--ac2);
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}

.pricing-button.primary {
    background: var(--gradient-primary);
    border: 1px solid rgba(157,78,221,.8);
    box-shadow: var(--shadow-btn-primary);
}

.pricing-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-primary);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    background:
        radial-gradient(120% 140% at 15% -10%, color-mix(in srgb, var(--ac1) 6%, transparent) 0%, transparent 50%),
        var(--panel-bg);
    border-top: 1px solid var(--edge);
    padding: 3rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ac2), transparent);
    opacity: 0.5;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand .logo {
    margin-bottom: 0;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--txt);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--edge);
    color: var(--muted);
    font-size: 0.85rem;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1200px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .docs-container {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .demo-container {
        grid-template-columns: 1fr;
    }

    .demo-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .burger {
        display: flex;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: none;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .demo-grid2 {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
    border: 1px solid var(--edge);
    border-radius: 12px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ac2), var(--ac1));
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,.25);
    box-shadow: inset 0 0 12px color-mix(in srgb, var(--ac1) 30%, transparent);
}

::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.08);
}

/* Selection Colors */
::selection {
    background: rgba(157, 78, 221, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(157, 78, 221, 0.3);
    color: white;
}

/* Telegram icon in footer (right, under divider) */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-social {
    display: flex;
    align-items: center;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--edge);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.footer-social a:hover {
    transform: translateY(-2px);
    border-color: var(--ac2);
    box-shadow: 0 0 18px color-mix(in srgb, var(--ac2) 35%, transparent);
}

.tg-icon {
    width: 18px;
    height: 18px;
    fill: rgba(255,255,255,.9);
    display: block;
    transform: translateX(-1px);
}
