/* --- Basis-Einstellungen --- */
body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Georgia', serif; 
    /* Nutzt dein lokales Bild: vignes_heiligenstein.jpg */
    background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('vignes_heiligenstein.jpg'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    color: #2c1e1e; 
    position: relative;
    box-sizing: border-box;
}

/* --- Die Karte (Responsive) --- */
.card { 
    background-color: rgba(255, 255, 255, 0.95); 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.4); 
    width: 90%;          /* Wichtig für Mobile: Nutzt 90% der Breite */
    max-width: 650px;    /* Begrenzt die Breite auf großen Bildschirmen */
    text-align: center; 
    margin: 20px auto; 
    border-top: 6px solid #8b0000;
    box-sizing: border-box; /* Verhindert, dass Padding die Breite sprengt */
}

h1 { 
    color: #8b0000; 
    font-size: 2em; 
    margin-bottom: 25px;
}

p { 
    font-size: 1.15em; 
    line-height: 1.7; 
    margin-bottom: 18px;
}

/* --- Formular-Elemente (Responsive angepasst) --- */
input { 
    padding: 12px; 
    margin: 10px 0; 
    border: 2px solid #ccc;
    border-radius: 8px; 
    width: 100%;         /* Von 300px auf 100% geändert */
    max-width: 350px;    /* Maximale Breite für Desktop */
    box-sizing: border-box;
    font-size: 16px;     /* Verhindert automatisches Zoomen am iPhone */
}

button { 
    padding: 12px 25px; 
    background-color: #007BFF; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer;
    font-size: 1em;
    width: 100%;         /* Button passt sich mobil an */
    max-width: 200px;
    transition: background 0.3s;
}

button:hover { 
    background-color: #0056b3;
}
#downloadArea { 
    display: none; 
    margin-top: 20px; 
    padding: 15px; 
    border-top: 2px solid #eee;
    }
.error { 
    color: red; 
    font-size: 0.9em; 
    display: none;
    }    

/* --- Navigation & Links --- */
.retour-link, .weiter-link {
    position: fixed;
    bottom: 15px;        /* Etwas mehr Abstand für Touch-Bedienung */
    font-size: 0.75em;
    color: rgb(255, 255, 255, 0.7);
    text-decoration: none;
    letter-spacing: 1px;
    font-family: Arial, sans-serif;
    z-index: 9999; 
    transition: color 0.3s ease;
    background: rgb(0,0,0,0.2); /* Leichter Hintergrund zur Lesbarkeit */
    padding: 4px 8px;
    border-radius: 4px;
}

.retour-link { left: 15px; }
.weiter-link { right: 15px; }

.retour-link:hover, .weiter-link:hover {
    color: #ffffff;
    background: rgb(0,0,0,0.4);
}

/* --- Preview-Bereich --- */
.preview-container {
    margin: 30px auto;
    width: 100%;
    max-width: 300px;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background-color: white;
}
.preview-image {
    width: 100%; 
    height: auto; 
    display: block;
    }

/* --- MEDIA QUERIES (Handy-Optimierung) --- */
@media (max-width: 600px) {
    .card {
        padding: 25px 15px; /* Weniger Padding auf kleinen Displays */
        margin: 10px;
    }

    h1 {
        font-size: 1.5em; /* Kleinerer Titel auf dem Handy */
    }

    p {
        font-size: 1em;   /* Text etwas kompakter */
    }

    .retour-link, .weiter-link {
        font-size: 0.65em; /* Links dezent halten */
        bottom: 10px;
    }
}
