/* Grundlegende Einstellungen für saubere mobile Ansicht */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh;
    margin: 0;
    padding: 20px 10px;
    background-color: #f0f4f8; 
    color: #333;
    text-align: center;
    line-height: 1.4;
}

main {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); 
    max-width: 450px; 
    width: 100%;
}

h1 {
    color: #8e44ad; 
    margin-bottom: 30px;
    font-size: 1.8em;
}

h2 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* Trennlinie */
hr {
    margin: 30px 0; 
    border: 0; 
    border-top: 2px solid #ecf0f1;
}

/* Stil für die vordefinierten Options-Buttons */
.options {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    margin-bottom: 30px;
}

button {
    padding: 20px 15px; 
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background-color: #27ae60; 
    color: white;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center; 
    display: block; 
    width: 100%; 
}

button:hover {
    background-color: #229954;
    transform: translateY(-2px);
}

/* Styling für die Custom-Eingaben */
.custom-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.custom-input-group input {
    padding: 15px; 
    border: 2px solid #bdc3c7; 
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box; 
}

/* Spezieller Stil für die Custom-Buttons */
.custom-input-group button:nth-of-type(1) { /* Custom Wählen Starten */
    background-color: #f39c12; 
}
.custom-input-group button:nth-of-type(2) { /* Speichern */
    background-color: #3498db; 
}
.custom-input-group button:nth-of-type(3) { /* Löschen */
    background-color: #e74c3c; 
}


/* --- ANSICHTEN (Views) --- */

.view {
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: opacity 0.3s ease-in-out; 
}

.view.hidden {
    display: none; 
    opacity: 0;
}

.view.active {
    opacity: 1;
}

/* --- ZUFALLS-ANSICHT (Ergebnis-Fokus) --- */

#zufall-title {
    color: #3498db; 
    margin-bottom: 20px; /* Reduziert, damit mehr auf den Bildschirm passt */
    font-size: 1.4em; /* Reduziert, damit mehr auf den Bildschirm passt */
    font-weight: 600;
}

#ergebnis-container {
    /* Padding reduziert für ein kompakteres Feld */
    padding: 20px 15px; 
    border: 4px solid #3498db; 
    border-radius: 15px;
    /* Mindesthöhe reduziert für ein kompakteres Feld */
    min-height: 80px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ecf0f1;
    transition: background-color 0.3s;
}

#ergebnis {
    /* Schriftgröße reduziert, damit das Ergebnis nicht den ganzen Bildschirm füllt */
    font-size: 36px; 
    font-weight: 900;
    color: #e74c3c; 
    margin: 10px 0 0 0;
    word-break: break-word;
}

/* Styling für die Action-Buttons in der Ergebnis-Ansicht */
#view-zufall #ziehen-button {
    margin-top: 15px;
    background-color: #2980b9; /* Blau für Ziehen */
}

#view-zufall button:nth-of-type(2) {
    background-color: #95a5a6; /* Grau für Zurück */
}

/* Animation */
.highlight {
    background-color: #f1c40f; 
    transform: scale(1.02);
}