.header {
  background-color: #2980b9;
  /* min-height: 67px; */
  /* min-width: 100%; */
  min-height: 55px;
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  color: white;
  z-index: 1000;
  margin: 0%;
  padding-top: 3px;
}
.header_logo_space {
  background-color: #2980b9;
  height: 50%;
  display: inline-block;
  flex: none;
  /* align-items: center; */
  /* justify-content: center; */
  object-fit: fill;
}
.header_button_space {
  background-color: #2980b9;
  color: white;
  width: 100%;
  height: 100%;
}
.header_link_space {
  margin-right:0%;
  background-color: #2980b9;
  color: white;
}
.editor_header_toolbar {
  height: 100%;
}
.layout_container {
  top: 55px;
}
.bg-transparent {
  background-color: transparent;
}
.xrp_logo {
  height: 50px;
  width: 100%;
  padding-right: 12%;
}
.micropython-icon {
  width: 12vw;
  margin: 1.5rem;
  margin-top: 7%;
}
.micropython-text {
  margin-top: 4%;
  }
.action-button {
  position:absolute;
  top: 10px;
  right: 20px;
  height: 30px;
  width: 120px;
  border-radius: 5px;
  z-index: 1000;
}
.xrp-name {
  color: wheat;
  position:absolute;
  top: 38px;  
  right: 20px;
  height: 30px;
  width: 120px;
  border-radius: 5px;
  z-index: 1000;
}
.run-button {
  background-color: green;
  /* top: 50px; */
}
.run-button:hover {
  background-color: rgb(1, 115, 1);
  /* top: 50px; */
}
.connect-xrp {
  color: black;
  background-color: white;
  position:absolute;
  top: 8px;
  right: 10px;
  height: 35px;
  width: 200px;
  border-radius: 5px;
  z-index: 1000;
}
.connect-xrp:hover {
  background-color: #d3f8d3; /* light green */
}

.connect-xrp:disabled,
.run-button:disabled {
  background-color: #dcdcdc; /* light grey */
}

.uk-dropdown {
  --uk-position-offset: 10px;
  --uk-position-viewport-offset: 15px;
  /* 1 */
  width: auto;
  /* 2 */
  min-width: 200px;
  /* 3 */
  padding: 5px;
  background: #4984ac;
  color: #666;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}
.uk-button-xmenu {
  /* 1 */
  margin: 0;
  /* 2 */
  border: none;
  /* 3 */
  overflow: visible;
  /* 4 */
  font: inherit;
  color: inherit;
  /* 5 */
  text-transform: none;
  /* 6 */
  -webkit-appearance: none;
  border-radius: 0;
  /* 7 */
  display: inline-block;
  box-sizing: border-box;
  padding: 0 10px;
  vertical-align: middle;
  font-size: 0.875rem;
  /* 8 */
  line-height: 38px;
  /* 9 */
  text-align: left;
  /* 10 */
  text-decoration: none;
  transition: 0.1s ease-in-out;
  transition-property: color, background-color, border-color;
}
.uk-button-secondary-xmenu {
  background-color: #4984ac;
  color: #fff;
  border: 1px solid transparent;
}
.uk-button-secondary-xmenu:hover {
  background-color: #3a6989;
  color: #fff;
}
.uk-button-secondary-xmenu:disabled {
  color: #ABA6A6;
  border: 1px solid transparent;
}
.uk-button-secondary-xmenu:disabled:hover {
  background-color: #4D7894;
}

.python-code {
  padding: 10px;
  height: 70%;
  width: 55%;
  background-color: #2980b9;
}
.tj_icon {
  padding-right: 5px;
  height: 15px;
  fill: white;
}

/* ── Competition Mode ─────────────────────────────────── */
.competition-mode-btn {
  background-color: #c0392b;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.04em;
}
.competition-mode-btn:hover {
  background-color: #a93226;
  color: #fff;
}

.competition-modal-dialog {
  background-color: #1e2a38;
  color: #ecf0f1;
  border-radius: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
}
.competition-modal-header {
  background-color: #17202a;
  border-bottom: 2px solid #c0392b;
  border-radius: 0;
  padding: 18px 24px 10px;
}
.competition-modal-header h2 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 1.5rem;
}
.competition-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #95a5a6 !important;
}

#IDCompetitionModal.competition-workspace {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 100;
}

#IDCompetitionModal .uk-modal-dialog {
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 0;
  padding: 0;
}

#IDCompetitionModal .uk-modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.competition-close-btn {
  position: absolute;
  right: 14px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #4a6278;
  background-color: #24384a;
  color: #e7eef5;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 2;
}

.competition-close-btn:hover {
  background-color: #2f4b63;
}

.competition-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.competition-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #233243;
  color: #d6e3ef;
  border: 1px solid #3b5168;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.competition-tab-active {
  background: #2f80b8;
  border-color: #5dade2;
  color: #fff;
}

