.background {
  position: fixed;
  width: 100vw;
  height: 100vh;
  left: 0; top: 0;
  z-index: -1;
  background: #111 url('polygon.jpg') center center/cover no-repeat;
}

@font-face {
  font-family: 'AkzidenzGroteskBQCondensed';
  src: url('AkzidenzGroteskBQCondensedLight.ttf') format('truetype');
  font-weight: 300;
}
@font-face {
  font-family: 'AkzidenzGroteskBQCondensed';
  src: url('AkzidenzGroteskBQCondensedRegular.otf') format('opentype');
  font-weight: 400;
}
@font-face {
  font-family: 'AkzidenzGroteskBQCondensed';
  src: url('AkzidenzGroteskBQCondensedBold.otf') format('opentype');
  font-weight: 700;
}

html, body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
  font-weight: 400;
  color: #fff;
  width: 100vw;
  box-sizing: border-box;
}

form {
  width: 95vw;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  background-color: rgba(255,255,255,0.3);
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5), inset 0 2px 20px rgba(0,0,0,0.12);
  border-radius: 20px;
  padding: 32px 20px 24px 20px;
  margin: 40px auto;
  align-items: stretch;
  gap: 1.1em;
}

h1 {
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.7em;
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  border: none;
  outline: none;
  text-align: center;
}

label {
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
  font-weight: 100;
  font-size: 1.3em;
  margin-bottom: 0.25em;
  margin-top: 0.1em;
  width: 100%;
  text-align: center
  display: block;
}

input, select, textarea, button {
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
  font-weight: 400;
  font-size: 1.5em;
}

input, select {
  border: 1px solid grey;
  width: 96%;
  margin-bottom: 0.8em;
  background-color: rgba(255,255,255,0.3);
  color: #36454F;
  border-radius: 10px;
  outline: none;
  box-shadow: inset 0 1px 5px rgba(0,0,0,0.2);
  padding: 10px 8px;
}

/* Social Checkbox Row */
.social-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-bottom: 1px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-start;
}

.social-row span {
  display: flex;
  align-items: center;
  min-width: 80px;
  max-width: 125px;
  padding: 0 4px;
}

.social-row label {
  font-size: 0.95em;
  font-weight: 300;
  margin: 0;
  padding: 0 2px;
  width: auto;
}

input[type="checkbox"] {
  width: 1em;
  accent-color: #009688;
  margin-right: 3px;
}

/* Social-Inputfelder */
#whatsapp, #facebook, #instagram {
  display: none;
  margin: 0 0 10px 0;
  background-color: rgba(255,255,255,0.32);
  font-size: 1em;
}

/* Button-Style */
button {
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
  font-size: 1.5em;
  font-weight: 400;
  margin-top: 14px;
  color: #36454F;
  border-radius: 10px;
  outline: none;
  background: #fff;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  cursor: pointer;
  padding: 10px;
  border: none;
  transition: background 0.3s;
}
button:hover {
  background: #00796b;
  color: #fff;
}
.id-background {
  position: fixed;
  width: 100vw;
  height: 100vh;
  left: 0; top: 0;
  z-index: -1;
  background: #111 url('polygon.jpg') center center/cover no-repeat;
}

.vcard-box {
  background: rgba(255,255,255,0.28);
  box-shadow: 0 2px 24px rgba(0,0,0,0.7), inset 0 2px 20px rgba(0,0,0,0.07);
  border-radius: 28px;
  padding: 32px 24px 24px;
  min-width: 320px;
  max-width: 355px;
  width: 95vw;
  text-align: center;
  margin: 30px 0;
  position: relative;
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
}
.profilbild {
  display: block;
  margin: 0 auto 1em auto;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.32);
  border: 2.5px solid #fff;
  background: rgba(255,255,255,0.4);
}
.vcard-name {
  font-size: 2.25em;
  font-weight: 700;
  margin-bottom: 2px;
  color: #fff;
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
}
.vcard-dienstgrad {
  font-size: 1.4em;
  font-weight: 100;
  opacity: 0.85;
  margin-bottom: 5px;
  color: #fff;
}
.vcard-dienststelle {
  font-size: 1.6em;
  font-weight: 300;
  margin-bottom: 14px;
  color: #fff;
}
.fa-btn-group {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.fa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 1.25em;
  color: #fff;
  padding: 0.25em 0.45em;
  text-decoration: none;
  transition: background 0.22s, color 0.33s;
  margin: 0 3px;
}
.fa-btn:hover {
  background: #009688;
  color: #fff;
}
.qr-btn {
  margin: 24px 0 0 0;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.32);
  border-radius: 18px;
  padding: 0.2em 0.7em;
  color: #383E42;
  font-size: 2em;
  border: none;
  cursor: pointer;
  font-family: 'AkzidenzGroteskBQCondensed', Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, color 0.2s;
}
.qr-btn:hover {
  background: #009688;
}
.qr-overlay {
  position: fixed;
  z-index: 99;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10,10,12,0.89);
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
  animation: fadein 0.2s linear;
}
@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.qr-popup-inner {
  background: #fff;
  border-radius: 32px;
  padding: 16px 16px;
  width: 80vw;
  max-width: 350px;
  max-height: 80vh;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
 
  justify-content: center;
  position: relative;
}
.qr-popup-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.3em;
  color: #111;
  opacity: 0.44;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.22s;
  z-index: 2;
}
.qr-popup-close:hover {
  color: #009688;
  opacity: 1.0;
}
.qr-popup-img {
  max-width: 90vw;
  width: 90%;
  max-height: 56vh;
  display: block;
  margin: 34px auto 1vh auto;
}
@media (max-width: 700px), (max-height: 700px) {
  .vcard-box { min-width: unset; max-width:98vw; padding: 10vw 2vw 15vw 2vw;}
  .qr-popup-inner{ width:95vw; max-width:99vw; min-height:90px; }
  .qr-popup-img{ max-width:98vw;}
}

/* Mobile optimiert */
@media (max-width: 700px), (max-height: 700px) {
  form {
    max-width: 99vw;
    padding: 10px;
    gap: 12px;
    margin: 12px 0;
  }
  input, select, button {
    font-size: 0.96em;
    padding: 8px;
  }
  .social-row {
    gap: 7px;
  }
  .social-row span {
    min-width: 70px;
    max-width: 100px;
  }
}
