/* #################################################################################################### RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* #################################################################################################### VARIABLES */
html {
  /* -------------------------------------------------- COLORS */
  --color-white: #e1e1e1;
  --color-background: #d3d3d3;
  --color-header: #7d7d7d;
  --color-border: #747474;
}

/* #################################################################################################### HTML & BODY */
body,
html {
  font-size: 1rem;
  font-family: sans-serif;
  color: black;
  height: 100%;
  display: flex;
  background-color: var(--color-background);
  width: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* #################################################################################################### ROOT ELEMENT */
#root {
  display: grid;
  align-items: center;
  justify-content: center;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  text-align: center;
  gap: 2rem;

  width: 100%;
  height: 100%;
}

/* #################################################################################################### CANVAS */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* #################################################################################################### INPUTS */
/* -------------------------------------------------- BASE */
select,
button {
  padding: 0.2em 0.5em;

  color: black;
  background-color: transparent;
  border: 3px solid currentColor;
  border-radius: 1rem;

  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0px 0px 15px 0px black;
}

/* ######################### INPUTS - HOVER */
select:hover,
button:hover {
  opacity: 0.4;
  cursor: pointer;
}

/* ######################### INPUTS - ACTIVE */
button:active {
  opacity: 0.4;
  transform: scale(0.9);
}

/* ######################### INPUTS - FOCUS */
button:focus,
select:focus {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

/* #################################################################################################### CELLS */
/* -------------------------------------------------- PRINCIPAL CELL */
.sel-cont {
  grid-row: 1 / -1;
  grid-column: 2 / 3;
}

/* -------------------------------------------------- OTHER CELLS */
.div-item {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  overflow: auto;
  z-index: 1;
}

/* ######################### BEFORE CELLS (TITLES) */
.div-item::before {
  color: black;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* #################################################################################################### TYPE COLORS */

.Acero {
  color: #323232;
  background-color: #7c7c7c;
}

.Volador {
  color: #a4a4a4;
  background-color: #f6f6f6;
}

.Agua {
  color: #0409b0;
  background-color: #3d6eec;
}

.Hielo {
  color: #6e71d4;
  background-color: #c1c3ed;
}

.Planta {
  color: #20742c;
  background-color: #46b97e;
}

.Bicho {
  color: #699137;
  background-color: #8ef963;
}

.Eléctrico {
  color: #8f9300;
  background-color: #f5fe58;
}

.Normal {
  color: #826868;
  background-color: #ceb6b6;
}

.Roca {
  color: #462d0c;
  background-color: #8c6b4c;
}

.Tierra {
  color: #9c5820;
  background-color: #d1a27d;
}

.Fuego {
  color: #b00e0e;
  background-color: #f65656;
}

.Lucha {
  color: #db6400;
  background-color: #ffa038;
}

.Hada {
  color: #d846ea;
  background-color: #ffbfe8;
}

.Psíquico {
  color: #db087a;
  background-color: #fa6def;
}

.Veneno {
  color: #9603a9;
  background-color: #de79ed;
}

.Dragón {
  color: #3d3441;
  background-color: #964cca;
}

.Fantasma {
  color: #bc83ea;
  background-color: #875e9b;
}

.Siniestro {
  color: #c3c3c3;
  background-color: #383838;
}

/* -------------------------------------------------- INMUNE */
.inmune {
  position: relative;
}

.inmune::after {
  width: 100%;
  height: 100%;
  top: 0%;
  left: 0%;
  content: "";
  position: absolute;
  border-radius: inherit;
  background-image: linear-gradient(
      to top left,
      transparent calc(50% - 3px),
      currentColor calc(50% - 3px),
      currentColor calc(50% + 3px),
      transparent calc(50% + 3px)
    ),
    linear-gradient(
      to top right,
      transparent calc(50% - 3px),
      currentColor calc(50% - 3px),
      currentColor calc(50% + 3px),
      transparent calc(50% + 3px)
    );
}

/* -------------------------------------------------- SPECIFIC ID'S */

#these-beat-me::before {
  content: "Estos me ganan";
}
#i-beat-these::before {
  content: "Yo les gano";
}
#these-endure-me::before {
  content: "Estos me resisten";
}
#i-endure-these::before {
  content: "Yo los resisto";
}

/* #################################################################################################### SE */
/* -------------------------------------------------- MAIN CONTAINER */
#se {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #fdcc59;
  z-index: 100;

  --color-primary: #5e292a;
  --color-primary-opaque: #5e292a40;
  --color-secondary: #e48d0c;
  --color-secondary-opaque: #e48d0c40;
  --color-tertiary: #cccccc;
  --color-tertiary-opaque: #cccccc40;

  --color-white: #e9e9e9;
  --color-black: #2e2e2e;

  --color-table-bg-head: hsl(0, 0%, 50%);
  --color-table-bg-cell: hsl(0, 0%, 80%);
  --color-table-bg-column: hsl(0, 0%, 65%);

  --color-table-border-head: hsl(0, 0%, 40%);
  --color-table-border-cell: hsl(0, 0%, 70%);
  --color-table-border-column: hsl(0, 0%, 55%);

  --color-table-hover-head: hsl(0, 0%, 60%);
  --color-table-hover-cell: hsl(0, 0%, 90%);
  --color-table-hover-column: hsl(0, 0%, 75%);
}

#se ol,
#se ul {
  padding-left: 1.5rem;
  width: max-content;
  text-align: left;
}

/* ################################################## TABLE ################################################## */

/* ------------------------- TABLA GENERAL */
#se > table {
  margin: 2rem;
  background: var(--color-secondary);
  font-size: 2.75rem;
  text-align: center;
  border-spacing: 0;
  border: var(--color-primary) 6px solid;
  border-radius: 0.5rem;
  background-color: var(--color-secondary);
  /* table-layout: fixed; */
}

/* ------------------------- ENCABEZADOS */
#se > table th {
  padding: 0.15rem 0.25rem;
  background-color: var(--color-table-bg-head);
  border: var(--color-table-border-head) solid 3px;
  font-size: 1.5rem;
  white-space: nowrap;
  vertical-align: middle;
  position: sticky;
  top: 0px;
}

/* ------------------------- TODAS LAS CELDAS */
#se > table td {
  padding: 0.15rem 0.25rem;
  background-color: var(--color-table-bg-cell);
  border: var(--color-table-border-cell) solid 3px;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 1rem;
  text-transform: capitalize;
}

/* ------------------------- HACER HOVER SOBRE UNA FILA */
#se > table tr:hover td {
  background-color: var(--color-table-hover-column);
  border-color: var(--color-table-hover-column);
}

/* ------------------------- HACER HOVER SOBRE UNA CELDA */
#se > table tr td:hover {
  background-color: var(--color-table-hover-cell);
  border: var(--color-black) 3px solid;
}