.competition-tab-panel {
  display: none;
}

.competition-tab-panel-active {
  display: block;
}

.competition-file-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.competition-file-group {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.competition-label {
  font-size: 0.8rem;
  font-weight: bold;
  color: #bdc3c7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.competition-path-input {
  background-color: #2c3e50;
  color: #ecf0f1;
  border: 1px solid #4a6278;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}
.competition-path-input::placeholder {
  color: #5d6d7e;
}
.competition-path-input:focus {
  border-color: #5dade2;
  background-color: #263445;
  outline: none;
}

.competition-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.competition-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 130px;
  height: 70px;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.competition-action-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}
.competition-action-btn:active {
  transform: translateY(0);
  filter: brightness(0.9);
}
.competition-action-btn:disabled {
  filter: grayscale(60%) brightness(0.7);
  cursor: not-allowed;
  transform: none;
}
.competition-teleop-btn {
  background-color: #27ae60;
  color: #fff;
}
.competition-auton-btn {
  background-color: #2980b9;
  color: #fff;
}
.competition-start-btn {
  background-color: #16a085;
  color: #fff;
}
.competition-stop-btn {
  background-color: #c0392b;
  color: #fff;
}
.competition-enable-btn {
  background-color: #1e8449;
  color: #fff;
}
.competition-disable-btn {
  background-color: #7d3c98;
  color: #fff;
}
.competition-enable-row {
  margin-top: 8px;
}
.competition-mode-selected {
  box-shadow: 0 0 0 3px #f1c40f inset;
  filter: brightness(1.1);
}

.competition-joy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.competition-joy-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.competition-joy-select {
  max-width: 520px;
  background-color: #2c3e50;
  color: #ecf0f1;
  border: 1px solid #4a6278;
  border-radius: 4px;
  font-size: 0.9rem;
}

.competition-joy-select:focus {
  border-color: #5dade2;
  background-color: #263445;
}

.competition-joy-button {
  border: 1px solid #41586e;
  background: #24384a;
  border-radius: 8px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #c7d7e6;
}

.competition-joy-button-active {
  background: #27ae60;
  border-color: #2ecc71;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.3) inset;
}

.competition-joy-source {
  margin-top: 14px;
  color: #b6c8d8;
  font-size: 0.86rem;
}

.competition-joy-axes {
  margin-top: 14px;
  background: #172633;
  border: 1px solid #3a4f61;
  border-radius: 6px;
  padding: 10px;
  font-family: monospace;
  color: #9ed0f6;
}

.competition-joy-note {
  margin-top: 8px;
  color: #91a5b7;
  font-size: 0.85rem;
}

.competition-status {
  margin-top: 14px;
  min-height: 22px;
  font-size: 0.88rem;
  text-align: center;
  color: #f0b27a;
  font-style: italic;
}

.competition-path-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.competition-path-row .competition-path-input {
  flex: 1;
  min-width: 0;
}
.competition-browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background-color: #34495e;
  color: #ecf0f1;
  border: 1px solid #4a6278;
  border-radius: 4px;
  padding: 0 10px;
  height: 38px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
}
.competition-browse-btn:hover {
  background-color: #4a6278;
}
.competition-browse-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.competition-file-list {
  background-color: #1a2533;
  border: 1px solid #4a6278;
  border-radius: 4px;
  margin-top: 4px;
  max-height: 180px;
  overflow-y: auto;
}
.competition-file-list-item {
  padding: 6px 10px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #aed6f1;
  cursor: pointer;
  border-bottom: 1px solid #253647;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.competition-file-list-item:last-child {
  border-bottom: none;
}
.competition-file-list-item:hover {
  background-color: #2471a3;
  color: #fff;
}
.competition-file-list-empty {
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #7f8c8d;
  font-style: italic;
}

.competition-btn-label {
  letter-spacing: 0.05em;
}

.bottom-notice-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 28, 36, 0.96);
  color: #f3f7fb;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.bottom-notice-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-notice-close {
  border: none;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  color: #f3f7fb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.bottom-notice-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.header-gamepad-btn {
  margin-left: 20%;
  display: none;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #c8d5e3;
  padding: 0;
  line-height: 1;
  align-items: center;
  justify-content: center;
  transition: color 0.12s ease, transform 0.1s ease, filter 0.12s ease;
}

#IDGamePad .fa-gamepad {
  font-size: 28px;
  line-height: 1;
  color: inherit;
  transition: color 0.12s ease;
}

#IDGamePad.gamepad-pressed {
  color: #2ecc71;
}

#IDGamePad.gamepad-pressed .fa-gamepad {
  color: #2ecc71;
}

@media (max-width: 800px) {
  #IDCompetitionModal .uk-modal-body {
    padding: 14px;
  }

  .competition-action-btn {
    min-width: 120px;
    height: 62px;
    font-size: 1rem;
  }
}
