/* PodStream Unified Design System */

:root {
    --primary-color: #ffffff;
    --primary-gradient: linear-gradient(135deg, #3a6d8c, #21384a);
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --heading-color: #f8fafc;
    --nav-color: #cbd5e1;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --card-bg: rgba(30, 41, 59, 0.9);
    --input-bg: #0f172a;
    --input-border: #334155;
    --footer-bg: #111827;
    --footer-text: #f1f5f9;
    --accent-color: #3a6d8c;
    --success-color: #10b981;
    --error-color: #ef4444;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
    padding-top: 80px;
}

/* Global Link Styling */
a {
    color: var(--primary-color);
    transition: var(--transition);
}

.content-wrapper a:not(.btn):not(.card) {
    color: #ffd700;
    /* Subtle gold for better visibility in dark mode */
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.content-wrapper a:not(.btn):not(.card):hover {
    color: #fff;
    text-decoration: none;
}

/* Sections & Layout */
.content-wrapper {
    position: relative;
    z-index: 20;
    padding: 4rem 0;
    background: var(--surface-color);
}

.hero-wrapper {
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* FAQ and Tutorial Page Containers */
.faq-page,
.tutorial-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 20px;
}

@media (max-width: 768px) {

    .faq-page,
    .tutorial-page {
        padding: 1.5rem 12px;
    }
}

.content-section {
    margin-bottom: 4rem;
    padding-top: 0;
}


.section-title,
.page-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    margin-top: 0;
    color: var(--heading-color);
    line-height: 1.2;
    min-height: 2.4rem;
    hyphens: auto;
}

.section-description {
    text-align: center;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.5;
    font-size: 1rem;
}

/* FAQ specific title sizes */
.text-content {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.05rem;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.faq-page .section-title,
.tutorial-page .section-title {
    font-size: 1.75rem;
    line-height: 1.3;
    min-height: 2.275rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {

    .section-title,
    .page-title {
        font-size: 1.75rem;
        line-height: 1.3;
        min-height: 2.275rem;
    }

    .faq-page .section-title,
    .tutorial-page .section-title {
        font-size: 1.5rem;
        min-height: 1.95rem;
    }

    .section-description {
        font-size: 0.95rem;
    }
}

/* Step Numbers */
.step-number {
    color: var(--surface-color) !important;
}

.content-card h2,
.content-card h3 {
    margin-top: 2rem;
    margin-bottom: 1.25rem;
}

.content-card h2:first-child,
.content-card h3:first-child {
    margin-top: 0;
}

.text-content p,
.content-card p {
    margin-bottom: 1.25rem;
}

/* Grid Systems */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-apps {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 400px) {
    .grid-apps {
        gap: 8px;
    }
}

/* Cards */
.card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: var(--transition);
    min-height: 180px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px var(--shadow-color);
}

/* FAQ and Tutorial Cards - stable sizes */
.faq-page .card h3,
.tutorial-page .card h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--heading-color);
    min-height: 1.75rem;
}

.faq-page .card p,
.tutorial-page .card p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .card {
        min-height: 160px;
        padding: 1.5rem;
    }

    .faq-page .card h3,
    .tutorial-page .card h3 {
        font-size: 1.1rem;
        min-height: 1.55rem;
    }

    .faq-page .card p,
    .tutorial-page .card p {
        font-size: 0.95rem;
    }
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    height: 100%;
}

.app-actions {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 110px;
    /* Ensure space for 2 buttons */
    justify-content: flex-start;
    /* Align single buttons to the top of this container */
}

.app-actions .btn {
    width: 100%;
}

.app-card img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.app-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.app-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.tutorial-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tutorial-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.hero-demo-entry {
    margin-top: 1.25rem;
    display: grid;
    justify-items: center;
    gap: 0.65rem;
}

.hero-demo-trigger {
    min-width: 220px;
}

.hero-demo-caption {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.mini-demo {
    margin-top: 1.5rem;
    text-align: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.mini-demo[hidden] {
    display: none !important;
}

.mini-demo-head,
.mini-demo-url,
.mini-demo-footer,
.mini-demo-story-caption,
.mini-demo-story-platform {
    display: none;
}

.mini-demo-stories {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    padding: 8px;
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.96);
    box-shadow:
        0 28px 60px rgba(2, 6, 23, 0.22),
        0 10px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(0);
    animation: mini-demo-frame-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.mini-demo-stories::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 31px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 18%);
    pointer-events: none;
    z-index: 1;
}

