html, body, *{
    padding: 0;
    margin: 0;
    font-family: sans-serif;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e375c;
    --secondary-color: #2a5685e5;

    --secondary-low-opacity: #1a2e449a;

    --third-color: #0aa5d4;
    --fourth-color: #4fbbd6;
    --text-color: white;
    --secondary-text-color: #abc3e7;
}

nav {
    width: 100%;
    background-color: var(--third-color);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--primary-color));
    margin-bottom: 10px;
}

nav span {
    background: transparent;
    font-size: 12px;
}

html, body {
    height: 100%;
    color: white;
    background: transparent;
}

body {
  display: flex;
  flex-direction: column;
}

.background {
    background-image: url("./background.jpg");
    background-size: cover;
    background-position: center center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -100;
}

.container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: start;
    padding: 0 10px;
}

.container2 {
    min-width: min(500px, 100%);
    border-radius: 8px;
    width: 70%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 15px;
    background-color: var(--secondary-low-opacity);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3.5px);
    -webkit-backdrop-filter: blur(3.5px);
    margin-bottom: 50px;
}

.form-group, li, ul, .start, .to, .end, #result, .arrow-container, .reactants, .products, .above, .below, .container {
  background: transparent;
}


.above, .below {
  color: var(--secondary-text-color);
}

.form-group {
    width: 100%;
    display: flex;
    justify-content: center;
    gap:10px;
}

.to {
    display: flex;
    align-items: center;
    justify-content: center;
}
.start, .end {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap:5px;
    width:100%;
}

input, select {
    padding: 10px 15px;
    font-size: 16px;
    width:100%;
    border-radius: 4px;
    outline: none;
    width:100%;
    background: transparent;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3.5px);
    -webkit-backdrop-filter: blur(3.5px);

  border: 1px solid var(--third-color);  
  color: var(--secondary-text-color);  
}

/* Chrome, Edge, Safari */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

option {
  background-color: var(--primary-color);
  outline: none;
  border: none;
}

button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    background-color: var(--third-color);
    color: white;
    border: none;
    border-radius: 3px;
    font-weight: bold;
}

ul {
    padding: 0;
    margin: 0;
    counter-reset: reaction-counter;
    list-style: none;
}

li.reaction::before {
    content: counter(reaction-counter) ".";
    color: var(--third-color);
    margin-right: 0.5em;
}

.reaction {
    display: flex;
    align-items: center;
    justify-content: start;
    font-family: monospace;
    flex-wrap: wrap; 
    font-size: 15px;
    border-top: 1px solid grey;
    padding: 10px;

    counter-increment: reaction-counter;
}

.reactants,
.products {
  text-align: center;
  flex:1;
}

.arrow-container {
  position: relative;
  display: flex;
  justify-content: center;
  flex:1;
  min-width: 85px; 
  max-width: 100%; 
}

.arrow-container .arrow {
  display: block;
  width: 100%;
  height: 2px; 
  background-color: var(--third-color);
  position: relative;
  margin: 30px 5px;
}

.arrow-container .arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid var(--third-color); 
}

.arrow-container .above,
.arrow-container .below {
  position: absolute;
  font-size: 0.8em;
  white-space: nowrap;
  left: 50%;
  transform: translateX(-50%);
}

.arrow-container .above {
  top: 0.4em; 
}

.arrow-container .below {
  bottom: 0.4em;
}

.arrow-container .above:empty {
  display: none;
}

.arrow-container .below:empty {
  display: none;
}


footer {
    width: 100%;
    background-color: var(--primary-color);
    padding: 20px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: auto;
}

footer .social > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

footer a {
    text-decoration: none;
    color: var(--secondary-text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

footer a svg {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
}

footer a:hover {
    transform: translateY(-5px);
    color: var(--third-color);
}

footer > p {
    color: #aaa;
    font-size: 0.85rem;
    margin: 0;
    padding: 0;
    text-align: left;
}
