:root {
  --grey: #a0a0a0;
  --button: #54ad3c;
  --button-hover: #469231;
  --red: #e2231a;
}

.dead-taken {
  background-color: #ffbbbb;
}

.joined-team2 {
  background-color: #ddddff;
}

.joined-team3 {
  background-color: #bbbbff;
}

.monolog-points {
  font-weight: bold;
}

.team-name {
  text-align: left;
  font-weight: bold;
}

.status-message {
  margin: 10px 0;
  padding: 12px 16px;
  background-color: #f5f7f9;
  border-radius: 8px;
  border: 1px solid #dfe5ec;
  color: #1f2a37;
}

.results-meta {
  margin: 10px 0 20px;
  font-size: 0.95em;
  color: var(--grey);
}

.w-layout-blockcontainer {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.w-layout-hflex {
  flex-direction: row;
  align-items: flex-start;
  display: flex;
}

.w-form-formradioinput--inputType-custom {
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 12px;
  height: 12px;
}

.w-form-formradioinput--inputType-custom.w--redirected-focus {
  box-shadow: 0 0 3px 1px #3898ec;
}

.w-form-formradioinput--inputType-custom.w--redirected-checked {
  border-width: 4px;
  border-color: #3898ec;
}

.w-layout-layout {
  grid-row-gap: 20px;
  grid-column-gap: 20px;
  grid-auto-columns: 1fr;
  justify-content: center;
  padding: 20px;
}

.w-layout-cell {
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: flex;
}

@media screen and (max-width: 991px) {
  .w-layout-blockcontainer {
    max-width: 728px;
  }
}

@media screen and (max-width: 767px) {
  .w-layout-blockcontainer {
    max-width: none;
  }
}

body {
  color: #333;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  font-size: 18px;
  line-height: 26px;
}

h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 36px;
  font-weight: 700;
  line-height: 44px;
}

h2 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: 600;
  line-height: 34px;
}

h3 {
  margin-top: 20px;
  margin-bottom: 5px;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
}

p {
  margin-bottom: 18px;
}

a {
  color: var(--grey);
  text-decoration: underline;
}

a:hover {
  color: var(--button);
}

label {
  margin-bottom: 5px;
  font-weight: bold;
  display: block;
}

.header-container {
  grid-column-gap: 15px;
  grid-row-gap: 15px;
  flex-flow: column;
  align-items: center;
  max-width: 720px;
  padding: 15px;
  display: flex;
}

.menu-link {
  color: var(--grey);
  margin-left: 15px;
  margin-right: 15px;
  font-weight: 500;
  text-decoration: none;
}

.menu-text {
  margin-left: 15px;
  margin-right: 15px;
}

.menu-link:hover {
  color: var(--button);
}

.menu-link[aria-current="page"] {
  color: #000;
}

.menu-link[aria-disabled="true"] {
  color: #000;
  cursor: default;
  pointer-events: none;
}

.menu-flex-block {
  grid-column-gap: 15px;
  grid-row-gap: 15px;
  flex-flow: wrap;
  justify-content: center;
  align-items: center;
}

.large-text {
  font-size: 24px;
  line-height: 33px;
}

.main-container {
  max-width: 720px;
  padding: 40px 30px 100px;
}

.field-label {
  font-weight: 700;
}

.button {
  background-color: var(--button);
  border-radius: 4px;
  padding: 16px 26px;
  transition: opacity .2s;
}

.button:hover {
  background-color: var(--button-hover);
  color: #fff;
}

.centering {
text-align: center;
}

.logo-link-block {
  margin-bottom: 20px;
}

.text-field {
  height: 44px;
  margin-bottom: 0;
  font-size: 18px;
}

.text-field::placeholder {
  color: #ccc;
}

.small-text {
  font-size: 12px;
  line-height: 16px;
}

.post-header {
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 23px;
}

