html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Courier New', monospace;
  background-color: #a8d6ff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

body>h1,
body>form.search-form {
  margin-top: 20px;
  text-align: center;
  flex-shrink: 0;
}

body>form.search-form {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.textstred {
  text-align: center;
}

footer {
  background-color: #a8d6ff;
  color: black;
  text-align: center;
  padding: 3px;
  font-size: 14px;
  margin-top: auto;
  width: 100%;
}

.search-form input[type="text"] {
  background-color: #ffffff00;
  padding: 10px;
  font-size: 16px;
  width: 100%;
  max-width: 300px;
  border: 2px solid #165f9a;
  border-radius: 6px;
  box-sizing: border-box;
}

.search-form button {
  background-color: #2195f3;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.search-form button:hover {
  background-color: #1976D2;
}

.gsc-results .gsc-webResult {
  background-color: #a8d6ff;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 15px;
  font-family: 'Courier New', monospace;
  color: #222;
}

.gsc-results .gsc-webResult a.gs-title {
  color: #2195f3;
  font-weight: bold;
}

.gsc-results .gsc-webResult a.gs-title:hover {
  color: #0b63c7;
  text-decoration: underline;
}

.gsc-results .gs-snippet {
  color: #555;
  font-size: 14px;
}

.gsc-results {
  max-width: 700px;
  margin: 20px auto;
}

.parent {
  flex: 1;
  padding-top: 5px;
  align-content: center;
  border: #165f9a solid 2px;
  border-radius: 12px;
  background-color: #2195f3;
  margin-top: 30px;
  margin-bottom: 5px;
  margin-left: 5px;
  margin-right: 5px;
  flex-wrap: wrap;
  display: flex;
  justify-content: space-evenly;
}

.sponzor {
  flex: 1;
  text-align: center;
  border: #165f9a solid 2px;
  border-radius: 12px;
  background-color: #2195f3;
  margin-top: 30px;
  margin-bottom: 5px;
  flex-grow: 100;
  flex-basis: 110;
  align-content: top;
}

.h2center {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 0px;
}

#navbar {
  position: fixed;
  top: -60px;
  left: 0;
  width: 100%;
  background-color: #165f9a;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 15px 0;
  transition: top 0.3s ease-in-out;
  z-index: 9999;
  font-family: 'Courier New', monospace;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#navbar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding-bottom: 4px;
  position: relative;
}

#navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: white;
  transition: width 0.3s ease-in-out;
}

#navbar a:hover::after {
  width: 100%;
}

#hoverzone {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  z-index: 9998;
}

h1 {
  margin-bottom: 20px;
}

button {
  padding: 10px 25px;
  font-size: 18px;
  cursor: pointer;
  background-color: #6200ee;
  border: none;
  border-radius: 8px;
  color: white;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #3700b3;
}

#result {
  font-size: 20px;
  margin-top: 10px;
  min-height: 60px;
  text-align: center;
  font-weight: bold;
  color: #165f9a;
}

.coin-container {
  perspective: 1000px;
  margin: 20px auto;
  width: 120px;
  height: 120px;
}

.coin {
  width: 100px;
  height: 100px;
  position: relative;
  margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform 2s ease-out;
  cursor: default;
  font-size: 80px;
  user-select: none;
}

.coin div {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #2195f3, #165f9a);
  color: white;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.head {
  transform: rotateY(0deg);
}

.tail {
  transform: rotateY(180deg);
}

/* Dark theme overrides */
body.dark-theme {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-theme footer,
body.dark-theme .gsc-results .gsc-webResult,
body.dark-theme .parent,
body.dark-theme .sponzor,
body.dark-theme #navbar {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-theme .search-form input[type="text"] {
  background-color: #1e1e1e;
  border: 2px solid #2195f3;
  color: #e0e0e0;
}

body.dark-theme .gsc-results .gsc-webResult a.gs-title {
  color: #64b5f6;
}

body.dark-theme .gsc-results .gsc-webResult a.gs-title:hover {
  color: #42a5f5;
}

body.dark-theme .gsc-results .gs-snippet {
  color: #ccc;
}

.theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  background-color: gray;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 10000;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: 15px;
  z-index: 10000;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  margin: 4px 0;
  transition: 0.4s;
}

@media (max-width: 768px) {
  #navbar {
    flex-direction: column;
    align-items: center;
    background-color: #165f9a;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
  }

  #navbar.active {
    transform: translateY(0);
  }

  #navbar a {
    padding: 10px 0;
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .menu-toggle {
    display: flex;
    position: fixed;
    top: 15px;
    right: 15px;
  }

  #hoverzone {
    display: none;
  }
}

.download-button {
    display: block;
    width: 300px;
    margin: 20px auto;
    padding: 20px;
    background-color: #2195f3;
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    transition: background-color 0.3s, transform 0.2s;
}

.download-button:hover {
    background-color: #1976D2;
    transform: scale(1.03);
}

h1 {
  margin-bottom: 15px;
}

.inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

input {
  padding: 8px;
  width: 60px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

#number {
  font-size: 48px;
  margin: 20px 0;
  color: #333;
}

button {
  padding: 10px 20px;
  font-size: 18px;
  background: #00c9ff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease;
}

button:hover {
  background: #007ea7;
}
