* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f7f7f7;
    --bg-white: #ffffff;
    --text: #1a1a1a;
    --text-muted: #666666;
    --accent: #003BFF;
    --accent-gold: #FFE057;
    --accent-gold-hover: #FDD700;
    --border: #e5e5e5;
    --chat-bubble: #ffffff;
    --chat-bubble-user: #003BFF;
    --success: #FF0055;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', 'Helvetica Neue', sans-serif;
    font-size: 18px;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    line-height: 1.3;
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg) 100%);
}

.hero-content {
    max-width: 800px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    margin-bottom: 24px;
    color: var(--text);
}

.hero-subline {
    font-size: clamp(20px, 3vw, 28px);
    color: var(--text-muted);
    margin-bottom: 48px;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    padding: 20px 48px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.cta-button-large {
    padding: 24px 64px;
    font-size: 18px;
}

.cta-link {
    color: var(--accent);
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.cta-link:hover {
    opacity: 0.8;
}

/* ==================== CHAT SECTION ==================== */
.chat-section {
    min-height: 100vh;
    padding: 40px 24px 80px;
    display: flex;
    justify-content: center;
}

.chat-section-full {
    min-height: 100vh;
    padding: 60px 24px 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg) 100%);
}

.chat-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.chat-avatar-header {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    min-height: 48px;
    max-height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
}