.post-div {
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.posts-wrapper {
  margin-bottom: 39px;
}

.form-stack {
  grid-column-gap: 18px;
  grid-row-gap: 18px;
  margin-bottom: 18px;
  padding: 0;
}

.field-note {
  margin-top: 4px;
  font-size: 14px;
  line-height: 18px;
}

.field-note.red {
  color: red;
}

.field-note.fixed-height {
  min-height: 20px;
  margin-bottom: 20px;
}

.field-wrapdiv {
  margin-bottom: 18px;
}

.field-wrapdiv._50 {
  flex: 0 50%;
}

.field-wrapdiv._33 {
  flex: 1;
}

.field-wrapdiv._17 {
  flex: 0 17%;
}

.discussion-post-field {
  min-width: 100%;
  max-width: 100%;
  min-height: 100px;
  font-size: 16px;
  line-height: 22px;
}

.radio-button-label {
  position: relative;
  top: -3px;
}

.flex-block {
  grid-column-gap: 10px;
  grid-row-gap: 10px;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 22px;
}

.div-block {
  flex-flow: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 50px;
  margin-bottom: 22px;
  padding-left: 62px;
  display: flex;
  position: relative;
}

.image {
  position: absolute;
  inset: 0% auto auto 0%;
}

.messages-div {
  margin-bottom: 20px;
}

.message-div {
  margin-bottom: 10px;
}

.message-header {
  font-weight: 700;
  margin-bottom: 0;
}

.post-date {
  color: #a5a5a5;
  font-size: 13px;
  line-height: 16px;
}

.puzzle-link {
  border: 1px solid var(--grey);
  color: var(--grey);
  border-radius: 20px;
  justify-content: center;
  align-items: center;
  min-width: 36px;
  min-height: 36px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
}

.puzzle-link:hover {
  border-color: var(--button);
}

.puzzle-link.w--current {
  background-color: var(--red);
  color: #fff;
  border-width: 0;
  font-weight: 700;
}

.puzzle-links-wrapper {
  grid-column-gap: 8px;
  grid-row-gap: 8px;
  flex-flow: wrap;
  justify-content: center;
  align-items: flex-start;
  margin-top: 10px;
  margin-bottom: 10px;
}

.puzzle-link-block {
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}

.code-embed {
  overflow: scroll;
}

.button-small {
  background-color: var(--button);
  border-radius: 4px;
  margin-bottom: 18px;
  padding: 9px 18px;
  transition: opacity .2s;
}

.button-small:hover {
  background-color: var(--button-hover);
  color: #fff;
}

.field-flex-parent {
  grid-column-gap: 18px;
  grid-row-gap: 18px;
  display: flex;
}

.webinfo-form {
  display: flex;
  column-gap: 10px;
  row-gap: 10px;
  align-items: flex-end;
  margin-bottom: 10px;
}

.webinfo-form .field-wrapdiv {
  flex: 1;
  margin-bottom: 0;
}

.webinfo-form .button {
  height: 44px; /* Stejná výška jako text-field */
  padding: 0 12px; /* Zachová původní horizontální padding */
  display: flex;
  align-items: center;
  justify-content: center;
}

@media screen and (max-width: 479px) {
  .form-stack {
    grid-column-gap: 8px;
    grid-row-gap: 8px;
  }

  .field-flex-parent {
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    flex-flow: column;
  }
}

#w-node-_5b7cf553-dfef-9bab-4430-e8377946bef8-4607cd69 {
  grid-template-rows: auto auto;
  grid-template-columns: 3fr 2fr 1fr;
}

#w-node-1, #w-node-_5b7cf553-dfef-9bab-4430-e8377946bef8-ab197e6e, #w-node-_5b7cf553-dfef-9bab-4430-e8377946bef8-5fe90193 {
  grid-template-rows: auto;
  grid-template-columns: 3fr 2fr 1fr;
}

@media screen and (max-width: 479px) {
  #w-node-_5b7cf553-dfef-9bab-4430-e8377946bef8-4607cd69, #w-node-1, #w-node-_5b7cf553-dfef-9bab-4430-e8377946bef8-ab197e6e, #w-node-_5b7cf553-dfef-9bab-4430-e8377946bef8-5fe90193 {
    grid-template-rows: auto auto;
    grid-template-columns: 2fr;
  }
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 12px;
  line-height: 16px;
  background-color: #fff;
  border: 1px solid #ccc;
}

table thead {
  background-color: #fff;
}

table thead th {
  padding: 8px 4px;
  text-align: center;
  font-weight: 700;
  color: #333;
  font-size: 12px;
  border: 1px solid #ccc;
}

