body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #fdfdfc;
}

/* Rotating Cube Section */
#banner {
  width: 100%;
  margin: 2rem auto 1rem auto;
  height: 300px;
  background: radial-gradient(#2afba5, #a3e9ff, #66ee90);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 5px black inset;
}

.scene {
  width: 300px;
  height: 300px;
  perspective: 1000px;
}

.cube {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 1s ease-in-out;
}

.face {
  position: absolute;
  width: 300px;
  height: 300px;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  border: 1px solid black;
  box-sizing: border-box;
}

.front  { transform: rotateY(  0deg) translateZ(150px); background-image: url('https://castlekeeper.net/images/theft deterrence.png'); }
.right  { transform: rotateY( 90deg) translateZ(150px); background-image: url('https://castlekeeper.net/images/house visits.png'); }
.back   { transform: rotateY(180deg) translateZ(150px); background-image: url('https://castlekeeper.net/images/pet care.png'); }
.left   { transform: rotateY(-90deg) translateZ(150px); background-image: url('https://castlekeeper.net/images/observe and report.png'); }

/* Auth Section */
#authSection {
  width: 100%;
  max-width: 800px;
  margin: 2rem auto 1rem auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.loginBtn {
  padding: 0.8rem 1.6rem;
  font-size: 1.1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.loginBtn:hover {
  background-color: #0056b3;
}

/* About Paragraph */
#aboutCastleKeeper {
  width: 90%;
  max-width: 700px;
  margin: 1.5rem auto;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #333;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Login Form */
.loginForm {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.loginForm h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.loginForm input {
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.loginForm button[type="submit"] {
  background-color: #28a745;
  color: white;
  padding: 0.7rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 2px 2px 2px black;
  display: block;    
  text-align: center;
  margin-left: auto;
  margin-right: auto;   
}

.loginForm button[type="submit"]:hover {
  background-color: #218838;
}

.loginForm a {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
  display: block;
  margin-top: 0.5rem;
}

.loginForm a:hover {
  text-decoration: underline;
}

.loginForm .closeForm {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  background: none;
  border: none;
}

.loginForm .closeForm:hover {
  color: #000;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modalOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

#loginFormContent {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 2rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

#loginFormContent .modalButton {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

#loginFormContent .modalButton:hover {
  background-color: #0056b3;
}

#loginFormContent a {
  color: #007bff !important;
  text-decoration: none !important;
}

#loginFormContent a:hover {
  text-decoration: underline;
}

#loginFormContent button {
  background: linear-gradient(to bottom left, #89ffd1, #58a44930, #89ffd1);
  font-size: 22pt;
  box-shadow: 2px 2px 4px black;
  border-radius: 45px;
}

/* Footer */
#siteFooter {
  background-color: #f1f1f1;
  color: #333;
  padding: 2rem 1rem 1rem;
  margin-top: 4rem;
  font-size: 0.95rem;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-section {
  flex: 1 1 200px;
  min-width: 200px;
}

.footer-section h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #000;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.4rem;
}

.footer-section ul li a {
  text-decoration: none;
  color: #007bff;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid #ccc;
  padding-top: 1rem;
}

/* ==================== */
/* Responsive Adjustments */
/* ==================== */
@media (max-width: 768px) {
  #banner {
    height: 220px;
    margin: 1.5rem auto 1rem auto;
  }
  .scene {
    width: 200px;
    height: 200px;
  }
  .face {
    width: 200px;
    height: 200px;
  }
  .front  { transform: rotateY(0deg) translateZ(100px); }
  .right  { transform: rotateY(90deg) translateZ(100px); }
  .back   { transform: rotateY(180deg) translateZ(100px); }
  .left   { transform: rotateY(-90deg) translateZ(100px); }

  #aboutCastleKeeper {
    font-size: 1rem;
    padding: 1rem;
  }

  .loginBtn {
    flex: 1 1 100%;
    max-width: none;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  #banner {
    height: 180px;
  }
  .scene {
    width: 150px;
    height: 150px;
  }
  .face {
    width: 150px;
    height: 150px;
  }
  .front  { transform: rotateY(0deg) translateZ(75px); }
  .right  { transform: rotateY(90deg) translateZ(75px); }
  .back   { transform: rotateY(180deg) translateZ(75px); }
  .left   { transform: rotateY(-90deg) translateZ(75px); }

  #aboutCastleKeeper {
    font-size: 0.95rem;
    line-height: 1.4;
  }
}
