input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
    width: 100%;
}

input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
    width: 100%;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: var(--primary, #ff4d4f); /* Цвет кнопки */
    height: 18px;
    width: 18px;
    border-radius: 50%;
    margin-top: -6px;
    transition: transform 0.1s;
}

input[type="range"]::-moz-range-thumb {
    background: var(--primary, #ff4d4f);
    height: 18px;
    width: 18px;
    border-radius: 50%;
    border: none;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}
input:focus-visible {
    outline: 2px solid var(--primary, #ff4d4f);
    outline-offset: -1px;
    border-color: var(--primary, #ff4d4f);
}
body.theme-dark {
    color-scheme: dark; /* Эта строка указывает браузеру рендерить календарь и пикеры в темной теме */
}

body.theme-light {
    color-scheme: light;
}
:root {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
#root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.theme-light {
    --background: #ffffff;
    --text-color: #290e4a;
    --primary: #bb86fc;
    --progress-empty: #d0b2f1;
    --progress-fill: #a266ec;
    --card-bg: #f3e8ff;
    --card-header: #ccb3ff;
    --input: #ccb3ff;
    --border: #ccb3ff;
    --heart-color: #ff758f;
    --box-shadow: 0 4px 20px #bb86fc55;
    --footer-text: #7f4dff;
    --footer-link-text: #7f4dff;
    --footer-link-hover: #bb86fc;
    --btn-theme-change: #ffffff;
}

body.theme-dark {
    --background: #1d1d1d;
    --text-color: #f5f5f5;
    --primary: #bb86fc;
    --progress-empty: #404040;
    --progress-fill: #bb86fc;
    --card-bg: #2d2d2d;
    --card-header: #404040;
    --input: #404040;
    --border: #404040;
    --heart-color: #ff758f;
    --box-shadow: 0 4px 20px #bb86fc7a;
    --footer-text: #aaaaaa;
    --footer-link-text: #aaaaaa;
    --footer-link-hover: #d7b4ff;
    --btn-theme-change: #282828FF;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.container,
.builder-layout,
.home-container,
.landing-page {
    position: relative;
    z-index: 2;
}
.landing-page,
.builder-layout,
.container {
    flex: 1;
}
footer {
    margin-top: auto;
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--footer-text);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.landing-page {
    background-color: transparent;
    color: var(--text-color);
    min-height: 100vh;
    padding-bottom: 2rem;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    box-sizing: border-box;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
    width: 100%;
}

button:hover {
    opacity: 0.9;
}

button.secondary {
    background-color: var(--border);
    color: inherit;
}

.question-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

/* Логотип */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: 'Tinkoff Sans', 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    user-select: none;
    color: var(--primary);
    transition: color 0.3s ease;
}

.pixel-heart {
    width: 28px;
    height: 28px;
    fill: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(255, 77, 109, 0.2));
    transition: transform 0.2s ease, fill 0.3s ease;
}

.brand-logo:hover .pixel-heart {
    transform: scale(1.15);
}

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.heart-fall {
    position: absolute;
    top: -50px;
    color: var(--heart-color);
    font-weight: bold;
    user-select: none;
    display: block;
    animation: fall linear infinite;
    opacity: 0.55;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(20px);
    }
    100% {
        transform: translateY(105vh) rotate(360deg) translateX(-20px);
    }
}

.floating-theme-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--btn-theme-change);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s;
}

.floating-theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.floating-theme-btn:active {
    transform: scale(0.95);
}

.theme-btn-icon {
    font-size: 20px;
    line-height: 1;
    user-select: none;
}

.landing-header {
    text-align: center;
    padding: 20px 0;
}

.logo, .footer-logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: var(--primary);
}

.hero-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    z-index: 15;
}

.hero-mockup {
    width: 280px;
    height: 520px;
    background: var(--card-bg);
    border: 8px solid var(--border);
    border-radius: 36px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mockup-screen {
    width: 100%;
    height: 100%;
    border-radius: 26px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.mockup-video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
    pointer-events: none;
}

.hero-content {
    max-width: 450px;
}

.hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
}

.highlight {
    color: var(--primary);
}

.highlight-sub {
    color: var(--primary);
    font-size: 1.8rem;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 25px;
    line-height: 1.5;
}

.cta-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.how-it-works, .faq-section, .reviews-section {
    max-width: 700px;
    margin: 60px auto;
    text-align: center;
    padding: 0 20px;
}

.how-it-works h2, .faq-section h2, .reviews-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.reviews-subtitle {
    opacity: 0.7;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.step-num {
    background: var(--primary);
    color: white;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 1.1rem;
}

.step-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.step-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px;
    text-align: left;
    cursor: pointer;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-answer {
    margin-top: 12px;
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.review-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0 30px;
}

.review-bubble {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
}

.builder-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
    align-items: stretch;
}
.builder-layout > div:last-child {
    display: flex;
    flex-direction: column;
}

.builder-layout .card {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.progress-container {
    max-width: 1100px;
    margin: 20px auto 0;
    padding: 0 1rem;
}

.progress-bar-bg {
    background: var(--border);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--primary);
    height: 100%;
    transition: width 0.3s ease;
}

.phone-mockup {
    background: var(--card-bg);
    border: 12px solid #222;
    border-radius: 40px;
    width: 100%;
    max-width: 340px;
    height: 620px;
    margin: 0 auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.phone-speaker {
    width: 70px;
    height: 14px;
    background: #222;
    border-radius: 8px;
    margin: 10px auto 5px;
    flex-shrink: 0;
}

.phone-screen {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
    box-sizing: border-box;
}

.preview-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
    box-sizing: border-box;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: stretch;
}

.access-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;

    box-sizing: border-box;
    width: 100%;
    height: 80px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    overflow: hidden;
}

.access-card.active {
    border-color: var(--primary);
    background: rgba(255, 77, 109, 0.08);
}

.option-style-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--footer-text);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.footer-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.footer-box .left {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.footer-box .center {
    text-align: center;
    flex: 1;
    display: flex;
    justify-content: center;
}

.footer-box .center .sme img {
    height: 28px;
}

.footer-box .right {
    text-align: right;
    flex: 1;
}

.footer-box .right p {
    margin: 0;
    line-height: 1.4;
}

.footer-box .link {
    text-decoration: none;
    color: var(--footer-link-text);
    transition: color 0.2s;
}

.footer-box .link:hover {
    color: var(--footer-link-hover);
}

@media (max-width: 850px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-container {
        gap: 30px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-mockup {
        width: 260px;
        height: 480px;
    }

    .how-it-works, .faq-section, .reviews-section {
        margin: 40px auto;
        padding: 0 15px;
    }

    .how-it-works h2, .faq-section h2, .reviews-section h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .step-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .footer-box {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px 15px;
    }

    .footer-box .left,
    .footer-box .center,
    .footer-box .right {
        text-align: center;
        width: 100%;
    }

    .footer-box .left {
        align-items: center;
    }
}

@media (max-width: 600px) {
    .brand-logo {
        font-size: 1.3rem;
        gap: 8px;
    }

    .pixel-heart {
        width: 20px;
        height: 20px;
    }

    .floating-theme-btn {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }

    .theme-btn-icon {
        font-size: 18px;
    }
}