:root {
    --color-bg: #f9f9f9;
    --color-text: #000000;
    --color-muted: #6e6e6e;
    --color-dark: #1e1e1e;
    --color-border: #f1f1f1;
    --color-border-soft: #efefef;
    --color-pill: #e8e3eb;
    --shadow-card: 0.45375rem 0.45375rem 0.75625rem rgba(144, 0, 163, 0.05), 0.1134375rem 0.1134375rem 0.15125rem rgba(52, 0, 77, 0.05);
    --shadow-strong: 0.45375rem 0.625rem 0.75625rem rgba(144, 0, 163, 0.03), 0.1134375rem 0.1134375rem 0.15125rem rgba(52, 0, 77, 0.03);
    --hero-width: 90rem;
    --hero-height: 59.375rem;
    --font-body: "GoogleSansRegular", "Inter", system-ui, -apple-system, sans-serif;
    --font-brand: "KamerikBold", "Google Sans", "Inter", sans-serif;
}

html {
    font-size: 1vw;
}

@font-face {
    font-family: 'GoogleSansRegular';
    src: url('./assets//fonts/GoogleSans-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'GoogleSansMedium';
    src: url('./assets//fonts/GoogleSans-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'KamerikBold';
    src: url('./assets//fonts/Kamerik-105-W-Bold.ttf') format('truetype');
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: linear-gradient(180deg, rgba(228, 216, 240, 0.3) 4.4632%, rgba(249, 249, 249, 0) 100%), linear-gradient(90deg, var(--color-bg) 0%, var(--color-bg) 100%);
    min-height: 100vh;
    overflow: hidden;
}

.stage {
    --scale: min(1, calc((100vw - 1.5rem) / 90));
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.canvas {
    position: relative;
    width: var(--hero-width);
    min-height: var(--hero-height);
    transform: scale(var(--scale));
    transform-origin: top center;
}

.lines {
    position: absolute;
    left: 4.25rem;
    top: 0;
    width: calc(100% - 8.5rem);
    height: 100%;
    pointer-events: none;
    opacity: 0.9;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 0, rgba(0, 0, 0, 0) 100%), linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 0, rgba(0, 0, 0, 0) 100%), linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 0, rgba(0, 0, 0, 0) 100%), linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 0, rgba(0, 0, 0, 0) 100%);
    background-size: 0.0625rem 100%, 0.0625rem 100%, 0.0625rem 100%, 0.0625rem 100%;
    background-position: 0 0, calc(33.333% - 0.03125rem) 0, calc(66.666% - 0.03125rem) 0, 100% 0;
    background-repeat: no-repeat;
}

.city {
    position: absolute;
    left: calc(50% + 3.375rem);
    top: 0.45rem;
    width: 86.4rem;
    height: 57.6rem;
    transform: translateX(-50%);
    opacity: 0.1;
    object-fit: cover;
    pointer-events: none;
}

header {
    position: absolute;
    top: 2.5625rem;
    left: 0;
    width: 100%;
    padding: 0 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
}

.session {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.125rem 2rem;
    border: none;
    border-radius: 6.25rem;
    background: var(--color-dark);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'GoogleSansMedium';
}

    .session:after {
        content: ' ';
        display: block;
        height: 0.75rem;
        width: 0.75rem;
        background-image: url(./assets/arrow.svg);
        background-size: cover;
        background-repeat: no-repeat;
    }

.welcome {
    position: absolute;
    top: 11.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4375rem 0.5rem;
    border: 1px solid var(--color-pill);
    border-radius: 6.25rem;
    background: transparent;
    text-wrap: nowrap;
}

.welcome-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border-radius: 1.875rem;
    padding: 0.8125rem 1.25rem 0.75rem;
    box-shadow: var(--shadow-strong);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

    .welcome-inner img {
        width: 1.625rem;
        height: 1.625rem;
        object-fit: contain;
    }

    .welcome-inner strong {
        font-family: var(--font-brand);
        font-weight: 700;
        letter-spacing: 0.02em;
    }

.title {
    position: absolute;
    top: 16.5625rem;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9375rem;
}

.title-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0.875rem;
}

.title h1 {
    margin: 0;
    font-size: 4.375rem;
    line-height: 5.25rem;
    font-weight: 400;
    color: var(--color-text);
}

.gradient {
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.with-ai {
    background: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.3) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.uae-flag,
.ai-icon {
    width: 3.153875rem;
    height: 3.153875rem;
    position: relative;
    flex-shrink: 0;
}

.uae-flag {
    transform: rotate(-10deg);
}

.uae-card, .ai-card {
    position: absolute;
    inset: 0;
    border-radius: 0.75625rem;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.uae-inner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url(./assets/uae.png);
    background-repeat: no-repeat;
    background-size: contain;
    width: 1.625rem;
    height: 1.625rem;
}

.ai-icon {
    transform: rotate(10deg);
}

.ai-inner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url(./assets/ai.png);
    background-repeat: no-repeat;
    background-size: contain;
    width: 1.5rem;
    height: 1.5rem;
}

