/* styles.css */
body {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    min-height: 100vh;        
    background-color: #2c2c2c;
    margin: 0;
    font-family: 'Arial', sans-serif;
    overflow-y: auto;         
    padding: 30px 0;          
}


.calculator {
    border: 1px solid #3e3e3e; 
    padding: 20px;
    margin-top: 5%;
    border-radius: 10px;
    background-color: #fdfdf3; 
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    width: 1050px; 
}

#display {
    width: 100%;
    height: 100px;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: left; 
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #555; 
    border-radius: 5px;
    overflow: auto;
    white-space: pre-wrap; 
    background-color: #2c2c2c; 
    color: #f1f1f1; 
}

.buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* # Botones por columna */
    gap: 10px;
}

button {
  width: 200px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1em;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8000, #ffa733); 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background 0.3s ease;
  display: inline-block;
  margin: 10px 0;
}

button:active {
    background-color: #777; 
}

button:hover {
    transform: scale(1.05);
}

#result {
    margin-top: 20px;
    font-size: 20px; /* Smaller font size for LaTeX output */
    text-align: left; /* Left-aligned text for better readability */
    border: 1px solid #555; /* Slightly darker grey for the border */
    padding: 10px;
    border-radius: 5px;
    background-color: #2c2c2c; /* Darker background for result */
    color: #f1f1f1; /* Light grey text color */
    overflow-x: auto; /* Allow horizontal scrolling */
    white-space: nowrap; /* Prevent line wrapping */
}


#input-section form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
}

#input-section label {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    color: #333;
    font-family: Arial, sans-serif;
    margin-bottom: 5px;
}

#input-section input[type="number"] {
    width: 100px;
    padding: 8px;
    margin-left: 10px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#input-section input[type="number"]:focus {
    border-color: #007BFF;
    box-shadow: 2px 2px 5px rgba(0, 123, 255, 0.2);
    outline: none;
}

#input-section button {
    padding: 10px 15px;
    font-size: 1.1em;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#input-section button:hover {
    background-color: #0056b3;
    box-shadow: 2px 2px 10px rgba(0, 91, 179, 0.3);
}

/*botones con menús*/
.menu {
  position: relative;
  display: inline-block;
}

.main-button, .sub-button {
  width: 200px;
  padding: 15px;
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1em;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background 0.3s ease;
}

.main-button {
  background: linear-gradient(135deg, #ff8000, #ffa733);
  z-index: 2;
  position: relative;
}

.sub-button {
  background: linear-gradient(135deg, #ffa733, #ffbf4d); 
  border: 1px solid black;        
  padding: 10px;             
  border-radius: 10px;
  font-size: 1em;
  color: white;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background 0.3s ease;
}


.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
}

.menu:hover .submenu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}


.sub-button:nth-child(1) {
  background: linear-gradient(135deg, #ffa733, #ffbf4d);
}
.sub-button:nth-child(2) {
  background: linear-gradient(135deg, #ffbf4d, #ffd066);
}
.sub-button:nth-child(3) {
  background: linear-gradient(135deg, #ffd066, #ffe680);
}

.sub-button:hover {
  transform: scale(1.05);
}

.prefix{
  text-align: left;
  font-size: larger;
}