/* GLOBAL STYLES */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* HEADER / NAVIGATION */
.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 1em;
    height: 12vh;
    background-color: #211f26;
    box-shadow: 3px 5px 5px rgba(0,0,0,0.2);
}

h4 {
    color: #EDDB92;
    letter-spacing: 3px;
    font-size: 2.0rem;
    margin: 0;
}

.LOGO {
    height: 12vh;
    max-width: 100%;
}

/* NAV LINKS */
ul.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.nav-links li a {
    text-decoration: none;
    color: #EDDB92;
    padding: 8px 12px;
    border-radius: 20px;
    display: inline-block;
    font-size: 1rem;
    transition: all 0.3s;
}

ul.nav-links li a:hover {
    background-color: #100824;
    box-shadow: 3px 5px 5px rgba(0,0,0,0.2);
}

/* MOBILE TAP EFFECT ON NAV LINKS */
@media (hover: none) and (pointer: coarse) {
    ul.nav-links li a:active {
        background-color: #100824;
        box-shadow: 3px 5px 5px rgba(0,0,0,0.2);
        transform: scale(0.95);
        transition: transform 0.1s;
    }
}

/* PAGE CONTENT */
.page-content {
    font-size: 15px;
    max-width: 1200px;
    width: 100%;
    margin: 2em auto;
    padding: 0 1em;
    
}

/* CALCULATOR STYLES */
#calculator {
    width: 100%;
    max-width: 400px;
    margin: 2em auto;
    background-color: #EDDB92;
    border-radius: 25px;
    overflow: hidden;
}

#display {
    width: 100%;
    height: 60px;
    padding: 10px 15px;
    font-size: 1.8rem;
    text-align: left;   /* start input from left */
    color: #EDDB92;
    background-color: #100824;
    border: none;
    border-radius: 20px 20px 0 0;
    overflow-x: auto;
    white-space: nowrap;
}

#display::-webkit-scrollbar { display: none; }

#keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
}

button {
    width: 100%;
    aspect-ratio: 1/1; /* keep buttons square */
    border-radius: 50%;
    border: none;
    background-color: #100824;
    color: #EDDB92;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover { background-color: #49269b; }
.operator-btn { background-color: #ff7700; color: black; }
.operator-btn:hover { background-color: #f69b4c; }
.operator-btn-C { background-color: red; }
.operator-btn-C:hover { background-color: rgb(255,63,63); }
.operator-btn-E{background-color:green;}
.operator-btn-E:hover{background-color:rgb(52, 184, 52);}
/* Keyboard press effect */
button.active {
    transform: scale(0.95);
    background-color: #49269b !important;
}

/* RESPONSIVE STYLES */
@media (max-width: 900px) {
    h4 { font-size: 1.3rem; }
    ul.nav-links li a { font-size: 0.9rem; padding: 6px 10px; }
}

@media (max-width: 600px) {
    .container { height: auto; padding: 0.5em; }
    h4 { font-size: 1.1rem; }
    ul.nav-links { justify-content: center; }
    ul.nav-links li a { font-size: 0.8rem; padding: 4px 8px; }
    #calculator { max-width: 95vw; }
    #display { font-size: 1.5rem; height: 50px; padding: 8px 10px; }
    button { font-size: 1.3rem; }
}

@media (max-width: 400px) {
    #display { font-size: 1.2rem; padding: 6px 8px; }
    button { font-size: 1.1rem; }
}



.home:active{
    background-color: #44278e;
}