/* --- Global Styles --- */
body {
  background: linear-gradient(135deg, #a6badd 10%, #5aa8dbde 100%);
  font-family: Arial, sans-serif;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* --- Header & Navigation --- */
header {
  background-color: #333;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.3s;
}

nav a:hover {
  background-color: #5aa8dbde;
}

/* --- Main Content Area --- */
main {
  flex: 1; /* Pushes the footer to the bottom */
  padding: 20px;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

h1.calc-title {
  text-align: center;
  color: #333;
  margin-top: 10px;
}

/* --- Footer --- */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 15px 0;
  font-size: 0.9rem;
  margin-top: auto;
}

/* --- Calculator Specific Styles --- */
.red { color: rgba(247, 9, 9, 0.733); }
.green { color: green; }
.down .orange { background-color: rgb(255, 126, 5); color: white; border: none; }

.calculator {
  position: relative;
  margin: 20px auto;
  width: 280px;
  height: 600px;
  border-radius: 20px;
  border-color: grey;
  background: #d3d3d3;
  padding: 1.5rem;
  box-shadow: 0 0 50px 5px rgb(10, 10, 10);
}
.logo {
  font-weight: bolder;
  text-transform: uppercase;
  margin-top: -1rem;
  margin-left: 1rem;
  display: block;
}
.model {
  display: block;
  margin-top: 0.75em;
  font-style: italic;
}
.svpam {
  display: inline-block;
  color: green;
  font-weight: bold;
  font-size: small;
}
.solar {
  float: right;
  margin: -3em 0;
  width: 55%;
  height: 3rem;
  background: hsla(336, 13%, 23%, 0.808);
  box-shadow: inset 0 0 15px rgb(8, 8, 8);
  border-radius: 10px;
}
.power {
  float: right;
  line-height: 1.5rem;
  font-size: xx-small;
  text-transform: uppercase;
  font-weight: bold;
}

/* Screen */
.screen {
  width: 100%;
  height: 4rem;
  background: #9ba;
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  margin: 1.5em 0;
  padding: 0.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
}
#calc-expression {
  text-align: left;
  font-size: 1rem;
  color: #111;
  min-height: 1.2rem;
  word-break: break-all;
}
#calc-result {
  text-align: right;
  font-size: 1.5rem;
  font-weight: bold;
  color: #000;
}

/* Buttons */
button {
  cursor: pointer;
  border: 1px solid #999;
}
button:active {
  transform: scale(0.95);
}

.top-buttons {
  display: flex;
  justify-content: center;
  text-align: center;
  text-transform: uppercase;
  color: saddlebrown;
  font-size: x-small;
  line-height: 20px;
}
.top-buttons button {
  width: 2.35rem;
  height: 2em;
  border-radius: 15px;
  background-color: gray;
}
.shift { margin-top: 1em; }
.alpha { margin-top: 1.5em; margin-left: 1.5em; }
.mode { margin-top: 1.5em; margin-left: 11em; margin-right: 1.5em; }
.on { margin-top: 1em; }

.replay {
  background: grey;
  width: 78px;
  height: 70px;
  line-height: 70px;
  position: absolute;
  left: 40%;
  top: 31%;
  border-radius: 125px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  box-shadow: 2px 2px 5px 0 black;
}

table { width: 100%; border-collapse: separate; border-spacing: 2px; }

.up {
  display: flex;
  justify-content: center;
  color: saddlebrown;
  font-size: 10px;
  text-align: center;
  margin-bottom: 10px;
  margin-top: 20px;
}
.up button {
  color: white;
  background-color: #222;
  height: 20px;
  width: 42px;
  border-radius: 8px;
  border: none;
}

.down {
  display: flex;
  justify-content: center;
  color: saddlebrown;
  font-size: 10px;
  text-align: center;
}
.down button {
  color: black;
  background-color: #f0f0f0;
  height: 30px;
  width: 48px;
  border-radius: 8px;
  box-shadow: 0 1px 4px 0 black;
  font-size: 14px;
  font-weight: bold;
}