/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background-red: #dc2626; /* Roter Hintergrund */
    --white: #ffffff;
    --black: #000000;
    --error-red: #ff4444;
    --success-green: #4caf50;
    --shadow: rgba(0, 0, 0, 0.2);
}

html {
    height: 100%;
    height: -webkit-fill-available; /* Für iOS Safari */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling auf iOS */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    min-height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Für iOS Safari */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-red); /* Roter Hintergrund */
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px)); /* iOS Safe Area */
    color: var(--white);
    margin: 0;
    overflow-y: auto !important; /* Scrollen auf allen Geräten erlauben */
    -webkit-overflow-scrolling: touch !important; /* Smooth scrolling auf iOS */
    position: relative;
    width: 100%;
}

.container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: auto; /* Keine feste Höhe - erlaubt Scrollen */
    gap: 20px; /* Normaler Abstand */
    padding: 15px 20px;
    padding-bottom: max(30px, env(safe-area-inset-bottom, 30px)); /* Extra Platz für iOS Navigation */
    box-sizing: border-box;
    position: relative;
}

/* Desktop: Größeres Bild, Scrollen erlaubt */
@media (min-width: 1024px) {
    .container {
        gap: 25px; /* Etwas mehr Abstand auf Desktop */
        padding: 20px;
    }
    
    .app-sketch-image {
        max-width: 350px; /* Größer auf Desktop - gut erkennbar */
    }
}

/* App Sketch Image */
.app-sketch-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    padding: 0;
    animation: fadeInDown 0.8s ease-out;
}

.app-sketch-image {
    max-width: 280px; /* Gute Größe für Mobile/Tablet */
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease, filter 0.3s ease;
    /* Kombinierte Animation: Float + Glow */
    animation: floatAnimation 3s ease-in-out infinite, glowAnimation 2s ease-in-out infinite alternate;
    /* Kein Hintergrund, kein Padding, keine border-radius */
}

/* In-App-Browser (Instagram, Facebook, etc.) - Größere Bildgröße */
@media (max-width: 500px) {
    .app-sketch-image {
        max-width: 240px; /* Größer für In-App-Browser */
    }
}

/* Sehr kleine Viewports (typisch für In-App-Browser) */
@media (max-width: 400px) {
    .app-sketch-image {
        max-width: 220px; /* Größer für sehr kleine In-App-Browser */
    }
}

/* Spezielle Klasse für In-App-Browser */
body.in-app-browser .app-sketch-image {
    max-width: 240px !important; /* Größer für In-App-Browser */
}

@media (max-width: 400px) {
    body.in-app-browser .app-sketch-image {
        max-width: 220px !important; /* Größer für sehr kleine Screens */
    }
}

/* Float Animation - Sanftes Schweben */
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Glow Animation - Sanftes Leuchten */
@keyframes glowAnimation {
    0% {
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
    }
    100% {
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    }
}

/* Hover-Effekt für Desktop - Verstärkt die Animation */
@media (hover: hover) and (pointer: fine) {
    .app-sketch-image:hover {
        transform: translateY(-5px) scale(1.05);
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
        animation-play-state: paused; /* Pausiert Animation beim Hover für bessere Kontrolle */
    }
}

/* Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Anpassungen für das Bild - Mobile/Tablet */
@media (max-width: 1023px) {
    .app-sketch-image {
        max-width: 280px; /* Tablet - gute Größe */
        filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.15));
    }
}

@media (max-width: 768px) {
    .app-sketch-wrapper {
        margin-bottom: 10px;
        padding: 0;
    }
    
    .app-sketch-image {
        max-width: 250px; /* Mobile - gut erkennbar */
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    }
    
    .container {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .app-sketch-wrapper {
        margin-bottom: 8px;
        padding: 0;
    }
    
    .app-sketch-image {
        max-width: 200px; /* Kleiner für normale Mobile */
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    }
    
    .container {
        gap: 12px;
        padding: 10px 15px;
    }
}

/* In-App-Browser spezifische Anpassungen */
body.in-app-browser .container {
    gap: 10px;
    padding: 10px 12px;
}

body.in-app-browser .app-sketch-wrapper {
    margin-bottom: 5px;
}

body.in-app-browser .heading {
    font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
    margin: 4px 0 !important;
}

body.in-app-browser .description {
    font-size: clamp(0.75rem, 2vw, 0.9rem) !important;
    margin: 4px 0 !important;
    padding: 0 8px !important;
}

body.in-app-browser .newsletter-form {
    margin-top: 4px !important;
    gap: 6px !important;
}

body.in-app-browser #emailInput {
    padding: 12px 16px !important;
    font-size: 14px !important;
}

body.in-app-browser .submit-button {
    padding: 12px 18px !important;
    font-size: 13px !important;
}


/* Main Content */
.content {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Kompakterer Abstand */
    flex: 1;
    justify-content: center;
}

