:root {
  --primary: #cc0000;
  --text: #ffffff;
  --background: #111111;
  --card-bg: #1a1a1a;
  --input-bg: #2a2a2a;
  --border: #333333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 440px;
}

.card {
  background: rgba(26, 26, 26, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card-title {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 30px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.input-group {
  margin-bottom: 25px;
  position: relative;
}

.input-group + .input-group {
  margin-top: 15px;
}

.id-input,
.email-input {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  transition: all 0.3s ease;
  text-align: center;
}

.id-input {
  letter-spacing: 3px;
}

.id-input:focus,
.email-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.3);
}

.id-input::placeholder,
.email-input::placeholder {
  color: #666;
  text-align: center;
}

.id-input::placeholder {
  letter-spacing: normal;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

.submit-button {
  width: 100%;
  padding: 16px;
  background-color: var(--primary);
  color: var(--text);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.submit-button:hover:not(:disabled) {
  background-color: #ff0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(204, 0, 0, 0.4);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0);
}

.submit-button:disabled {
  background-color: #333;
  cursor: not-allowed;
  opacity: 0.7;
}

.error,
.rate-limit {
  color: var(--primary);
  padding: 12px;
  margin-top: 15px;
  display: none;
  text-align: center;
  background: rgba(204, 0, 0, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(204, 0, 0, 0.2);
  font-size: 14px;
}

.result {
  margin-top: 25px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.result-item {
  padding: 20px;
  background: var(--input-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border);
  transition: all 0.3s ease;
}

.result-item.valid {
  border-color: rgba(76, 175, 80, 0.3);
  background: rgba(76, 175, 80, 0.05);
}

.result-item.expired {
  border-color: rgba(204, 0, 0, 0.3);
  background: rgba(204, 0, 0, 0.05);
}

.result-item.valid::before {
  background: #4caf50;
}

.result-item.expired::before {
  background: var(--primary);
}

.result-label {
  font-weight: 500;
  margin-bottom: 12px;
  color: #888;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 1px;
}

.result-value {
  font-size: 1.1em;
  line-height: 1.4;
  color: var(--text);
}

.result-value div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.result-value div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.result-value span:first-child {
  color: #888;
}

.result-value span:last-child {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.valid .result-value div:nth-child(2) span:last-child,
.valid .result-value div:nth-child(3) span:last-child {
  color: #4caf50;
}

.expired .result-value div:nth-child(2) span:last-child,
.expired .result-value div:nth-child(3) span:last-child {
  color: var(--primary);
}

.result-value div:first-child span:last-child {
  color: var(--text) !important;
}

.barcode-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-top: 15px;
  text-align: center;
}

.barcode-container svg {
  width: 100%;
  max-width: 300px;
}

.loading {
  position: relative;
  padding-left: 45px !important;
}

.loading::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 20px;
  height: 20px;
  border: 3px solid var(--text);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

.countdown {
  font-weight: bold;
}

@keyframes spin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sport-logo {
  width: 200px;
  margin: 0 auto 20px;
  display: block;
}

@media (max-width: 480px) {
  .card {
    padding: 20px;
    border-radius: 12px;
  }

  .id-input,
  .email-input {
    padding: 14px;
    font-size: 16px;
  }
}
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  width: 200px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

.update-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  padding: 15px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

.update-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.update-notification button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

/* Install Button Styles */
.install-button {
  margin-top: 20px;
  text-align: center;
  position: relative;  /* Adjuk hozzá ezt */
  z-index: 1;         /* És ezt is */
}

.pwa-install-button {
  background: var(--primary);
  color: var(--text);
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pwa-install-button:hover {
  background-color: #ff0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(204, 0, 0, 0.4);
}

.pwa-install-button:active {
  transform: translateY(0);
}

/* iOS Install Guide Styles */
.ios-install-guide {
  background: rgba(204, 0, 0, 0.1);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 300px;
}

.ios-install-guide p {
  margin-bottom: 12px;
  font-weight: 500;
}

.ios-install-guide ol {
  list-style-position: inside;
  margin: 0;
  padding: 0;
}

.ios-install-guide li {
  margin: 8px 0;
  line-height: 1.4;
}

.share-icon {
  display: inline-block;
  font-size: 1.2em;
  margin: 0 4px;
  vertical-align: middle;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