.mini-demo-stories::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 18px;
    right: 18px;
    height: 20%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 80%);
    filter: blur(18px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

.mini-demo-story-bars {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.mini-demo-story-bar {
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.mini-demo-story-bar span {
    display: block;
    position: relative;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.26);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mini-demo-story-bar span::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), #ffffff);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.28);
}

.mini-demo-story-bar.is-active span,
.mini-demo-story-bar.is-complete span {
    background: rgba(255, 255, 255, 0.22);
}

.mini-demo-story-bar.is-active span::after {
    animation: mini-demo-progress 3.2s linear forwards;
}

.mini-demo-story-bar.is-complete span::after {
    width: 100%;
}

.mini-demo-story-stage {
    position: relative;
    aspect-ratio: 9 / 16;
    min-height: 560px;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at top center, rgba(59, 130, 246, 0.18), transparent 30%),
        linear-gradient(180deg, #071120, #020617);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mini-demo-story-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.985);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.mini-demo-story-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.mini-demo-story-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #020617;
    transform: scale(1.01);
    filter: saturate(1.02) contrast(1.01);
}

.mini-demo-story-slide.is-active img {
    animation: mini-demo-story-image 3.2s ease forwards;
}

.mini-demo-story-controls {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.mini-demo-story-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: transparent;
    cursor: pointer;
    pointer-events: auto;
}

.mini-demo-story-nav::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(-50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.mini-demo-story-nav::after {
    position: absolute;
    top: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.96);
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mini-demo-story-nav#miniDemoPrev {
    left: 0;
}

.mini-demo-story-nav#miniDemoPrev::before {
    left: 14px;
}

.mini-demo-story-nav#miniDemoPrev::after {
    content: "‹";
    left: 29px;
}

.mini-demo-story-nav#miniDemoNext {
    right: 0;
}

.mini-demo-story-nav#miniDemoNext::before {
    right: 14px;
}

.mini-demo-story-nav#miniDemoNext::after {
    content: "›";
    right: 29px;
}

.mini-demo-stories:hover .mini-demo-story-nav::before,
.mini-demo-stories:hover .mini-demo-story-nav::after,
.mini-demo-stories:focus-within .mini-demo-story-nav::before,
.mini-demo-stories:focus-within .mini-demo-story-nav::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.mini-demo-stories:hover .mini-demo-story-nav#miniDemoPrev::after,
.mini-demo-stories:hover .mini-demo-story-nav#miniDemoNext::after,
.mini-demo-stories:focus-within .mini-demo-story-nav#miniDemoPrev::after,
.mini-demo-stories:focus-within .mini-demo-story-nav#miniDemoNext::after {
    transform: translateY(-50%);
}

.mini-demo-story-meta {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.22);
}

/* Status Steps Processing */
.status-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
    margin-top: 1rem;
}

