body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background-size: cover;     
  background-position: center; 
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: transparent; 
}

#screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 999999;
  pointer-events: none; 
  display: block;       
}

#screen-overlay.hidden {
  display: none !important;
}

#main-container {
  display: flex;
  flex-direction: column; 
  align-items: center;   
  justify-content: center;
  min-height: 100vh; 
  gap: 6px; 
}

#emailForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent !important;
}

.hidden {
  display: none !important;
}

.auswahl {
  display: flex;
  gap: 6px;          
  margin-bottom: 0;    
}

.email-container {
  display: flex;
  justify-content: center;
  margin-top: -200px; 
}


.email-text {
  font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 1.15rem;  
  max-width: 100%;
  line-height: 1.15;
  white-space: pre-line;
  transition: text-align .3s ease;
  margin-top: 12px;
  border-radius: 5px;
  position: relative;
  padding: 12px;
}

.email-text.hidden {
  display: none;
}

form {
  width: 800px;      
  max-width: 90vw;    
}

.email-layout {
  display: flex;
  gap: 20px;
}

/*/* Falls der Email-Body insgesamt zu hoch ist, hier das Gap verringern */
.email-body {
  display: flex;
  flex-direction: column;
  gap: 30px; /* Verengt den Raum zwischen allen Elementen */
}

.subject-line {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
  font-size: 1.3rem;
  color: #000;
  margin: 0 0 15px 0; /* Abstand nach unten zum ersten Select */
  padding-bottom: 5px;
  position: relative;
  display: inline-block; /* Damit die Linie nur so lang wie der Text ist */
}

.subject-line::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  width: 280px;
}

.email-body select,
.email-text select,
select.tone-select {
  font-size: 1rem;
  font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  margin: 0;           
  padding: 4px 6px;    
  min-width: 120px;
  box-sizing: border-box;
}

.tone span, .tone-label {
  color: rgb(0, 0, 0);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.tone-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  display: block;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
  font-size: 1.1rem; 
  color: #000;
  padding: 4px 0 2px 0; 
  margin: 2px 0 8px 0; /* Weniger Abstand zwischen den Zeilen */
  cursor: pointer;
  border-bottom: 2px solid #7f7e7e !important;
  position: relative;
}

.tone-select::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;  
}

.line-short {
  width: 280px;
  
}

.line-full {
  width: 100%;  
  max-width: 750px;
}

.tone-select:hover {
  border-bottom-width: 3px !important;
}

.tone-cycle {
  cursor: pointer;
  padding: 2px 4px;
  border-bottom: 1px dotted #000;  
}

.tone-cycle:hover {
  background: rgba(0,0,0,0.05);
}

.tone-panel {
  position: fixed;      
  top: 50%;            
  right: 120px;        
  transform: translateY(-50%); 
  width: auto;   
  min-width: 150px;
  padding: 15px;
  border-radius: 12px;
  background: #ffffff;  
  z-index: 99999;
  display: flex;
  flex-direction: column; 
  align-items: flex-start; 
  gap: 15px;            
  box-sizing: border-box;
}

.tone-header {
  display: flex;
  flex-direction: column; 
  justify-content:right;
}

.tone-panel h3,
.politometer-title {
  margin: 0;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
  font-size: 1rem;  
  letter-spacing: 1px;
  font-weight: 600;
  color: #000000;
  text-align: left;     
  
}

.tone-list {
  display: flex;   
  flex-direction: column; 
  gap: 15px;
  align-items: flex-start;
}

.tone-bar {
  position: relative;
  width: 45px;          
  height: 80px;        
  background-color: #ffffff; 
  border-radius: 5px;
  overflow: hidden;     
}

.bar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; 
  z-index: 2;          
  pointer-events: none; 
}

.fill {
  position: absolute;
  bottom: 0;
  width: 80%;           
  left: 10%;            
  height: 0%;           
  z-index: 1;           
  transition: height 0.5s ease;
  border-radius: 10px;   
}

