/* --- GLOBALE DEFINITIONEN --- */
body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #000000;
  font-family: 'Geist Mono', 'Courier New', monospace;
  line-height: 1.6;
}

/* --- NAVIGATION --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between; 
  align-items: center;
  padding: 10px 30px; 
  background-color: #ffffff; 
  border-bottom: 1px solid #000000;
  z-index: 1000;
  box-sizing: border-box; 
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.8s steps(50), opacity 0.8s ease;
  
}

.main-header.header-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.back-button {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: 0.2s;
  padding: 5px;
}

.back-button svg { fill: #000000; }
.back-button:hover { background: #000000; }
.back-button:hover svg { fill: #ffffff; }

.nav-right ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.nav-right li a {
  text-decoration: none;
  color: #000000;
  font-weight: bold;
  font-size: 1.0rem;
  padding: 5px 10px;
}

.nav-right li a:hover {
  background: #000000;
  color: #ffffff;
}

/* --- LAYOUT & CONTAINER --- */
main {
  padding: 70px 20px 60px;
  min-height: 80vh;
}

.container-center {
  max-width: 650px;
  margin: 0 auto;
}

.object-box {
  border: 1px solid #000000;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
}

.box-header {
  background: #000000;
  color: #ffffff;
  padding: 8px 15px;
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.box-content { 
  padding: 10px; 
}

/* --- BUTTONS --- */
.secure-link {
  display: inline-block;
  color: #000000;
  text-decoration: none;
  border: 1px solid #000000;
  padding: 8px 15px;
  font-size: 0.8rem;
  transition: 0.2s;
}

.secure-link:hover { background: #000000; color: #ffffff; }

.emergency-button {
  background: transparent;
  border: 1px solid #ff0000;
  color: #ff0000;
  font-family: 'Geist Mono', monospace;
  cursor: pointer;
  padding: 8px 15px;
  font-size: 0.8rem;
  transition: 0.2s;
}

.emergency-button:hover { background: #ff0000; color: #ffffff; }

/* --- SCANNER --- */
#reader {
  width: 100% !important;
  max-width: 500px;
  margin: 20px auto;
  border: 1px solid #000000;
  background: #000;
  position: relative;
  overflow: hidden;
}

#reader video {
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
  filter: contrast(1.1) brightness(1.1);
}

#reader::before {
  content: "[ SCANNING_ACTIVE ]";
  position: absolute;
  top: -25px;
  left: 0;
  font-size: 0.6rem;
  color: #000;
  letter-spacing: 1px;
}

#reader__scan_region {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000 !important;
}

#reader__status_span, 
span[style*="color: red"] {
  font-size: 0.7rem !important;
  font-family: 'Geist Mono', monospace !important;
}

/* --- SCAN OVERLAY --- */
.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.scan-frame {
  width: 60%;
  aspect-ratio: 1;
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.05);
}

.scan-frame::before,
.scan-frame::after {
  content: "";
  position: absolute;
  width: 25%;
  height: 25%;
  border: 3px solid #00ff88;
}

.scan-frame::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.scan-frame::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.scan-overlay::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ff88, transparent);
  animation: scanline 2s infinite;
}

@keyframes scanline {
  0% { transform: translateY(-120px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(120px); opacity: 0; }
}

/* --- BUTTON --- */
.terminal-button {
  background: #000;
  color: #ffffff;
  border: 1px solid #000;
  padding: 12px 24px;
  font-family: inherit;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
}

.terminal-button:hover { 
  background: #ffffff; 
  color: #000; 
}

/* --- FOOTER --- */
footer { 
  margin-top: 60px; 
  padding: 40px 20px; 
  border-top: 1px solid #000; 
}

.footer-grid { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  font-size: 0.75rem; 
}

.copyright { 
  text-transform: uppercase; 
  letter-spacing: 1px; 
}


video {
    display: block;
}

/* Optional: Ein leichter Scan-Effekt für das Video */
.video-overlay-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}