table thead th:first-child {
  text-align: center;
  width: 30px;
}

table thead th:nth-child(2) {
  text-align: left;
  padding-left: 8px;
}

table tbody td {
  padding: 8px 4px;
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  color: #333;
  border: 1px solid #ccc;
  background-color: #fff;
}

table tbody td:first-child {
  font-weight: 600;
  color: #333;
  background-color: #fff;
}

table tbody td:nth-child(2) {
  text-align: left;
  font-weight: 600;
  padding-left: 8px;
  color: #333;
}

.interim-results-table tbody td {
  font-weight: 400;
}

.interim-results-table tbody td:first-child,
.interim-results-table tbody td:nth-child(2),
.interim-results-table tbody td.finish-time,
.interim-results-table tbody td.monolog-points {
  font-weight: 700;
}

/* Responsive Table */
@media screen and (max-width: 768px) {
  table {
    font-size: 11px;
    margin: 15px 0;
  }
  
  table thead th,
  table tbody td {
    padding: 4px 2px;
  }
  
  table thead th:nth-child(2),
  table tbody td:nth-child(2) {
    padding-left: 4px;
  }
}

@media screen and (max-width: 480px) {
  table {
    font-size: 10px;
  }
  
  table thead th,
  table tbody td {
    padding: 3px 1px;
  }
  
  table thead th:nth-child(2),
  table tbody td:nth-child(2) {
    padding-left: 3px;
  }
  
  table thead th:first-child {
    width: 25px;
  }
}


.team-list-container {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 4px;
  margin-bottom: 18px;
}

.team-item {
  margin-bottom: 4px;
}

.puzzle-paper {
  margin-bottom: 5%;
  margin-right: 5%;
  display: block;
  width: 45%;
  float: left;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.puzzle-paper-large {
  display: block;
  margin-bottom:20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.solution-img {
  margin-bottom: 10px;
}
.site-footer {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 16px;
  color: #333;
}

.year-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.year-links-label {
  font-weight: 600;
}

.year-link {
}

.year-link:hover,
.year-link:focus {
  text-decoration: underline;
}

.year-link.current-year {
  color: #111;
  text-decoration: none;
  cursor: default;
}

.intro-section,
.rules-section,
.organizers-section {
  display: grid;
  gap: 20px;
}

.intro-section h1,
.rules-section h1,
.organizers-section h1 {
  margin-bottom: 0;
}

.info-box {
  border-left: 4px solid #ec4a2d;
  padding: 16px 20px;
  background: rgba(236, 74, 45, 0.08);
  border-radius: 6px;
}

.info-box ul {
  margin: 12px 0 0;
}

.registration-note {
  font-size: 18px;
}

.organizers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.organizer-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.organizer-card h2 {
  margin-top: 0;
}

.merge-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.merge-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  background-color: #fff;
}

.merge-name {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 19px;
}

.merge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.merge-actions--split,
.merge-actions--pending,
.merge-actions--single {
  display: grid;
}

.merge-actions--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.merge-actions--pending {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.merge-actions--single {
  grid-template-columns: minmax(0, 1fr);
}

.merge-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
}

.merge-button--primary {
  background-color: #2f80ed;
  color: #fff;
}

.merge-button--primary:hover {
  background-color: #2468c5;
  color: #fff;
}

.merge-button--accept {
  background-color: rgb(84, 173, 60);
  color: #fff;
}

.merge-button--accept:hover {
  background-color: rgb(70, 150, 50);
  color: #fff;
}

.merge-button--secondary {
  background-color: #d3d6dc;
  color: #1f2a37;
}

.merge-button--secondary:hover {
  background-color: #bfc4cc;
  color: #1f2a37;
}

.merge-note {
  margin: 0;
}

@media screen and (max-width: 767px) {
  .merge-actions--split,
  .merge-actions--pending {
    grid-template-columns: minmax(0, 1fr);
  }

  .merge-actions--pending {
    align-items: stretch;
  }
}

@media screen and (max-width: 767px) {
  .site-footer {
    margin-top: 40px;
    font-size: 15px;
  }

  .registration-note {
    font-size: 17px;
  }
}
