body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #FFF; 
}

#simplifyExpression, #solveLinearEquation, #factorQuadraticEquation {
    background-image: url(background.jpg);
    background-size: auto;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top;
}

#percentageCalculator, #exponentsCalculator, #fractionCalculator, #basicCalculator, #financeCalculator {
    background-image: url(background.jpg);
    background-size: auto;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top;
}

#permutationsCalculator, #combinationsCalculator {
    background-image: url(background.jpg);
    background-size: auto;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top;
}

#rectangleCalculator, #triangleCalculator, #circleCalculator, #cubeCalculator, #trigonometryCalculator {
    background-image: url(background.jpg);
    background-size: auto;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top;
}

#temperatureCalculator, #weightCalculator, #speedCalculator, #lengthCalculator {
    background-image: url(background.jpg);
    background-size: auto;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center top;
}

h1 {
    text-align: center;
    padding: 20px;
    font-size: 80px;
    color: transparent;
    background-color: white;
    background-image: url(tigerfur.jpg);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    background-position: center;
}

.calculator {
    width: 300px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.2); 
    border-radius: 10px;
    text-align: center;
}

h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #FFA500; 
}

input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #FFA500; 
    color: #000;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #FFD700; 
}

p {
    margin-top: 10px;
    font-weight: bold;
    color: #FFA500;  
}

#algebra1, #arithmetics1, #geometry1, #combinatorics1, #finance1, #converter1 {
    color:#29ab87;
    text-align: center;
}

header {
background-color: #29ab87;
color: #fff;
text-align: center;
padding: 1rem 0;
}

nav ul {
list-style: none;
display: flex;
flex-wrap: wrap; 
justify-content: center;
}

nav ul li {
margin: 10px 20px;
flex: 1;
max-width: calc(50% - 40px);
text-align: center; 
box-sizing: border-box; 
}

nav a {
text-decoration: none;
color: #fff;
}

nav a:hover {
    color: #FFD700;
}

footer {
background-color: #29ab87;

text-align: center;
padding: 1rem 0;
}

#p1 {
color: white;
}

#p3, #p4, #or {
color: red;
}

input[type="text"], input[type="number"] {
background-color: white;
}

#scientific {
background-color: #333;
color: #000;
padding: 20px;
text-align: center;
font-size: 18px;
}

#display {
width: 100%;
padding: 10px;
font-size: 24px;
background-color: rgba(255, 255, 255, 0.2);
color: #FFF;
border: none;
border-radius: 10px;
}

table {
width: 100%;
margin-top: 20px;
}

table td {
width: 16.666%;
}

table input[type="button"] {
width: 100%;
padding: 10px;
background-color: #FFA500;
color: #000;
border: none;
cursor: pointer;
font-weight: bold;
}

table input[type="button"]:hover {
background-color: #FFD700;
}

#k1, #k2, #k3 {
background-color: #FFA500;
color: #000;
border: none;
cursor: pointer;
font-weight: bold;
}

#k1:hover, #k2:hover, #k3:hover {
background-color: #FFD700;
}

#k4, #k5, #k6, #k7 {
font-weight: 800;
}

.result {
    background-color: #000;
}

select {
    appearance: none;
    background-color: #ff0000;
    border: 1px solid #ccc;
    padding: 8px;
    font-size: 16px; 
    width: 200px;
    cursor: pointer;
    text-align: center;
    color: #fff;
}    

select:after {
    content: '\25BC';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

select option {
    background-color: #0000ff;
    color: #fff;
    padding: 8px;
}

#translation-recommendation {
    font-size: 16px;
    font-weight: 700;
    margin: 15px;
    color: #fff;
}

.translationModal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.close-translate-button {
    display: inline-block;
    position: absolute;
    top: 10px;
    right: 10px;
    width: max-content;
    border: none;
    background-color: #aa0000;
    color: #fff;
    padding: 15px 15px;
    font-size: 24px;
    cursor: pointer;
}

.custom-translation-select {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

.select-translation-selected {
    background-color: #f4f4f4;
    color: #000;
    padding: 10px;
    cursor: pointer;
    border: 1px solid #ccc;
}

.select-translation-items {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f4f4;
    color: #000;
    border: 1px solid #ccc;
    z-index: 99;
    width: 150px;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    flex-wrap: wrap;
}

.select-translation-items div {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-basis: 50%;
}

.select-translation-items div:hover {
    background-color: #ddd;
}

.flag {
    width: 20px;
    height: 15px;
    margin-right: 10px;
}