* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: linear-gradient(180deg, #a32020 0%, #8f1717 100%);
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  color: #1f2937;
}

.quiz-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.slide {
  width: 100%;
  max-width: 1040px;
  min-width: 0;
}

.card {
  width: 100%;
  min-height: 520px;
  max-width: 100%;
  background: #ffffff;
  border-radius: 24px;
  padding: 56px 64px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  margin: 0 0 34px;
  color: #7f1d1d;
  text-align: center;
  font-size: 42px;
  line-height: 1.2;
}

.form-block {
  width: 100%;
  max-width: 760px;
  margin-top: 26px;
}

.code-editor {
  display: block;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  padding: 30px 28px;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  background: #f9fafb;
  color: #111827;
  text-align: center;
  font-size: 54px;
  font-weight: 700;
  letter-spacing: 0.24em;
  outline: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.code-editor:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.code-editor:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.code-editor::placeholder {
  color: #9ca3af;
  letter-spacing: 0.24em;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 60px;
}

.actions {
  margin-top: 0;
  display: flex;
  justify-content: flex-start;
  flex: 0 0 auto;
}

button {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  min-width: 150px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #ffffff;
  cursor: pointer;
  max-width: 100%;
  transition: box-shadow 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

button:hover:not(:disabled) {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

button:active:not(:disabled) {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
}

button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

button:disabled {
  background: #9ca3af;
  color: #f3f4f6;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.95;
}

.status-text {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}

.error-text {
  color: #dc2626;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.card .mar-elvegezte-uzenet {
  width: 100%;
  max-width: 760px;
  text-align: center;
  padding: 20px;
}

.card .mar-elvegezte-uzenet .uzenet-cim {
  color: #15803d !important;
  font-size: 38px !important;
  font-weight: 800 !important;
  margin: 0 0 28px !important;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.card .mar-elvegezte-uzenet .uzenet-szoveg {
  color: #16a34a !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1.6;
  margin: 0 !important;
}

@media (max-width: 640px) {
  .quiz-shell {
    padding: 12px;
  }

  .slide {
    max-width: 100%;
  }

  .card {
    min-height: 360px;
    padding: 28px 20px;
    border-radius: 18px;
  }

  h1 {
    font-size: 28px;
    margin-bottom: 22px;
  }

  .form-block {
    margin-top: 18px;
  }

  .code-editor {
    max-width: 100%;
    padding: 22px 14px;
    font-size: 30px;
    border-radius: 18px;
    letter-spacing: 0.16em;
  }

  .actions-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 40px;
  }

  .actions {
    width: 100%;
  }

  button {
    width: 100%;
  }

  .error-text {
    width: 100%;
    font-size: 22px;
  }

  .card .mar-elvegezte-uzenet .uzenet-cim {
    font-size: 26px !important;
    margin-bottom: 18px !important;
  }

  .card .mar-elvegezte-uzenet .uzenet-szoveg {
    font-size: 20px !important;
  }
}
