/* ─── Login Screen (Hero Landing) ─────────────────────── */
.login-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 200;
    overflow: hidden;
}

.landing-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 60% 40%, rgba(108,114,203,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 20% 70%, rgba(139,102,193,0.1) 0%, transparent 60%);
}

.landing-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Top Nav ── */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
}

.landing-nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.landing-nav-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.landing-nav-signin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    background: #fff;
    color: #333;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    text-decoration: none;
    font-family: var(--font);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.landing-nav-signin:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

/* ── Hero Section ── */
.landing-hero {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 0 48px 60px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ── Left Column ── */
.landing-hero-left {
    flex: 0 0 50%;
    max-width: 560px;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    color: var(--accent-light);
    font-size: 12.5px;
    font-weight: 500;
    margin-bottom: 24px;
}

.landing-heading {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}

.landing-heading-accent {
    color: var(--accent-light);
}

.landing-subheading {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 32px;
    max-width: 440px;
}

.landing-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.landing-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-check-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    flex-shrink: 0;
}

.landing-check-item span {
    font-size: 14.5px;
    color: var(--text);
    font-weight: 500;
}

.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    background: #fff;
    color: #333;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    font-family: var(--font);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

.landing-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.landing-cta-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
}

.login-error {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--red);
    background: var(--red-bg);
    border: 1px solid var(--red-border);
}

/* ── Right Column ── */
.landing-hero-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 380px;
}

.landing-avatar {
    width: 160px;
    height: 160px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.landing-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 40px;
    object-fit: cover;
    box-shadow: 0 0 60px rgba(108,114,203,0.4), 0 0 120px rgba(108,114,203,0.15);
}

.landing-ring {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid var(--border);
    z-index: 1;
    animation: landing-spin 20s linear infinite;
}

/* ── Floating Cards ── */
.landing-float-card {
    position: absolute;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    opacity: 0.35;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-float-card.active {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.landing-float-0 {
    top: 4%;
    right: 0%;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
}

.landing-float-1 {
    bottom: 18%;
    right: -4%;
    background: var(--yellow-bg);
    border: 1px solid var(--yellow-border);
}

.landing-float-2 {
    top: 36%;
    left: -8%;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
}

.landing-float-3 {
    bottom: 4%;
    left: 2%;
    background: var(--green-bg);
    border: 1px solid var(--green-border);
}

.landing-float-icon {
    font-size: 16px;
}

.landing-float-text {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
}

.landing-float-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* Logout button in top bar */
.btn-logout-top {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-logout-top:hover {
    background: var(--red-bg);
    color: var(--red);
    border-color: var(--red-border);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .chat-panel.with-preview {
        flex: 1;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .preview-panel {
        flex: 1;
        max-height: 50vh;
    }

    .message-user .message-bubble {
        max-width: 95%;
    }

    .chat-messages > * {
        width: calc(100% - 32px);
    }

    /* Landing responsive */
    .landing-nav {
        padding: 16px 20px;
    }

    .landing-hero {
        flex-direction: column;
        padding: 0 20px 40px;
        gap: 32px;
    }

    .landing-hero-left {
        flex: none;
        max-width: 100%;
    }

    .landing-hero-right {
        display: none;
    }
}

/* ─── Frozen state (complete step) ─────────────────────────────── */
.frozen {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.25s ease;
}

/* ─── Top Bar: Separator & Mode Badge ────────────────────── */
.top-bar-sep {
    color: var(--border);
    font-size: 14px;
    margin-left: 4px;
}

.top-bar-mode-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    font-weight: 500;
}

/* ─── Top Bar Button Tooltips ────────────────────────────── */
.top-btn-wrapper {
    position: relative;
}

.top-btn-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    white-space: nowrap;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11.5px;
    color: var(--text-secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.top-btn-wrapper:hover .top-btn-tooltip {
    opacity: 1;
}

