/* System fonts + baseline reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: #121212;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
  height: 100vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
}
* {
  transition: background 0.3s, transform 0.2s;
}
button {
  appearance: none;
  background-color: #151515;
  border: 2px solid #303030;
  border-radius: 15px;
  box-sizing: border-box;
  color: #FFFFFF;
  cursor: pointer;
  display: inline-block;
  font-family: Roobert,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  font-size: 1rem;
  font-weight: 600;
  line-height: normal;
  margin: 0;
  min-height: 20px;
  min-width: 0;
  outline: none;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  transition: all 300ms cubic-bezier(.23, 1, 0.32, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  will-change: transform;
}

button:disabled {
  pointer-events: none;
}

button:hover {
  box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
  transform: translateY(-2px);
}

button:active {
  box-shadow: none;
  transform: translateY(0);
}
input {
  background-color: #00000080;
  color: #1f1f1f;
  border-radius: 1rem;
  border-width: 0.1rem;
  border-style: solid;
  padding: 0.5rem;
  color: #fff;
}


.greaterText {
  font-family: Verdana, sans-serif;
  line-height: 1em;
  color: #e6e6e6;
  font-weight: bold;
  font-style: italic;
  font-size: 2rem;
  text-shadow: 0px 0px 0 rgb(207, 207, 207), 1px 1px 0 rgb(194, 194, 194),
    2px 2px 0 #a1266a, 3px 3px 0 #a1266a,
    4px 4px 0 #a1266a, 5px 5px 0 #a1266a,
    7px 7px 1px rgba(0, 0, 0, 0.5), 0px 0px 6px rgba(0, 0, 0, 0.2);
}
.sub-greater {
  font-family: Verdana, sans-serif;
  font-size: 1rem;
  color: #e6e6e6;
  text-decoration: none;
  text-transform: none;
  text-shadow: 5px 5px 5px #070707;
  margin-top: 0.5rem;
}

#weather-result {
  margin-top: 10px;
  font-size: 1.2em;
  font-family: Verdana, sans-serif;
  font-size: 1rem;
  color: #e6e6e6;
  text-decoration: none;
  text-transform: none;
  -webkit-text-stroke: 0.03rem;
  -webkit-text-stroke-color: #a1266a;
  margin-top: 0.5rem;
  display: inline-flex;
}

.genText {
  font-family: Verdana, sans-serif;
  font-size: 1rem;
  color: #e6e6e6;
  text-decoration: none;
  text-transform: none;
  text-shadow: 1px 0px 0px #070707, 0px 1px 0 #070707, -1px 0px 0px #070707, 0 -1px 0px #070707;
}

/* Mobile-friendly links */
.links {
  display: grid;
  gap: 1rem;
}
.link {
  display: block;
  padding: 1rem;
  background: #f0f0f0;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: #0066cc;
  font-weight: 500;
}
.link:hover {
  background: #e0e0e0;
}

/* Touch target sizing */
@media (max-width: 600px) {
  .link {
    padding: 1.2rem;
  } /* Larger tap targets on mobile */
}

.search-bar {
  max-width: 500px;
  margin: 20px auto;
}
#search-input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  color: #fff;
}
.search-engines {
  display: flex;
  gap: 10px;
}
.search-engines button {
  flex: 1;
  padding: 8px;
  cursor: pointer;
}

.google-btn {
  padding: 12px;
  border-radius: 8px;
  border-width:0.1rem;
  border-style: solid;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  color: #f0f0f0;
  transition: transform 0.2s;
  background: #E24032;
  background: linear-gradient(90deg,rgba(67, 132, 246, 1) 0%, rgba(67, 132, 246, 1) 13%, rgba(235, 69, 50, 1) 16%, rgba(235, 69, 50, 1) 29%, rgba(255, 187, 6, 1) 32%, rgba(255, 187, 6, 1) 45%, rgba(67, 132, 246, 1) 48%, rgba(67, 132, 246, 1) 61%, rgba(49, 171, 86, 1) 64%, rgba(49, 171, 86, 1) 77%, rgba(236, 69, 50, 1) 80%);
}
.duck-btn {
  padding: 12px;
  border-radius: 8px;
  border-color: #f0f0f0;
  border-width:0.1rem;
  border-style: solid;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  color: #f0f0f0;
  transition: transform 0.2s;
  background: #D65231;
}
.bing-btn {
  padding: 12px;
  border-radius: 8px;
  border-width:0.1rem;
  border-style: solid;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  color: #f0f0f0;
  transition: transform 0.2s;
  background: #089ED5;
}
.yt-btn {
  padding: 12px;
  border-radius: 8px;
  border-width:0.1rem;
  border-style: solid;
  border-color: #f0f0f0;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  color: #f0f0f0;
  transition: transform 0.2s;
  background: #C52126;
}


.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.link-btn {
  align-items: center;
  background-clip: padding-box;
  background-color: #2e2e2e6e;
  border: 1px solid transparent;
  border-radius: .25rem;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 3px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  margin: 0;
  min-height: 3rem;
  padding: calc(.875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  text-decoration: none;
  transition: all 250ms;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: baseline;
  width: auto;
}
.link-btn:hover,
.link-btn:focus {
  background-color: #2e2e2eaf;
  box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}
.link-btn:hover {
  transform: translateY(-1px);
}

.footer {
  position: relative;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  backdrop-filter: blur(3px);
}

/* Modal Content/Box */
.modal-content {
  background-color: #0000009e;
  margin: 5% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #6e6e6e;
  border-radius: 1rem;
  width: 80%; /* Could be more or less, depending on screen size */
}

/* The Close Button */
.close {
  color: #d6d6d6;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: rgb(255, 255, 255);
  text-decoration: none;
  cursor: pointer;
}

.bg-controls {
            padding: 15px;
            border-radius: 5px;
            max-width: 500px;
            margin: 0 auto;
        }
        button, input {
            margin: 5px 0;
            padding: 8px;
        }
        .preset-btns {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin: 10px 0;
        }
        .preset-btn {
            width: 60px;
            height: 60px;
            border: 2px solid #ddd;
            cursor: pointer;
            background-size: cover;
        }
        .preset-btn:hover {
            border-color: #999;
        }