body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.generator-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.controls {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

input:focus, select:focus {
    border-color: #007bff;
}

/* Das Vorschaubild-Layout */
.preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    background: #fafafa;
    border-radius: 10px;
    border: 2px dashed #ccc;
    padding: 20px;
    margin-bottom: 20px;
}

/* Haupt-Container für das Schild-Smiley-Duo */
.character-container {
    display: flex;
    flex-direction: row; 
    align-items: flex-end; 
    position: relative;
    background-color: transparent; /* Geändert zu transparent */
}

/* Das Schild-System (Schild über dem Stab) */
.sign-post {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: -60px; 
    z-index: 2;
}

/* Fixe Größe für das Schild */
.sign {
    background-color: #fffdd0;
    border: 3px solid #8b5a2b;
    border-radius: 5px;
    width: 160px;        
    height: 90px;       
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-weight: bold;
    font-size: 18px;    
    line-height: 1.2;
    word-break: break-word; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: #333;
    overflow: hidden;   
}

.sign-text {
    width: 100%;
    text-align: center;
}

/* Container für den Stab und die Hand */
.stick-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 120px; 
    margin-top: -3px;
}

.stick {
    width: 12px;
    height: 100%;
    background-color: #8b5a2b;
    z-index: 2; 
}

.hand {
    position: absolute;
    font-size: 38px;
    z-index: 1; 
    user-select: none;
    top: 45%; 
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg); 
}

.smiley {
    font-size: 80px;
    line-height: 1;
    user-select: none;
    z-index: 3; 
    margin-bottom: 25px; 
}

/* Der Teilen-Button */
.share-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.share-btn:hover {
    background-color: #218838;
}

.share-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Verstecktes Canvas Element für die Bildgenerierung im Hintergrund */
#hiddenCanvas {
    display: none;
}
