body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  padding-top: min(150px, calc(20vh + 20px));
  /* Header magasság + kis extra */
  background-color: #fafafa;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  background-attachment: fixed;
}

/* Álló (portrait) nézet - mobil háttér */
@media (orientation: portrait) {
  body {
    background-image: url('images/bg_mobile.png');
  }
}

/* Fekvő (landscape) nézet - desktop háttér */
@media (orientation: landscape) {
  body {
    background-image: url('images/bg_desktop.png');
  }
}

/* Fixed Header with Logos */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: min(130px, 20vh);
  /* Maximum 20% of viewport height */
  max-height: 20vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2000;
  box-sizing: border-box;
}

.logo {
  height: min(110px, calc(20vh - 20px));
  /* Header height minus padding */
  max-height: calc(20vh - 20px);
  width: auto;
  object-fit: contain;
}

.logo-left {
  margin-right: auto;
}

.logo-right {
  margin-left: auto;
}

h1 {
  text-align: center;
  margin-bottom: 1em;
  color: #333;
  font-size: 2em;
}

.macik {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-bottom: 1em;
}

.bear {
  width: 78px;
  height: 72px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-bottom: 1em;
}

label {
  color: #333;
  font-weight: 500;
  margin-bottom: 0.25em;
  font-size: 0.95em;
}

input[type="text"],
input[type="email"] {
  padding: 0.75em;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  font-size: 1em;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: rgba(237, 69, 126, 0.5);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(237, 69, 126, 0.1);
}

input[type="text"][readonly],
input[type="email"][readonly] {
  background: rgba(220, 220, 220, 0.5);
  color: #666;
  cursor: not-allowed;
  border-color: rgba(200, 200, 200, 0.3);
}

input[type="text"][readonly]:focus,
input[type="email"][readonly]:focus {
  border-color: rgba(200, 200, 200, 0.3);
  box-shadow: none;
}

button {
  padding: 0.75em 2em;
  border-radius: 12px;
  border: none;
  background: #ed457e;
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(237, 69, 126, 0.3);
}

button:hover {
  background: #d63d70;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(237, 69, 126, 0.4);
}

button:active {
  transform: translateY(0);
}

/* GDPR Section */
.gdpr-section {
  margin: 1.5em 0;
  padding: 1em;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1em;
  gap: 0.75em;
}

.checkbox-group:last-child {
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.25em;
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.checkbox-group label {
  flex: 1;
  font-size: 0.9em;
  line-height: 1.5;
  margin: 0;
  cursor: pointer;
}

.checkbox-group label a {
  color: #ed457e;
  text-decoration: underline;
}

.checkbox-group label a:hover {
  color: #d63d70;
}

.required {
  color: #ed457e;
  font-weight: bold;
}

.locked-text {
  font-size: 0.85em;
  color: #666;
  font-weight: normal;
}

#qrSection {
  text-align: center;
  margin-top: 1em;
}

/* Reset Section */
.reset-section {
  text-align: center;
  margin-top: 1.5em;
  padding-top: 1em;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.reset-link {
  color: #666;
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 0.5em 1em;
  border-radius: 8px;
}

.reset-link:hover {
  color: #ed457e;
  background: rgba(237, 69, 126, 0.1);
  text-decoration: underline;
}

/* Tickets Section */
.tickets-section {
  margin: 1.5em 0;
  padding: 1em;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(237, 69, 126, 0.2);
}

.tickets-section label {
  display: block;
  margin-bottom: 0.75em;
  font-weight: bold;
  color: #333;
}

.tickets-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
}

.ticket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75em 1em;
  margin-bottom: 0.5em;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(237, 69, 126, 0.15);
  transition: all 0.3s ease;
}

.ticket-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(237, 69, 126, 0.3);
  transform: translateX(2px);
}

.ticket-code {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  color: #333;
  font-size: 1.1em;
  letter-spacing: 0.5px;
}

.delete-ticket-btn {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1.3em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.delete-ticket-btn:hover {
  background: #cc0000;
  transform: scale(1.1);
}

.delete-ticket-btn:active {
  transform: scale(0.95);
}

.ticket-score {
  padding: 0.75em;
  background: rgba(237, 69, 126, 0.1);
  border-radius: 8px;
  text-align: center;
  font-size: 1.05em;
  color: #333;
}

.ticket-score strong {
  color: #ed457e;
  font-size: 1.2em;
}

/* Fixed Footer - mindig a viewport aljához igazítva */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  pointer-events: none;
  z-index: 100;
  max-height: 20vh;
  /* Maximum 20% of viewport height */
}

/* Álló (portrait) nézet - mobil footer */
@media (orientation: portrait) {
  .footer {
    background-image: url('images/footer_mobile.png');
    height: min(556px, 20vh);
    /* Smaller of 556px or 20vh */
  }

  body {
    padding-bottom: min(580px, calc(20vh + 24px));
    /* Footer height + 24px extra, max 20vh */
  }
}

/* Fekvő (landscape) nézet - desktop footer */
@media (orientation: landscape) {
  .footer {
    background-image: url('images/footer_desktop.png');
    height: min(627px, 20vh);
    /* Smaller of 627px or 20vh */
  }

  body {
    padding-bottom: min(650px, calc(20vh + 23px));
    /* Footer height + 23px extra, max 20vh */
  }
}

/* Glass morphism container */
.container {
  max-width: 800px;
  margin: 20px auto;
  padding: 2.5em;
  padding-bottom: 2.5em;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* QR Scanner Modal */
.qr-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.qr-modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 2em;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.qr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

.qr-modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.5em;
}

.qr-close-btn {
  background: none;
  border: none;
  font-size: 2em;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.qr-close-btn:hover {
  background: rgba(237, 69, 126, 0.1);
  color: #ed457e;
  transform: none;
  box-shadow: none;
}

.qr-scanner-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

#qrVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qr-status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1em;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  text-align: center;
  font-size: 1em;
  font-weight: 600;
}

.qr-status-ready {
  background: rgba(33, 150, 243, 0.9);
}

.qr-status-success {
  background: rgba(76, 175, 80, 0.9);
}

.qr-status-error {
  background: rgba(244, 67, 54, 0.9);
}

/* Responsive adjustments */
@media (orientation: portrait) {
  .container {
    max-width: 90%;
    padding: 1.5em;
  }

  .header {
    height: 100px;
  }

  .logo {
    height: 80px;
  }

  h1 {
    font-size: 1.5em;
  }

  .qr-modal-content {
    padding: 1.5em;
  }

  .qr-modal-header h2 {
    font-size: 1.2em;
  }
}

/* Contest ended message styling */
.contest-ended-message {
  text-align: center;
  margin: 1.25em 0;
  padding: 1.25em;
  background: linear-gradient(135deg, rgba(237, 69, 126, 0.08), rgba(237, 69, 126, 0.03));
  border: 1px solid rgba(237, 69, 126, 0.12);
  border-radius: 12px;
  font-size: 1.05em;
  color: #333;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.contest-ended-message p {
  margin: 0;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
}

.contest-ended-message p br {
  display: none;
}

@media (max-width: 480px) {
  .contest-ended-message {
    font-size: 1em;
    padding: 1em;
  }

  .contest-ended-message p {
    font-size: 0.98em;
  }
}