/** FORM **/
#main-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px;
}

.bekt-panel {
  background-color: #0b0f19;
  border: 3px solid #1a2233;
  border-left: 6px solid #00ff66;
  border-radius: 4px;
  padding: 25px;
  color: #e2e8f0;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.1);

  max-width: 540px;
  width: 100%;
  margin: 20px 10px;
  opacity: 1;
  transform: scale(1);
  box-sizing: border-box;

  transition:
    max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    transform 0.5s ease;
}

.bekt-title {
  color: #b2ffd1;
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: 2px;
  border-bottom: 2px solid #1a2233;
  padding-bottom: 10px;
  margin-top: 0;
}

.calculations-box {
  background-color: #1f2937;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
  font-family: monospace;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e5e7eb;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.bekt-section-header {
  background-color: #111827;
  color: #ffaa00;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px 12px;
  margin: 15px 0 5px 0;
  border-left: 4px solid #ffaa00;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

/* * FORM * */

.bekt-form-grid {
  display: flex;
  flex-direction: column; /* Przeprojektowano z sztywnego grida na elastyczny pionowy flex */
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.bekt-selects-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  width: 100%;
}

.bekt-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bekt-form-group label {
  color: #94a3b8;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bekt-form-group input[type="number"] {
  background-color: #1e293b;
  border: 2px solid #334155;
  border-radius: 4px;
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.2s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.bekt-form-group input[type="number"]:focus {
  border-color: #00ff66;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.3);
  background-color: #111827;
}

.bekt-action-wrapper {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.bekt-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #1a2233;
}

.bekt-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.bekt-btn-primary {
  background-color: #2563eb;
  color: #ffffff;
}

.bekt-btn-primary:hover {
  background-color: #1d4ed8;
}

.bekt-btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.bekt-btn-secondary:hover {
  background-color: #e2e8f0;
}

.bekt-btn-link {
  background-color: transparent;
  color: #64748b;
}

.bekt-btn-link:hover {
  color: #989aa1;
  text-decoration: underline;
}

.resource-result-image {
  vertical-align: middle;
  height: 30px;
}

#results-panel {
  font-size: 30px;
}

/* * HERO UPGRADE PANEL * */

.border-color-stroke {
  stroke: #a4d0e9;
}
.border-color-fill {
  fill: #a4d0e9;
}

.divine-gold-color-stroke {
  stroke: #fec901;
}
.divine-gold-color-fill {
  stroke: #fec901;
  fill: #fec901;
}

.common-color {
  stroke: #7baba8;
  fill: #7baba8;
}
.common-gradient stop:nth-child(1) {
  stop-color: #7baba8;
  stop-opacity: 0;
}
.common-gradient stop:nth-child(2) {
  stop-color: #7baba8;
  stop-opacity: 0.5;
}

.rare-color {
  stroke: #6cde38;
  fill: #6cde38;
}
.rare-gradient stop:nth-child(1) {
  stop-color: #6cde38;
  stop-opacity: 0;
}
.rare-gradient stop:nth-child(2) {
  stop-color: #6cde38;
  stop-opacity: 0.5;
}

.epic-color {
  stroke: #1998fd;
  fill: #1998fd;
}
.epic-gradient stop:nth-child(1) {
  stop-color: #1998fd;
  stop-opacity: 0;
}
.epic-gradient stop:nth-child(2) {
  stop-color: #1998fd;
  stop-opacity: 0.5;
}

.legendary-color {
  stroke: #ffc006;
  fill: #ffc006;
}
.legendary-gradient stop:nth-child(1) {
  stop-color: #ffc006;
  stop-opacity: 0;
}
.legendary-gradient stop:nth-child(2) {
  stop-color: #ffc006;
  stop-opacity: 0.5;
}

.mythic-color {
  stroke: #e97012;
  fill: #e97012;
}
.mythic-gradient stop:nth-child(1) {
  stop-color: #e97012;
  stop-opacity: 0;
}
.mythic-gradient stop:nth-child(2) {
  stop-color: #e97012;
  stop-opacity: 0.5;
}

.supreme-color {
  stroke: #f6412c;
  fill: #f6412c;
}
.supreme-gradient stop:nth-child(1) {
  stop-color: #f6412c;
  stop-opacity: 0;
}
.supreme-gradient stop:nth-child(2) {
  stop-color: #f6412c;
  stop-opacity: 0.5;
}

.ultimate-color {
  stroke: #731fff;
  fill: #731fff;
}
.ultimate-gradient stop:nth-child(1) {
  stop-color: #731fff;
  stop-opacity: 0;
}
.ultimate-gradient stop:nth-child(2) {
  stop-color: #731fff;
  stop-opacity: 0.5;
}

.celestial-color {
  stroke: #0132d1;
  fill: #0132d1;
}
.celestial-gradient stop:nth-child(1) {
  stop-color: #0132d1;
  stop-opacity: 0;
}
.celestial-gradient stop:nth-child(2) {
  stop-color: #0132d1;
  stop-opacity: 0.5;
}

.stellar-color {
  stroke: #cd24eb;
  fill: #cd24eb;
}
.stellar-gradient stop:nth-child(1) {
  stop-color: #cd24eb;
  stop-opacity: 0;
}
.stellar-gradient stop:nth-child(2) {
  stop-color: #cd24eb;
  stop-opacity: 0.5;
}

.immortal-color {
  stroke: #7b140d;
  fill: #7b140d;
}
.immortal-gradient stop:nth-child(1) {
  stop-color: #7b140d;
  stop-opacity: 0;
}
.immortal-gradient stop:nth-child(2) {
  stop-color: #7b140d;
  stop-opacity: 0.5;
}

.divine-color {
  stroke: #262641;
  fill: #262641;
}
.divine-gradient stop:nth-child(1) {
  stop-color: #fec901;
  stop-opacity: 0;
}
.divine-gradient stop:nth-child(2) {
  stop-color: #fec901;
  stop-opacity: 0.3;
}

/* * hero upgrade selects * */
.select-container {
  display: flex;
  gap: 15px;
  background-color: #0b1116;
  padding: 20px;
}

select {
  appearance: none; /* no default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  padding: 12px 40px 12px 16px;
  background-color: #121e25;
  border: 2px solid #00e5ff;
  border-radius: 4px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow:
    0 0 10px rgba(0, 229, 255, 0.2),
    inset 0 0 5px rgba(0, 229, 255, 0.1);
  box-sizing: border-box;

  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://w3.org' width='100' height='100' fill='%2300e5ff'><polygon points='0,30 100,30 50,80'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;

  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

select:hover,
select:focus {
  outline: none;
  border-color: #00ff66;
  box-shadow:
    0 0 15px rgba(0, 255, 102, 0.4),
    inset 0 0 5px rgba(0, 255, 102, 0.2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://w3.org' width='100' height='100' fill='%2300ff66'><polygon points='0,30 100,30 50,80'/></svg>");
}

select option {
  text-transform: uppercase;
  background-color: #121e25;
  color: #ffffff;
  padding: 10px;
}

.bekt-cards-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 25px; /* Odstęp między kartą bazową a kartą końcową */
  width: 100%;
  margin-top: 10px;
}

.hero-svg-base {
  display: block;
  width: 200px;
  height: 300px;
  flex-shrink: 0;
}

#final-hero-level-svg-container {
  display: block;
  position: relative;
  width: 200px;
  height: 300px;
  flex-shrink: 0;
}

.hero-main-svg {
  display: block;
  width: 200px;
  height: 300px;
  position: relative;
  z-index: 2;
}

/* * divine border * */

.divine-border {
  position: absolute;
  z-index: 3;
  top: -10px;
  left: -10px;
  width: 220px;
  height: 320px;
  pointer-events: none;
}

.bekt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;

  justify-items: center;
  justify-content: center;

  align-items: center;
  gap: 16px;
  width: 100%;
}

