:root {
    --bg: #f7f8fb;
    --card-bg: #ffffff;
    --accent: #4b7bec;
    --accent-dark: #3867d6;
    --danger: #eb3b5a;
    --text: #1e272e;
    --muted: #808e9b;
    --border: #dcdde1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
}

body.home {
    --cursor-x: 50%;
    --cursor-y: 50%;
    background: radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(75, 123, 236, 0.18), transparent 60%), linear-gradient(135deg, #f5f7ff, #eef3ff);
    position: relative;
    overflow-x: hidden;
}

.background-pattern {
    position: fixed;
    inset: 0;
    background: radial-gradient(1200px circle at 10% 20%, rgba(75, 123, 236, 0.18), transparent 70%), radial-gradient(900px circle at 90% 10%, rgba(56, 103, 214, 0.12), transparent 75%), radial-gradient(1100px circle at 50% 90%, rgba(75, 123, 236, 0.1), transparent 70%);
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
    animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
    from {
        transform: translate3d(0, -10px, 0) scale(1.02);
    }
    to {
        transform: translate3d(0, 14px, 0) scale(1.05);
    }
}

.home-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 7vw;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(75, 123, 236, 0.12);
}

.home-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    color: var(--accent);
}

.home-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    font-weight: 500;
}

.home-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-nav a:hover {
    background-color: rgba(75, 123, 236, 0.12);
    transform: translateY(-1px);
}

.home-nav .nav-cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 10px 25px rgba(75, 123, 236, 0.3);
}

.home-main {
    position: relative;
    z-index: 1;
    padding: 64px 7vw 96px;
    display: flex;
    flex-direction: column;
    gap: 96px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(240px, 1fr);
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-kicker {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background-color: rgba(75, 123, 236, 0.12);
    color: var(--accent-dark);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.1;
    margin: 0;
}

.hero p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cta-button,
.ghost-button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 15px 30px rgba(75, 123, 236, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 35px rgba(75, 123, 236, 0.35);
}

.ghost-button {
    background-color: rgba(75, 123, 236, 0.08);
    color: var(--accent);
}

.ghost-button:hover {
    background-color: rgba(75, 123, 236, 0.15);
}

.hero-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 0.98rem;
}

.hero-list li::before {
    content: '•';
    color: var(--accent);
    font-weight: 700;
    margin-right: 8px;
}

.hero-visual {
    position: relative;
    min-height: 320px;
    display: grid;
    place-items: center;
    transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 0.35s ease;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(56, 103, 214, 0.18);
    animation: float 8s ease-in-out infinite;
}

.floating-card img {
    display: block;
    width: 180px;
    height: auto;
}

.floating-card--primary {
    top: 10%;
    right: 12%;
    animation-delay: -2s;
}

.floating-card--secondary {
    bottom: 8%;
    left: 5%;
    animation-duration: 10s;
}

@keyframes float {
    0% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -16px, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

.floating-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(75, 123, 236, 0.18);
    filter: blur(0);
    animation: bubble 12s ease-in-out infinite;
}

.floating-bubble--one {
    width: 120px;
    height: 120px;
    top: 5%;
    left: 5%;
}

.floating-bubble--two {
    width: 180px;
    height: 180px;
    bottom: -6%;
    right: -4%;
    background: rgba(56, 103, 214, 0.22);
    animation-delay: -4s;
}

@keyframes bubble {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(10px, -14px, 0) scale(1.08);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.home-section {
    position: relative;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 32px;
    padding: 48px 56px;
    box-shadow: 0 25px 60px rgba(56, 103, 214, 0.12);
}

.section-header {
    max-width: 680px;
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin: 0 0 12px;
}

.section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.highlight-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.highlight-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 28px;
    box-shadow: inset 0 0 0 1px rgba(75, 123, 236, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(56, 103, 214, 0.18);
}

.highlight-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.highlight-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.steps-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step-card {
    position: relative;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 26px;
    padding: 32px 28px 32px 72px;
    box-shadow: inset 0 0 0 2px rgba(75, 123, 236, 0.08);
    overflow: hidden;
}

.step-number {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 4.6rem;
    font-weight: 700;
    color: rgba(75, 123, 236, 0.14);
    line-height: 1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.step-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.cta-section {
    display: flex;
    justify-content: center;
    background: none;
    box-shadow: none;
    padding: 0;
}

.cta-card {
    background: linear-gradient(135deg, rgba(75, 123, 236, 0.95), rgba(56, 103, 214, 0.95));
    color: #fff;
    border-radius: 32px;
    padding: 48px 56px;
    text-align: center;
    max-width: 780px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(56, 103, 214, 0.35);
}

.cta-card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: clamp(2rem, 3.2vw, 2.8rem);
}

.cta-card p {
    margin: 0 auto 24px;
    max-width: 520px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.home-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px;
    color: var(--muted);
    font-size: 0.95rem;
}

body.app-body {
    background: linear-gradient(180deg, rgba(75, 123, 236, 0.08) 0%, rgba(255, 255, 255, 1) 40%);
}

.page-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    margin-bottom: -80px;
}

.page-header h1 {
    margin: 0;
    font-size: 2.5rem;
}

.page-header p {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 1040px;
    margin: 0 auto 40px;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(56, 103, 214, 0.12);
}

.info-card {
    position: sticky;
    top: 16px;
    align-self: start;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(75, 123, 236, 0.15);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

button {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background-color: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(75, 123, 236, 0.25);
}

button.secondary {
    background-color: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
}

button.secondary:hover {
    box-shadow: none;
    background-color: rgba(75, 123, 236, 0.08);
}

button.tiny {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
    background-color: rgba(75, 123, 236, 0.12);
    color: var(--accent-dark);
    border: 1px solid rgba(75, 123, 236, 0.4);
}

button.tiny:hover {
    transform: none;
    box-shadow: none;
    background-color: rgba(75, 123, 236, 0.22);
}

button.tiny.danger {
    color: var(--danger);
    border-color: rgba(235, 59, 90, 0.4);
    background-color: rgba(235, 59, 90, 0.08);
}

button.tiny.danger:hover {
    background-color: rgba(235, 59, 90, 0.16);
}

.question-block {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    background-color: #fefefe;
    box-shadow: inset 0 0 0 1px rgba(75, 123, 236, 0.05);
}

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

.choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.choice-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.choice-row input[type="text"] {
    padding: 10px;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: grid;
    gap: 12px;
    color: var(--muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(75, 123, 236, 0.12), rgba(75, 123, 236, 0.02));
}

.error-card {
    background: #fff;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(56, 103, 214, 0.18);
    text-align: center;
    max-width: 520px;
}

.error-card h1 {
    margin-top: 0;
    margin-bottom: 16px;
}

.error-card p {
    margin-bottom: 24px;
    color: var(--muted);
}

.button:hover {
    transform: translateY(-2px);
}

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

    .hero-visual {
        order: -1;
        min-height: 260px;
    }

    .home-header {
        padding: 20px 24px;
    }

    .home-main {
        padding: 48px 24px 80px;
        gap: 72px;
    }
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }

    .info-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .home-nav {
        gap: 8px;
    }

    .home-nav a {
        padding: 8px 14px;
    }

    .home-section {
        padding: 40px 32px;
    }

    .cta-card {
        padding: 40px 32px;
    }
}

@media (max-width: 560px) {
    .home-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .step-card {
        padding-left: 56px;
    }

    .step-number {
        font-size: 3.4rem;
        left: 16px;
    }

    .choice-row {
        grid-template-columns: auto 1fr;
        gap: 8px;
    }

    .choice-row button {
        grid-column: span 2;
        justify-self: start;
    }
}
