@font-face {
  font-family: 'mydigital';
  src: url('fonts/mydigital.ttf') format('truetype');
}


* {
  box-sizing: border-box;
}

:root{
	--strFontFace:       Arial,sans-serif;
	--strFontSize:       12pt;
	--strTextColor:      #000000;
	--strTitleColor:     #000000;

	--strFuncLightColor: #999999;
	--strFuncShadeColor: #7f7f7f;
	--strLinkColor:      #000000;
	--strVLinkColor:     #000000;
	
	--strNavBarColor:    #FFFFFF;
	--strNavLightColor:  #ffffff;
	--strNavShadeColor:  #7f7f7f;
	--strNavTextColor:   #000000;
	
	--strPageBGColor:    #FFFFFF;
	--strExBGColor:      #FFFFFF;
	--strExBGColor2:	 #333333;
}


body {
  margin: 0;
  font-family: sans-serif;
}

.footer {
		display: block;
		position: fixed;
		bottom: 0;
		text-align: center;
		margin-left: 4px;
		font-size: 12px;
		background-color: white;
		left: 0;
		right: 0;
		}
		
	a:link {
		color: var(--strLinkColor);
		}
		
	a:visited {
		color: var(--strLinkColor);
		}
	
	a:hover {
		color: #f00;
		}

/* ===================== Layoutstruktur ===================== */
	.FuncButton2 {
		display: inline-block;
		border-style: solid;
		border-radius: 0.4em;
		padding: 0.3em;
		min-width: 3em;
		border-left-color: var(--strFuncLightColor);
		border-top-color: var(--strFuncLightColor);
		border-right-color: var(--strFuncShadeColor);
		border-bottom-color: var(--strFuncShadeColor);
		color: var(--strTextColor);
		background-color: #ffffff;
		border-width: 0.5pt;
		cursor: pointer;	
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

	}

	.FuncButton2:active {
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
		background-color: var(--strExBGColor2);

	}

	.FuncButton2:hover{
		color: var(--strExBGColor);
		background-color: var(--strExBGColor2);
	}


.main-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  height: auto;
}

.analog-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.analog-container {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  min-width: 300px;
}

.analog-wrapper {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1; /* 1:1 Quadrat */
}


#analogClock {
  position: relative;
  width: 100%;
  height: auto;
}

.digital-word-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-width: 300px;
}

.digital-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px;
  gap: 20px;
}

/* ===================== Digital Clock ===================== */


.digital-clock {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ddd; /* LCD-Hintergrund */
  color: #111;
  font-family: 'mydigital', monospace;
  font-size: 2.5em;
  border: 3px solid #222; /* innerer schwarzer Rahmen */
  border-radius: 4px; /* nur oben links + rechts abgerundet */
  position: relative;
  margin: 5px;

  /* Asymmetrischer mehrstufiger Rahmen (größer oben/unten) */
  box-shadow:
    0 0 0 1px #ccc,     /* graue Linie oben */
    0 0 0 1px #ccc,      /* graue Linie unten */
    0 -27px 0 8px #222,    /* schwarzer Bereich oben */
    0 27px 0 8px #222,     /* schwarzer Bereich unten */
    0 -28px 0 12px #007bff,/* blauer Bereich oben */
    0 28px 0 12px #007bff, /* blauer Bereich unten */
    0 -30px 0 16px #222,   /* äußerer Abschluss oben */
    0 30px 0 16px #222;    /* äußerer Abschluss unten */
}

/* Feedback richtige Uhrzeit */
.digital-clock.sync-equal {
  box-shadow:
    0 0 0 1px #ccc,
    0 0 0 1px #ccc,
    0 -27px 0 8px #222,
    0 27px 0 8px #222,
    0 -28px 0 12px #ace435, /* grün oben */
    0 28px 0 12px #ace435, /* grün unten */
    0 -30px 0 16px #222,
    0 30px 0 16px #222;
}

.digital-clock.sync-unequal {
  box-shadow:
    0 0 0 1px #ccc,
    0 0 0 1px #ccc,
    0 -27px 0 8px #222,
    0 27px 0 8px #222,
    0 -28px 0 12px #dc3545, /* rot oben */
    0 28px 0 12px #dc3545, /* rot unten */
    0 -30px 0 16px #222,
    0 30px 0 16px #222;
}


.digital-font {
  font-family: 'Courier', monospace;
  font-size: 2.6em;
}



.font-toggle-wrapper {
  margin-top: 5px;
}

#toggleFontBtn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.3em;
  cursor: pointer;
  color: #ddd;
  transition: background 0.2s;
  position: absolute;
  top: 60px;
  right: 100px;
}

#toggleFontBtn:hover {
  background: rgba(0, 0, 0, 0.05);
}

#dh {
  display: inline-block;
  width: 2ch; /* Breite für zweistellige Zahl */
  text-align: right;
}



#timerOverlay {
position: fixed;
       top: 50%;
       left: 50%;
       transform: translate(-50%, -50%);
       max-width: 80vw;
       max-height: 80vh;
       z-index: 9999;
       opacity: 0;
       pointer-events: none;
       transition: opacity 1s ease;
}

body.manual-mode .font-toggle-button {
  display: none;
}


.digital-clock .small {
  font-size: 0.6em;
}

/* ===================== Pfeile ===================== */

.time-segment {
  display: inline-block;
  margin: 0 5px;
  position: relative;
}

.arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6em;
  cursor: pointer;
  user-select: none;
  visibility: hidden;
  color: #ddd;
}


body.manual-mode .arrow {
  visibility: visible;
}


.arrow.up {
  top: -32px;
}

.arrow.down {
  bottom: -30px;
}

/* ===================== Wortuhr ===================== */

#word-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ddd;
  font-family: 'Courier', monospace;
  background-image: url(".png");
  background-position: center;
  background-size: 100%;
  
  /* ✅ NEU: Runder Rahmen */
  border: 2px dotted #ace435;
  border-radius: 50%;
  padding: 20px;
  width: 210px;
  height: 210px;
  box-sizing: border-box;
  justify-content: center;
}


.row {
  display: flex;
  justify-content: center;
  margin: 2px 0;
}

.active {
  color: #ace435;
  font-weight: bold;
}

/* ===================== Button-Bar ===================== */

.button-bar {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		margin-bottom: 10px;
		gap: 10px;
		margin: 10px;
}



.button-bar button,
.button-bar input[type=range] {
  position: relative;
  border: none;
  border-radius: 0.4em;
  padding: 0.3em;
  min-width: 3em;
  color: #000;
  background-color: #fff;
  border-width: 0.5pt;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  gap: 20px;
}

/* Aktive Buttons hervorheben */
.button-bar button.active {
  border: #007bff;
  box-shadow: 0 0 5px #007bff;
}

	#custom-buttons {
	  display: flex;
	  justify-content: center;
	  gap: 20px; /* Abstand zwischen Buttons */
	  margin-top: 20px;
	  margin-bottom: 10px;
	}

/* Timer Button */
#timerBtn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}




/* ===================== Responsive ===================== */



@media screen and (max-width: 768px) {
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  #custom-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
    gap: 10px;
  }

  .toolbar button,
  #custom-buttons button {
    min-width: 3em;
    margin: 5px;
    text-align: center;
  }