.hero-svg-base {
  display: block;
}

/* responsivness */

@media (max-width: 1024px) {
  #main-container {
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .bekt-panel {
    max-width: 100%;
    margin: 10px 0;
  }

  #second-column-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 520px) {
  .bekt-selects-wrapper {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bekt-cards-container {
    gap: 10px;
    transform: scale(0.8);
    transform-origin: center center;
    margin: -25px 0;
  }
}

@media (max-width: 480px) {
  .bekt-panel {
    padding: 15px;
  }

  .bekt-title {
    font-size: 1.2rem;
    letter-spacing: 1px;
  }

  #results-panel {
    font-size: 20px;
  }

  .bekt-form-actions {
    flex-direction: column;
    gap: 8px;
  }

  .bekt-btn {
    width: 100%;
    text-align: center;
  }
}

/* * COLORFUL SPANS * */
span.blue-span {
  color: #09f;
}
span.red-span {
  color: #f33;
}
span.green-span {
  color: #8c5;
}

/* * * */
#drone-select {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 1200px;
}

#drone-select img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  filter: brightness(0.8) grayscale(0.2);
  transition: 0.1s ease-in-out;
}

#drone-select img:hover {
  filter: brightness(1) grayscale(0);
  transform: scale(1.1);
}

#drone-select img.selected {
  filter: drop-shadow(0px 0px 8px gray);
  transform: scale(1.1);
}