.subtitle {
    position: absolute;
    top: 29.415625rem;
    left: 50%;
    width: 37.25rem;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.75rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.5);
    text-align: center;
}

.prompt {
    position: absolute;
    top: 34.375rem;
    left: 50%;
    transform: translateX(-50%);
    width: 53.75rem;
}

.prompt-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 2.125rem;
    padding: 1.125rem 1.25rem;
    box-shadow: 0 1.25rem 2.875rem rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prompt-input-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-height: 4.375rem;
}

.prompt-icon {
    width: 1.75rem;
    height: 1.4375rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    object-fit: cover;
}

.prompt-textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: var(--color-text);
    font-weight: 400;
    font-family: var(--font-body);
    background: transparent;
    min-height: 1.75rem;
    max-height: 12.5rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

    .prompt-textarea::-webkit-scrollbar {
        width: 0.375rem;
    }

    .prompt-textarea::-webkit-scrollbar-track {
        background: transparent;
    }

    .prompt-textarea::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0.1875rem;
    }

    .prompt-textarea::placeholder {
        color: var(--color-muted);
    }

.prompt-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
}

.prompt-actions-left {
    display: flex;
    align-items: center;
}

.prompt-actions-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.action-btn {
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 6.25rem;
    border: 1px solid var(--color-border-soft);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

    .action-btn:after {
        content: '';
        display: block;
        width: 1.5rem;
        height: 1.5rem;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .action-btn.dark {
        background: var(--color-dark);
        border-color: var(--color-dark);
    }

    .action-btn.add:after {
        background-image: url('./assets/add.svg');
    }

    .action-btn.voice:after {
        background-image: url('./assets/voice.svg');
    }

    .action-btn.send:after {
        background-image: url('./assets/send.svg');
    }

.mobile--visible {
    display: none;
}

/* ===== Модальное окно регистрации ===== */
.su-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 9999;
    padding: 18px;
    align-items: center;
    justify-content: center;
}

    .su-modal:not([hidden]) {
        display: flex;
    }

.su-sheet {
    font-family: var(--font-body);
    width: min(400px, 96vw);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.15);
    padding: 24px;
    max-height: calc(100vh - 36px);
    overflow: auto;
}

    .su-sheet h3 {
        margin: 0 0 6px 0;
        color: var(--color-text);
        font-size: 17px;
    }

.su-sub {
    margin: 0 0 24px 0;
    color: var(--color-muted);
    font-size: 13px;
}

.su-label {
    display: block;
    margin: 8px 0 6px;
    font-size: 14px;
    color: var(--color-text);
}

.su-input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px 12px;
    font-size: 16px;
    line-height: 1.25;
    outline: none;
    margin-top: 8px;
}

    .su-input:focus {
        border-color: var(--color-dark);
        box-shadow: 0 0 0 3px rgba(30, 30, 30, 0.06);
    }

.su-row {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.su-btn {
    flex: 1;
    padding: 18px 14px;
    font-weight: 700;
    border-radius: 100px;
    background: var(--color-dark);
    color: #fff;
    border: 1px solid var(--color-dark);
    cursor: pointer;
    font-size: 13px;
}

    .su-btn.ghost {
        background: #fff;
        color: var(--color-text);
        border: 1px solid var(--color-border);
    }

.su-msg {
    margin-top: 8px;
    min-height: 18px;
    color: var(--color-muted);
    font-size: 13px;
}

/* ===== Welcome bar ===== */
.welcome-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #f0fdf4;
    color: #14532d;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

    .welcome-bar[hidden] {
        display: none !important;
    }

.logout-btn {
    border: 1px solid #dc2626;
    background: #fff;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

    .logout-btn:hover {
        background: #fee2e2;
    }

/* Стили для переключения между формами */
.auth-form[hidden] {
    display: none !important;
}

.su-toggle {
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 14px;
    color: var(--color-muted);
}

.su-toggle-btn {
    background: none;
    border: none;
    color: var(--color-dark);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-size: 14px;
}

    .su-toggle-btn:hover {
        color: var(--color-text);
    }

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    header {
        padding: 0 2.25rem;
    }

    .lines {
        left: 2.5rem;
        width: calc(100% - 5rem);
    }

    .title {
        top: 22rem;
    }

        .title h1 {
            font-size: 3.125rem;
            line-height: 4rem;
        }

    .subtitle {
        top: 33.5rem;
    }

    .prompt {
        width: 100%;
        padding: 0 2.25rem;
        top: 39rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .mobile--hidden {
        display: none;
    }

    .mobile--visible {
        display: block;
    }

    header {
        padding: 0 1rem;
    }

    button.session span {
        display: none;
    }

    .lines {
        left: 1rem;
        width: calc(100% - 2rem);
    }

    .title {
        gap: 0rem;
    }

        .title h1 {
            font-size: 2.5rem;
            line-height: 4rem;
        }

    .subtitle {
        top: 35.5rem;
        font-size: 1.125rem;
    }

    .prompt {
        width: 100%;
        padding: 0 1rem;
        top: 40.5rem;
    }
}

@media (max-width: 390px) {
    html {
        font-size: 13px;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 12px;
    }
}