.chat-status {
    font-size: 13px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-messages {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Chat Message Styles */
.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-avatar,
.chat-message img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.chat-bubble {
    max-width: 100%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 17px;
    line-height: 1.5;
    white-space: pre-line;
}

.chat-message:not(.user) .chat-bubble {
    background: var(--chat-bubble);
    border: 1px solid var(--border);
}

.chat-message.user .chat-bubble {
    background: var(--chat-bubble-user);
    color: white;
}

.chat-bubble strong {
    font-weight: 600;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Typing Hint - erscheint nach 1.5s, NEBEN der Bubble, wechselt dynamisch */
.typing-hint {
    font-size: 11px;
    color: var(--text-muted);
    align-self: center;          /* Vertikal zentriert zur Bubble */
    white-space: nowrap;         /* Kein Umbruch */
    opacity: 0;
    animation: fadeInHint 0.4s ease forwards;
    animation-delay: 1.5s;
    letter-spacing: 0.01em;
    transition: opacity 0.2s ease;  /* Für smooth Text-Wechsel */
}

@keyframes fadeInHint {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* Choice Buttons */
.chat-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.choice-btn {
    background: var(--bg-white);
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 14px 20px;
    min-height: 44px; /* Apple HIG Touch Target */
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.choice-btn:hover {
    background: var(--accent);
    color: white;
}

.choice-btn:active {
    transform: scale(0.98);
}

.choice-btn-animate {
    animation: choicePulse 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes choicePulse {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    50% {
        opacity: 1;
        transform: translateX(0);
        box-shadow: 0 0 12px rgba(0, 59, 255, 0.4);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        box-shadow: none;
    }
}

/* Benefit Cards */
.benefit-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}

.benefit-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.benefit-card-emoji {
    font-size: 24px;
}

.benefit-card-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.benefit-card-text {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.benefit-card-reason {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
}

/* Chat Input */
.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-white);
}

.chat-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    overflow: hidden;
    min-height: 48px;
    max-height: 150px;
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.chat-send-btn:hover {
    background: #0030cc;
    transform: scale(1.05);
}

/* ==================== SOFT CTA ==================== */
.soft-cta {
    padding: 40px 24px;
    display: flex;
    justify-content: center;
}

.soft-cta-card {
    max-width: 400px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 32px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.soft-cta-card p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 12px;
}

.cta-link-subtle {
    color: var(--accent);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.cta-link-subtle:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ==================== FINAL CTA ==================== */
.final-cta {
    padding: 80px 24px;
    display: flex;
    justify-content: center;
}

.cta-card {
    max-width: 560px;
    background: var(--bg-white);
    border: 2px solid var(--accent);
    border-radius: 24px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,59,255,0.1);
}

.cta-tagline {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 24px;
    font-weight: 500;
}

.cta-price {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(56px, 10vw, 80px);
    color: var(--text);
    margin-bottom: 8px;
}

.cta-period {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.cta-spots {
    display: inline-block;
    background: var(--success);
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 32px;
}

.cta-meta {
    margin-top: 24px;
    font-size: 15px;
    color: var(--text-muted);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-white);
    padding: 60px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-cta {
    margin-bottom: 32px;
}

.footer-contact {
    margin-bottom: 24px;
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-contact a {
    color: var(--accent);
    text-decoration: none;
    font-size: 18px;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-legal {
    margin-bottom: 24px;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 12px;
    font-size: 14px;
}

.footer-legal a:hover {
    color: var(--text);
}

.footer-author {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

/* ==================== NO-TECH MESSAGE ==================== */
.no-tech-message {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    white-space: pre-line;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
}

/* ==================== CHAT CTA BUTTON ==================== */
.chat-cta-wrapper {
    margin: 20px 0 12px;
}

.chat-cta-button {
    display: inline-block;
    background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chat-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

/* ==================== STICKY NAV ==================== */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 24px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sticky-nav-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-nav-branding {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sticky-nav-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 18px;
    color: var(--text);
}

.sticky-nav-author {
    font-family: 'DM Sans', 'Helvetica Neue', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: -5px;
}

.sticky-nav-button {
    padding: 10px 16px;
    font-size: 14px;
}

body.has-sticky-cta .chat-section-full {
    padding-top: 70px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 80px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-subline {
        font-size: 18px;
        margin-bottom: 32px;
    }

    .cta-button {
        padding: 18px 36px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    .chat-section {
        padding: 20px 16px 60px;
    }

    .chat-bubble {
        max-width: 85%;
        font-size: 17px;
    }

    .choice-btn {
        padding: 12px 16px;
        font-size: 15px;
    }

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

    .cta-price {
        font-size: 48px;
    }

    .footer-legal a {
        display: block;
        margin: 10px 0;
    }

    .sticky-nav-button {
        padding: 8px 12px;
        font-size: 13px;
        width: auto;  /* Überschreibt width: 100% von .cta-button */
    }

    .sticky-nav-branding {
        gap: 0;
    }

    .sticky-nav-title {
        font-size: 16px;
    }

    .sticky-nav-author {
        font-size: 12px;
        margin-top: -7px !important;
    }

    .chat-messages {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ==================== EMAIL CAPTURE FORM ==================== */
.email-capture-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.email-capture-input {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.email-capture-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 59, 255, 0.1);
}

.email-capture-input:disabled {
    background: var(--bg);
    color: var(--text-muted);
}

.email-capture-btn {
    background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.email-capture-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.email-capture-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .email-capture-input {
        padding: 12px 16px;
        font-size: 16px;
    }

    .email-capture-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ==================== INLINE INPUT FORM ==================== */
.inline-input-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.inline-input {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.inline-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 59, 255, 0.1);
}

.inline-input:disabled {
    background: var(--bg);
    color: var(--text-muted);
}

.inline-input-btn {
    background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.inline-input-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.inline-input-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .inline-input {
        padding: 12px 16px;
        font-size: 16px;
    }

    .inline-input-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ==================== EMBED MODE (für iframe-Widget) ==================== */
body.embed-mode .sticky-nav {
    display: none !important;
}

body.embed-mode .footer {
    display: none !important;
}

body.embed-mode .soft-cta,
body.embed-mode .final-cta {
    display: none !important;
}

body.embed-mode .chat-section-full {
    padding: 0 !important;
    min-height: 100vh;
}

body.embed-mode.has-sticky-cta .chat-section-full {
    padding: 0 !important;
}

/* Container nimmt volle Breite */
body.embed-mode .chat-container {
    max-width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Messages-Bereich scrollbar, Platz für sticky Input */
body.embed-mode .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 90px; /* Platz für sticky Input */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Nachrichten am unteren Rand, direkt über Input */
}

/* Input-Leiste sticky am unteren Rand */
body.embed-mode .chat-input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

/* Brand-Farbe nur im eingebetteten Chat-Widget */
body.embed-mode .chat-send-btn {
    background: #ff0055;
}

body.embed-mode .chat-send-btn:hover {
    background: #cc0044;
}

/* ==================== SCROLL TO BOTTOM BUTTON ==================== */
.scroll-to-bottom {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.scroll-to-bottom.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-bottom:hover {
    background: #0030cc;
}

body.embed-mode .scroll-to-bottom {
    bottom: calc(70px + env(safe-area-inset-bottom));
}

/* ==================== IN-CHAT ERROR MESSAGES ==================== */
.chat-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-error::before {
    content: "⚠️";
}
