:root {
  --clr1: #09203F;
  --clr2: #537895;
  --clr3: #09203F;
  --clr4: #537895;
  --btn-bg: rgba(255, 255, 255, 0.85);
  --btn-shadow: rgba(0, 0, 0, 0.15);
  --input-bg: rgba(255, 255, 255, 0.7);
  --input-shadow: rgba(0, 0, 0, 0.05);
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --btn-gap: 0.75rem;
}
html, body { height: 100%; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  min-height: 100vh;
  background: linear-gradient(45deg, var(--clr1), var(--clr2), var(--clr3), var(--clr4));
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #2b2b2b;
}
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.header,
.container {
  width: min(1100px, 94vw);
  background: rgba(255, 255, 255, 0.311);
  border-radius: var(--radius);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 1.5rem;
  margin: 1rem;
  text-align: center;
}
.header h1 { 
  margin: 0 0 .35rem 0; 
  color: #000; 
  font-size: clamp(1.5rem, 4vw, 2rem);
}
.header h2 { 
  margin: 0; 
  font-weight: 500; 
  opacity: .9; 
  color: #000; 
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}
button,
#download-fonts,
.top-controls a,
.url-section button,
a.font-link {
  background: var(--btn-bg);
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
button:hover,
#download-fonts:hover,
.top-controls a:hover,
.url-section button:hover,
a.font-link:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,1);
}
#download-fonts:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.top-controls {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--btn-gap);
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}
.options-control {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  justify-content: center;
  align-items: stretch;
  background: rgba(255,255,255,0.55);
  border-radius: var(--radius);
  padding: .55rem .85rem;
  box-shadow: inset 4px 4px 8px var(--input-shadow), inset -4px -4px 8px #fff;
}
.options-control label {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  width: 100%;
  justify-content: flex-start;
}
.weight-input-container {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.weight-input-container label {
  font-weight: 600;
  color: #0d1b2a;
  font-size: .9rem;
}
.weight-input-container input[type="text"] {
  background: var(--input-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: inset 4px 4px 8px var(--input-shadow), inset -4px -4px 8px #fff;
  padding: .6rem .8rem;
  color: #333;
  font-family: var(--font);
  transition: box-shadow .2s ease;
}
.weight-input-container input[type="text"]:focus {
  outline: 2px solid rgba(36,119,209,0.35);
  box-shadow: inset 2px 2px 6px var(--input-shadow), inset -2px -2px 6px #fff;
}
.weight-input-container small {
  font-size: .8rem;
  color: #666;
  opacity: .8;
}
.format-control {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  background: rgba(255,255,255,0.55);
  border-radius: var(--radius);
  padding: .55rem .85rem;
  box-shadow: inset 4px 4px 8px var(--input-shadow), inset -4px -4px 8px #fff;
}
.format-control label {
  font-weight: 600;
  color: #0d1b2a;
}
select, input[type="url"], input[type="checkbox"] { font-family: var(--font); }
select#output-format, .url-section input[type="url"] {
  background: var(--input-bg);
  border:none; border-radius:var(--radius);
  box-shadow: inset 4px 4px 8px var(--input-shadow), inset -4px -4px 8px #fff;
  padding:.6rem .8rem; min-width:220px; width: min(320px, 100%); color:#333; transition: box-shadow .2s ease;
}
select#output-format:focus, .url-section input[type="url"]:focus {
  outline:2px solid rgba(36,119,209,0.35);
  box-shadow: inset 2px 2px 6px var(--input-shadow), inset -2px -2px 6px #fff;
}
.url-section { display:flex; flex-wrap:wrap; gap:1rem; justify-content:center; margin:1.25rem auto 1.5rem; }
#font-drop-zone {
  border: 2px dashed rgba(255,255,255,0.9);
  border-radius: var(--radius);
  padding: clamp(2rem, 8vw, 4rem) clamp(1rem, 4vw, 2rem);
  text-align: center;
  color: #fff; 
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  transition: background .3s, border-color .3s;
  background: rgba(255,255,255,0.1);
  margin: 1.25rem auto;
}
#font-drop-zone.dragover { background: rgba(255,255,255,0.2); border-color:#fff; }
#download-fonts { margin-top: 1rem; }
.scrollable-list {
  max-height: 300px; overflow-y:auto; margin-top:1rem; padding:1rem;
  border-radius: 6px; background: rgba(255,255,255,0.9);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
#weight-summary {
  margin-top: .35rem;
  color: #0d1b2a;
  font-size: .9rem;
}
.weight-summary-item {
  display: inline-block;
  margin: 2px 6px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: .85rem;
  color: #555;
  background: rgba(255,255,255,0.85);
}
.weight-summary-item--present {
  border-color: #4caf50;
  color: #2e7d32;
  background: rgba(76,175,80,0.12);
}
.weight-summary-item--missing {
  border-color: rgba(0,0,0,0.12);
}
.scrollable-list::-webkit-scrollbar { width:6px; }
.scrollable-list::-webkit-scrollbar-thumb { background:#ccc; border-radius:3px; }
.font-entry { font-size:.95rem; color:#333; margin:.25rem 0; }
#converted-output { margin-top:1.25rem; }
.converted-list { margin-top:1rem; padding-top:1rem; border-top:1px solid rgba(0,0,0,0.08); }
.converted-list strong { display:block; margin-bottom:.5rem; color:#09203F; }
.font-preview {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.font-preview h3 {
  margin: 0 0 1.25rem 0;
  color: #09203F;
  font-size: 1.1rem;
}
.preview-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.preview-control-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.preview-control-group label {
  font-weight: 600;
  color: #0d1b2a;
  font-size: .95rem;
}
.preview-control-group select {
  background: var(--input-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: inset 4px 4px 8px var(--input-shadow), inset -4px -4px 8px #fff;
  padding: .6rem .8rem;
  color: #333;
  font-family: var(--font);
  transition: box-shadow .2s ease;
  min-width: 200px;
}
.preview-control-group select:focus {
  outline: 2px solid rgba(36,119,209,0.35);
  box-shadow: inset 2px 2px 6px var(--input-shadow), inset -2px -2px 6px #fff;
}
.preview-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.08);
}
.preview-title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  color: #09203F;
  margin: 0;
  line-height: 1.2;
}
.preview-description {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: #666;
  line-height: 1.6;
  margin: 0;
}
.drive-link {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.contact {
  position: fixed; 
  bottom: 1rem; 
  right: 5rem;
  display: flex;
  flex-direction: column;
  background: var(--btn-bg); padding: .75rem 1.5rem; border-radius: var(--radius);
  text-decoration:none; color:#333; font-weight:bold;
  opacity:0; 
  animation: slideUpFadeIn .8s ease-out forwards;
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
@keyframes slideUpFadeIn {
  from { opacity:0; transform: translateX(-50%) translateY(20px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}
.contact::after {
  content:""; 
  display:block; 
  margin:.25rem auto 0; 
  height:2px; width:0;
  background: linear-gradient(90deg, var(--clr1), var(--clr3)); 
  transition: width .4s ease;
}

.contact:hover { transform: translateX(-50%) translateY(-3px); 
  background:rgba(255,255,255,1); 
}

.contact:hover::after { width:100%; }
.side-links{
  position: fixed;
  left: 14rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  z-index: 1000;
}
.side-links a{
  background: var(--btn-bg);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  opacity: 0;
  animation: slideUpFadeIn 0.8s ease-out forwards;
}
.side-links a:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,1);
}
/* Tablet und kleiner */
@media (max-width: 1024px) {
  .header,
  .container {
    width: min(95vw, 100%);
    padding: 1.25rem;
    margin: 0.75rem;
  }
  .side-links {
    left: 1rem;
    bottom: 1rem;
  }
  .contact {
    right: 1rem;
    bottom: 1rem;
  }
}

/* Mobile Landscape und kleiner */
@media (max-width: 768px) {
  .header,
  .container {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .top-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .options-control,
  .format-control {
    width: 100%;
    justify-content: center;
  }
  
  select#output-format {
    min-width: 0;
    width: 100%;
  }
  
  .preview-controls {
    gap: 1.25rem;
  }
  
  .preview-control-group select {
    min-width: 0;
    width: 100%;
  }
  
  .preview-content {
    padding: 1rem;
  }
  
  .side-links {
    position: relative;
    left: auto;
    bottom: auto;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
  
  .contact {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
  
  .scrollable-list {
    max-height: 250px;
    padding: 0.75rem;
  }
  
  #font-drop-zone {
    padding: 2.5rem 1.5rem;
  }
}

/* Mobile Portrait */
@media (max-width: 640px) {
  .header h1 {
    font-size: 1.5rem;
  }
  
  .header h2 {
    font-size: 0.9rem;
  }
  
  .options-control,
  .format-control {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .options-control label,
  .format-control label {
    font-size: 0.9rem;
  }
  
  .weight-input-container {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  
  .font-preview {
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .font-preview h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .preview-controls {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }
  
  .preview-content {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  button,
  #download-fonts {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    width: 100%;
  }
  
  .side-links {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .side-links a {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
  }
  
  .contact {
    width: 100%;
    text-align: center;
  }
  
  .contact a {
    display: block;
    width: 100%;
  }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
  .header,
  .container {
    padding: 0.75rem;
    margin: 0.5rem;
  }
  
  .header h1 {
    font-size: 1.25rem;
  }
  
  .header h2 {
    font-size: 0.85rem;
  }
  
  .options-control,
  .format-control {
    padding: 0.65rem;
  }
  
  .options-control label {
    font-size: 0.85rem;
    flex-wrap: wrap;
  }
  
  #font-drop-zone {
    padding: 2rem 1rem;
    font-size: 0.9rem;
  }
  
  .font-preview {
    padding: 0.75rem;
  }
  
  .preview-controls {
    gap: 1rem;
  }
  
  .preview-control-group label {
    font-size: 0.9rem;
  }
  
  .preview-content {
    padding: 0.65rem;
  }
  
  .scrollable-list {
    max-height: 200px;
    padding: 0.5rem;
  }
  
  .font-entry {
    font-size: 0.85rem;
  }
  
  #weight-summary {
    font-size: 0.85rem;
  }
  
  .weight-summary-item {
    font-size: 0.75rem;
    margin: 2px 4px;
    padding: 2px 4px;
  }
}
label { color:#0d1b2a; }
.hidden { display: none !important; }