/* App Badge */
.app-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.app-badge svg {
    width: 18px;
    height: 18px;
}

.heading {
    font-size: clamp(2rem, 7vw, 5rem);
    font-weight: 800;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin: 8px 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    white-space: nowrap; /* Verhindert Zeilenumbruch */
}

.description {
    font-size: clamp(0.85rem, 2.3vw, 1rem);
    font-weight: 400;
    opacity: 0.92;
    max-width: 800px;
    line-height: 1.6;
    margin: 8px 0;
    padding: 0 15px;
}


/* Newsletter Form */
.newsletter-form {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

/* Honeypot Field (unsichtbar) */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Input Wrapper */
.input-wrapper {
    width: 100%;
    position: relative;
}

#emailInput {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    background: var(--white);
    color: var(--black);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
    font-family: inherit;
}

#emailInput::placeholder {
    color: #999;
}

#emailInput:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#emailInput:invalid:not(:placeholder-shown) {
    border: 2px solid var(--error-red);
}

#emailInput:valid:not(:placeholder-shown) {
    border: 2px solid var(--success-green);
}

/* Error Message */
.error-message {
    display: block;
    color: var(--error-red);
    font-size: 14px;
    margin-top: 8px;
    text-align: left;
    padding-left: 24px;
    min-height: 20px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.error-message:empty {
    display: none;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 50px;
    background: var(--black);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    position: relative;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: #1a1a1a;
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-loader svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 700px;
    width: 100%;
    margin-top: 10px;
    animation: slideIn 0.5s ease;
    text-align: center;
}

.success-message p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

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

/* Old Guide Section */
.old-guide-section {
    width: 100%;
    max-width: 700px;
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.old-guide-text {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    opacity: 0.9;
    margin-bottom: 8px;
    color: var(--white);
    font-weight: 500;
}

.old-guide-subtext {
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    opacity: 0.8;
    margin-bottom: 15px;
    color: var(--white);
}

.old-guide-button {
    width: 100%;
    padding: 16px 32px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--white);
    border-radius: 50px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: inherit;
}

.old-guide-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.old-guide-button:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    width: 100%;
    text-align: center;
    padding: 8px 20px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 8px)); /* Platz für iOS Navigation */
    font-size: 10px;
    opacity: 0.7;
    margin-top: 8px;
    flex-shrink: 0;
}

.footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    }

    .container {
        gap: 10px;
        padding: 12px 15px;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
        min-height: calc(100vh - 24px);
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px);
    }

    .app-badge {
        font-size: 11px;
        padding: 6px 12px;
    }

    .app-badge svg {
        width: 16px;
        height: 16px;
    }

    .heading {
        letter-spacing: 4px;
        font-size: clamp(1.8rem, 9vw, 3.5rem);
        white-space: normal; /* Auf Mobile darf es umbrechen */
        margin: 6px 0;
    }

    .description {
        font-size: clamp(0.8rem, 2.2vw, 0.95rem);
        margin: 6px 0;
        padding: 0 10px;
    }

    .newsletter-form {
        max-width: 100%;
        gap: 8px;
        margin-top: 6px;
    }

    #emailInput {
        padding: 14px 18px;
        font-size: 14px;
    }

    .submit-button {
        padding: 14px 20px;
        font-size: 13px;
        letter-spacing: 1.5px;
    }

    .success-message {
        padding: 14px 18px;
    }

    .success-message p {
        font-size: 13px;
    }

    .old-guide-button {
        padding: 14px 20px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .old-guide-text {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .old-guide-subtext {
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    .footer {
        font-size: 9px;
        padding: 6px 15px;
        padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
        margin-top: 6px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    }

    .container {
        gap: 8px;
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
        max-width: 100%;
        min-height: calc(100vh - 20px);
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px);
    }

    .heading {
        letter-spacing: 3px;
        font-size: clamp(1.6rem, 11vw, 2.2rem);
        white-space: normal; /* Auf sehr kleinen Screens darf es umbrechen */
        margin: 5px 0;
    }

    .description {
        font-size: clamp(0.75rem, 2vw, 0.9rem);
        margin: 5px 0;
        padding: 0 8px;
    }

    .newsletter-form {
        gap: 6px;
        margin-top: 5px;
    }

    #emailInput {
        padding: 12px 16px;
        font-size: 13px;
    }

    .submit-button {
        padding: 12px 18px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .old-guide-section {
        margin-top: 6px;
        padding-top: 6px;
    }

    .footer {
        font-size: 8px;
        padding: 5px 12px;
        padding-bottom: max(5px, env(safe-area-inset-bottom, 5px));
        margin-top: 5px;
    }

    .logo-placeholder svg {
        width: 80px;
        height: 80px;
    }

    .footer {
        font-size: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
#emailInput:focus-visible,
.submit-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