.aggresive { background-color: #dea1b1; }
.friendly { background-color: #daf06c; }
.professional { background-color: #c3ede9; }

.tone {
  display: flex;
  flex-direction: row;    
  align-items: center;    
  gap: 10px;              
}

.gifscreen {
  align-items: center;
  cursor: pointer;
}

.emailForm {
  display: flex;
  justify-content: center;
  width: 100%;
}

.hidden {
  display: none;
}

#startscreen img{
  width: 25vw;      
  height: auto;
  cursor: pointer;
  }


:root {
  --media-width: 20vw;       
  --media-max-width: 600px;
  --media-max-height: 60vh;
  --fade-duration: 0.35s;
  --title-width: 260px;   
  --title-gap: 8px;
  --logo-height: 72px; 
}

.hover-container {
  position: fixed;      
  top: 25%;             
  left: 20px;          
  transform: translateY(-50%); 
  width: auto;   
  z-index: 99999;
  display: flex;
  flex-direction: column; 
  align-items: flex-start; 
  gap: 15px;            
  box-sizing: border-box;
}

/* Anpassung für mobile Geräte */
@media (max-width: 768px) {
  .hover-container {
    top: 25%; /* Auf dem Handy oft noch ein Stück höher nötig wegen der Tastatur/Browserleiste */
    left: 10px;
  }
}

#brief.spin-img {
  /* Die Breite bestimmt nun die Größe relativ zum Bildschirm */
  width: 8vw;          
  min-width: 80px;       /* Verhindert, dass er auf kleinen Handys winzig wird */
  max-width: 200px;      /* Verhindert, dass er auf Riesen-Monitoren zu groß wird */
  padding: 15px;
  display: block;
  transition: transform 0.6s ease;
  cursor: pointer;
  object-fit: contain; 
}


#brief.spin-img:hover {
  top: 40%;             
  transform: rotate(360deg);
}

.hover-brief {
  position: absolute;   
  top: 90%;             
  left: 135px;           
  transform: translateY(-50%); 
  font-size: 14px;
  width: 130px;          
  background: #eee;   
  border-radius: 30px;  
  padding: 15px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  pointer-events: none; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.hover-container:hover .hover-brief {
  max-height: 500px;   
  opacity: 1;
  pointer-events: auto;  
}

@media (max-width: 520px) {
  .tone-panel {
    right: 10px;
    left: 10px;
    top: 10px;
    width: auto;
    padding: 10px;
  }
}

#top-logo-wrap {
  position: fixed;
  top: 0px;
  left: 50%;
  transform: translateX(-50%);
  height: 180px; 
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 400000;
}


#title-genzmail, 
#title-gif {
  height: 100%;
  width: auto;
  transition: opacity 0.8s ease-in-out;
}


#title-gif {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.hidden-title {
  opacity: 0;
  pointer-events: none;
}

.visible-title {
  opacity: 1;
  pointer-events: auto;
}

.hover-container {
  left: -38vw;      
  top: 45vh;       
  transform: translateY(-50%) translateX(0) !important; 
  width: 80px;
  height: 60px;
  z-index: 500000;
}

#startscreen img {
  width: calc(var(--media-width) * 0.63);
  max-width: calc(var(--media-max-width) * 0.63);
  max-height: calc(var(--media-max-height) * 0.63);
  height: auto;
  object-fit: contain;
}


#gifscreen img {
  width: var(--media-width);
  max-width: var(--media-max-width);
  max-height: var(--media-max-height);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}


@keyframes gifFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes gifFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.96); }
}

#gifscreen.show { animation: gifFadeIn var(--fade-duration) ease forwards; }
#gifscreen.hide { animation: gifFadeOut var(--fade-duration) ease forwards; }


.tone-cycle {
  cursor: pointer;
  padding: 2px 6px;
  border-bottom: 1px dotted #000;
  display: inline-block;
  border-radius: 3px;
}

.tone-cycle:hover {
  background: rgba(0,0,0,0.05);
}
.footer-action-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000002; 
}

.ready-btn {
  width: 90px;
  height: 50px;
  border-radius: 30%;
  border: none;
  background: #eee; 
  cursor: not-allowed;
  position: relative;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ready-btn.is-active {
  background: #d4eeff; 
  cursor: pointer;
  box-shadow: 0 0 20px rgba(195, 223, 241, 0.6); 
}

.ready-btn.is-active .btn-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 30%;
  background: rgba(52, 152, 219, 0.4);
  animation: pulse-blue 2s infinite;
  z-index: -1;
}

@keyframes pulse-blue {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.btn-icon {
  width: 100px;
  height: auto;
  z-index: 2;
}

.deko-bild-oben {
  position: absolute;
  top: 150px;          /* Ein Stück über der ersten Zeile */
  right: 360px;        /* Rechts neben den Zeilen (negativer Wert schiebt es nach außen) */
  width: 40px;         /* Deine Wunschgröße */
  height: auto;
  z-index: 10;         /* Liegt über den Linien */
  /* Optional: Etwas drehen, damit es "hingeworfen" aussieht */
  transform: rotate(120deg);
  pointer-events: none; /* Man kann weiterhin durch das Bild auf die Zeilen klicken */
}

@media (max-width: 768px) {
  .deko-bild-oben {
    width: 50px;
    right: 0px;        /* Auf dem Handy lieber bündig am Rand */
    top: -10px;
  }
}