.status-steps .step-item {
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-steps .step-item::before {
    display: none !important;
}

.status-steps .step-item .step-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.status-steps .step-item.active {
    opacity: 1;
}

.status-steps .step-item.active .step-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.status-steps .step-item.completed {
    opacity: 1;
    color: var(--success-color);
}

.status-steps .step-item.completed .step-icon {
    filter: drop-shadow(0 0 5px var(--success-color));
}

@media (max-width: 480px) {
    .status-steps {
        gap: 8px;
    }

    .status-steps .step-item .step-icon {
        font-size: 1.5rem;
    }

    .status-steps .step-item div {
        font-size: 0.65rem !important;
    }
}

/* Tutorial Steps */
.steps-list {
    list-style: none;
    counter-reset: steps;
    padding-left: 0;
}

.steps-list .step-item {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.steps-list .step-item::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Mobile adjustments for steps */
@media (max-width: 768px) {
    .steps-list .step-item {
        padding-left: 3rem;
        margin-bottom: 1.75rem;
        font-size: 0.95rem;
    }

    .steps-list .step-item::before {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .steps-list .step-item {
        padding-left: 2.75rem;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .steps-list .step-item::before {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.9rem;
    }
}

/* Legal/Content Card */
.content-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 3.5rem;
}

.last-updated {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 3rem;
    display: block;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.legal-section p {
    margin-bottom: 1.25rem;
}

.legal-section ul,
.legal-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.legal-section li {
    margin-bottom: 0.75rem;
}

/* Links */
.link-youtube,
.link-vk,
.link-rutube {
    color: #ffd700;
    /* Gold for dark mode visibility */
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-youtube:hover,
.link-vk:hover,
.link-rutube:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Status Page Blocks */
.status-card {
    max-width: 800px;
    margin: 4rem auto;
    text-align: center;
}

@media (max-width: 768px) {
    .status-card {
        margin: 1rem auto;
        padding: 1.25rem !important;
    }

    .mini-demo {
        margin-top: 1.25rem;
    }

    .mini-demo-stories {
        max-width: 280px;
        padding: 7px;
        border-radius: 28px;
    }

    .mini-demo-story-stage {
        min-height: 500px;
        border-radius: 21px;
    }

    .mini-demo-story-meta {
        right: 10px;
        bottom: 10px;
        min-width: 42px;
        height: 26px;
        font-size: 0.74rem;
    }
}

@keyframes mini-demo-frame-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mini-demo-progress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes mini-demo-story-image {
    from {
        transform: scale(1.015);
    }

    to {
        transform: scale(1.045);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mini-demo-stories,
    .mini-demo-story-slide,
    .mini-demo-story-slide img,
    .mini-demo-story-bar span::after,
    .mini-demo-story-nav::before,
    .mini-demo-story-nav::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Authorial Story Demo Override */
.mini-demo {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 1rem;
    max-width: 430px;
    margin: 1.85rem auto 0;
    padding: 0 0 0.4rem;
    text-align: center;
}

.mini-demo::before {
    display: none;
}

.mini-demo-head,
.mini-demo-eyebrow,
.mini-demo-copy-text,
.mini-demo-url,
.mini-demo-footer,
.mini-demo-story-caption {
    display: none;
}

.mini-demo-intro {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.55rem;
    max-width: 360px;
}

.mini-demo-step-labels {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.mini-demo-step-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.2);
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.mini-demo-step-label.is-active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #f8fafc;
    transform: translateY(-1px);
}

.mini-demo-title {
    margin: 0;
    color: #f8fafc;
    font-size: 1.12rem;
    line-height: 1.3;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.mini-demo-note {
    display: block;
    margin: 0;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.92rem;
    line-height: 1.55;
}

.mini-demo-stories {
    position: relative;
    z-index: 2;
    width: min(100%, 343px);
    margin: 0 auto;
    padding: 8px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 24px 56px rgba(2, 6, 23, 0.22),
        0 8px 18px rgba(15, 23, 42, 0.1);
    animation: mini-demo-frame-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.mini-demo-stories:hover {
    transform: translateY(-2px);
    box-shadow:
        0 30px 62px rgba(2, 6, 23, 0.26),
        0 10px 24px rgba(15, 23, 42, 0.12);
}

.mini-demo-stories::before,
.mini-demo-stories::after {
    display: none;
}

.mini-demo-story-bars {
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 4;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.mini-demo-story-bar span {
    height: 4px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.mini-demo-story-bar span::after {
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.9));
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.24);
}

.mini-demo-story-bar.is-active span::after {
    animation-duration: var(--mini-demo-progress-duration, 2200ms);
}

.mini-demo-story-bar.is-active span,
.mini-demo-story-bar.is-complete span {
    background: rgba(255, 255, 255, 0.16);
}

.mini-demo-story-stage {
    aspect-ratio: 323 / 700;
    min-height: 0;
    overflow: hidden;
    border-radius: 24px;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    background: #0b1120;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(15, 23, 42, 0.06);
}

.mini-demo-story-slide {
    transform: translateY(10px) scale(0.985);
    transition: opacity 0.36s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.mini-demo-story-slide.is-active {
    transform: translateY(0) scale(1);
}

.mini-demo-story-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    filter: saturate(1.02) contrast(1.01);
    border-radius: 18px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.mini-demo-story-slide.is-active img {
    animation: mini-demo-screen-settle 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mini-demo-story-slide[data-story-index="1"]::after {
    content: "";
    position: absolute;
    inset: 20% 12% auto;
    height: 22%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.28), rgba(56, 189, 248, 0));
    filter: blur(18px);
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.mini-demo-story-slide[data-story-index="1"].is-active::after {
    animation: mini-demo-processing-pulse 1.8s ease-in-out infinite;
}

.mini-demo-story-controls {
    z-index: 5;
    pointer-events: none;
}

.mini-demo-story-stage.is-swiping-out .mini-demo-story-slide.is-active {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.mini-demo-story-stage.is-dragging .mini-demo-story-slide.is-active {
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.mini-demo-story-stage[data-drag-direction="next"].is-dragging .mini-demo-story-slide.is-active {
    transform: translate3d(-10px, 0, 0) rotate(-1.2deg) scale(0.99);
}

.mini-demo-story-stage[data-drag-direction="prev"].is-dragging .mini-demo-story-slide.is-active {
    transform: translate3d(10px, 0, 0) rotate(1.2deg) scale(0.99);
}

.mini-demo-story-stage.is-swiping-out {
    overflow: visible;
}

.mini-demo-story-stage[data-swipe-direction="next"].is-swiping-out .mini-demo-story-slide.is-active {
    opacity: 0;
    transform: translate3d(-108%, 0, 0) rotate(-4deg) scale(0.98);
}

.mini-demo-story-stage[data-swipe-direction="prev"].is-swiping-out .mini-demo-story-slide.is-active {
    opacity: 0;
    transform: translate3d(108%, 0, 0) rotate(4deg) scale(0.98);
}

.mini-demo-story-nav {
    top: 0;
    bottom: 0;
    width: 50%;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
    line-height: 1;
    backdrop-filter: none;
    box-shadow: none;
    transition: none;
    pointer-events: none;
}

.mini-demo-story-nav::before,
.mini-demo-story-nav::after {
    display: none;
}

.mini-demo-story-nav#miniDemoPrev {
    left: 0;
}

.mini-demo-story-nav#miniDemoNext {
    right: 0;
}

.mini-demo-story-meta {
    top: auto;
    right: auto;
    bottom: 14px;
    left: 50%;
    display: grid;
    justify-items: center;
    gap: 0;
    pointer-events: none;
    transform: translateX(-50%);
}

.mini-demo-story-platform {
    display: none;
}

.mini-demo-story-meta span:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 30px;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.68);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.24);
}

@media (max-width: 900px) {
    .mini-demo {
        max-width: 380px;
    }

    .mini-demo::before {
        width: 280px;
        height: 280px;
    }

    .mini-demo-stories {
        margin: 0 auto;
    }

    .mini-demo-stories:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 768px) {
    .mini-demo {
        margin-top: 1.45rem;
        gap: 0.85rem;
    }

    .mini-demo-step-labels {
        gap: 0.35rem;
    }

    .mini-demo-step-label {
        min-height: 28px;
        padding: 0.34rem 0.62rem;
        font-size: 0.74rem;
    }

    .mini-demo-stories {
        width: min(100%, 316px);
        padding: 7px;
        border-radius: 26px;
    }

    .mini-demo-story-stage {
        border-radius: 21px;
    }

    .mini-demo-story-meta {
        bottom: 12px;
    }

    .mini-demo-title {
        font-size: 1.02rem;
    }

    .mini-demo-note {
        font-size: 0.88rem;
    }
}

@keyframes mini-demo-frame-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mini-demo-screen-settle {
    from {
        transform: scale(1.015);
    }

    to {
        transform: scale(1);
    }
}

@keyframes mini-demo-processing-pulse {
    0% {
        opacity: 0;
        transform: scale(0.88);
    }

    35% {
        opacity: 0.95;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.14);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mini-demo-stories,
    .mini-demo-story-slide,
    .mini-demo-story-slide img,
    .mini-demo-story-bar span::after,
    .mini-demo-story-nav {
        animation: none !important;
        transition: none !important;
    }

    .mini-demo-stories,
    .mini-demo-stories:hover,
    .mini-demo-story-slide,
    .mini-demo-story-slide.is-active,
    .mini-demo-story-slide.is-active img {
        transform: none !important;
    }
}

.progress-container {
    background: var(--bg-color);
    height: 12px;
    border-radius: 10px;
    margin: 2rem 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.4s ease;
}

.progress-bar.striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-stripe 1s linear infinite;
}

@keyframes progress-stripe {
    from {
        background-position: 1rem 0;
    }

    to {
        background-position: 0 0;
    }
}

/* Theme Toggles */

/* Footer Styling */
.main-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 2rem;
    margin-top: 0;
    position: relative;
    z-index: 30;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h3,
.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-feedback-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feedback-header {
    margin-bottom: 2rem;
    text-align: center;
}

.feedback-header p {
    color: rgba(255, 255, 255, 0.85);
}

.footer-feedback-form-wide {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-feedback-form-wide input,
.footer-feedback-form-wide textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    transition: var(--transition);
}

.footer-feedback-form-wide textarea {
    height: 120px;
    resize: none;
    margin-bottom: 1rem;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-file {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-file:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-feedback-section input[type="file"] {
    display: none;
}

.btn-feedback-submit {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-feedback-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}


/* Responsive Overrides */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 768px) {

    body {
        padding-top: 60px;
    }

    /* Уменьшаем основные контейнеры */
    .container {
        padding: 0 12px;
    }

    .content-card {
        padding: 1.5rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .content-wrapper {
        padding: 1.5rem 0;
        margin: 1rem auto;
    }

    /* Уменьшаем карточки */
    .card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    /* FAQ специфичные стили */
    .faq-page,
    .tutorial-page {
        padding: 1.5rem 12px;
    }

    .faq-page .card {
        padding: 1rem;
    }

    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-feedback-section {
        padding: 1.5rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-footer {
        flex-direction: column;
        gap: 1rem;
    }

    /* Grid системы */
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Кнопки */
    .btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        min-width: 0;
    }

    /* App карточки */
    .app-card {
        padding: 1rem;
    }

    .app-card h3 {
        font-size: 0.9rem;
    }

    .app-card p {
        font-size: 0.8rem;
    }

    /* Legal контейнеры */
    .legal-container {
        padding: 1.5rem 12px;
    }

    .legal-card {
        padding: 1.25rem;
    }

    .legal-section {
        margin-bottom: 2rem;
    }

    /* Секции */
    .content-section {
        margin-bottom: 2.5rem;
    }

    /* Уменьшаем отступы текста */
    .section-description {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    /* Hero секция */
    .hero-card {
        padding: 1.75rem 1.25rem;
    }

    .hero-card h1 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .hero-card h1 span {
        font-size: 1.1rem;
    }
}

/* Дополнительная оптимизация для маленьких экранов */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .faq-page,
    .tutorial-page,
    .legal-container {
        padding: 1rem 10px;
    }

    .content-card,
    .legal-card {
        padding: 1rem 0.75rem;
    }

    .card {
        padding: 1rem;
    }

    .faq-page .card,
    .tutorial-page .card {
        padding: 0.85rem;
    }

    .section-title,
    .page-title {
        font-size: 1.25rem;
    }

    .faq-page .section-title,
    .tutorial-page .section-title {
        font-size: 1.2rem;
    }

    .content-wrapper {
        padding: 1rem 0;
    }

    .content-section {
        margin-bottom: 2rem;
    }

    .legal-section {
        margin-bottom: 1.75rem;
    }

    .hero-card {
        padding: 1.5rem 1rem;
    }

    .hero-card h1 {
        font-size: 1.5rem;
    }

    .hero-card h1 span {
        font-size: 1rem;
    }
}



/* Cookie Consent Banner */
#cookieConsentBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    box-shadow: 0 -10px 30px var(--shadow-color);
    z-index: 9999;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-color);
    display: none;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

.cookie-text h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--heading-color);
}

.cookie-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cookie-btn-accept {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
}

.cookie-btn-reject {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.cookie-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Video Background System */
.video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background: var(--bg-color);
    pointer-events: none;
}

.video-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #000 100%);
    opacity: 0.2;
    z-index: 2;
}

.floating-video {
    position: absolute;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-color);
    z-index: 0;
    background: #000;
}

.floating-video.active {
    opacity: 1;
}

.floating-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sizes from JS */
.size-small {
    width: 140px;
    height: 140px;
}

.size-medium {
    width: 180px;
    height: 180px;
}

.size-large {
    width: 220px;
    height: 220px;
}

@media (max-width: 768px) {
    .video-background-container {
        display: none !important;
    }

    .size-small {
        width: 100px;
        height: 100px;
    }

    .size-medium {
        width: 130px;
        height: 130px;
    }

    .size-large {
        width: 160px;
        height: 160px;
    }
}

/* Rotation Animations */
.anim-1 {
    animation: float-1 20s ease-in-out infinite alternate;
}

.anim-2 {
    animation: float-2 25s ease-in-out infinite alternate;
}

.anim-3 {
    animation: float-3 22s ease-in-out infinite alternate;
}

.anim-4 {
    animation: float-4 28s ease-in-out infinite alternate;
}

@keyframes float-1 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(15px, -20px) rotate(5deg);
    }
}

@keyframes float-2 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-15px, 15px) rotate(-5deg);
    }
}

@keyframes float-3 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(10px, 15px) rotate(3deg);
    }
}

@keyframes float-4 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-10px, -15px) rotate(-3deg);
    }
}
