body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #202124;
  color: #e8eaed;
}

.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  justify-content: center;
  padding: 0 1rem;
  box-sizing: border-box;
}

.google-logo img {
  width: 272px;
}

.search-form {
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
}

.search-box {
  width: 100%;
  max-width: 600px;
}

.search-box input[type="text"] {
  width: 100%;
  max-width: 600px;
  height: 44px;
  padding: 0 20px;
  font-size: 18px;
  border-radius: 9999px;
  border: none;
  background: #505454;
  color: #505454;
  box-sizing: border-box;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.search-box input[type="text"]:focus {
  outline: none;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.4);
}

.buttons {
  margin-top: 20px;
  text-align: center;
}

.buttons button {
  background: #303134;
  color: #e8eaed;
  border: none;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.buttons button:hover {
  border: 1px solid #5f6368;
}

/* RESULTS PAGE */

.results .header {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 10px;
}

.logo-small img {
  height: 30px;
  flex-shrink: 0;
}

.results input[type="text"] {
  flex: 0 0 400px;     
  height: 40px;
  font-size: 16px;
  padding: 0 15px;
  border-radius: 9999px;
  border: none;
  background: #505454;  
  color: #e8eaed;       
  box-sizing: border-box;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.results input[type="text"]:focus {
  outline: none;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.4);
}

.header button {
  flex: 0 0 auto;
  height: 40px;
  font-size: 18px;
  border-radius: 9999px;
  border: none;
  background: #505454;
  color: #202124;
  cursor: pointer;
  padding: 0 16px;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.header button:hover {
  background: #f1f3f4;
}

.nav-bar {
  display: flex;
  gap: 20px;
  padding: 10px 20px;
  background: #202124;
  border-bottom: 1px solid #303134;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.nav-item {
  cursor: pointer;
  color: #e8eaed;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-item.active {
  border-bottom: 2px solid #4285f4;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.images-grid img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.image-card {
  display: flex;
  flex-direction: column;
  background: #303134;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.image-card p.caption {
  margin: 8px 10px 10px;
  font-size: 13px;
  color: #bdc1c6;
  line-height: 1.3;
}

@media (max-width: 768px) {
   .results input[type="text"] {
    flex: 1 1 auto;       
    min-width: 0;         
    max-width: calc(100% - 50px);
    color: #e8eaed;    
  }

  .search-form {
    max-width: 100%;
  }

  .results .header {
    flex-wrap: nowrap;
    padding: 10px 10px; /* slightly reduced for better fit */
  }

  .logo-small img {
    height: 24px;
  }

  .header input[type="text"] {
    font-size: 15px;
    color: #fff;
  }

  .nav-bar {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 10px 15px;
  }

  .nav-item {
    font-size: 13px;
  }

  .images-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 15px;
  }

  /* Fix results input width on mobile so button stays visible */
  .results input[type="text"] {
    max-width: calc(100vw - 60px);
    flex-grow: 1;
    min-width: 0;
    color: #202124;
  }
}

/* Smaller mobile tweaks */
@media (max-width: 480px) {
  .header input[type="text"] {
    font-size: 14px;
  }

  .nav-item {
    font-size: 12px;
  }
}

/* Typed text visible on index search input, placeholder stays dark */
.search-box input[type="text"]::placeholder {
  color: #505454;
}
.search-box input[type="text"] {
  color: #e8eaed;
}

/* Typed text visible on results search input, placeholder stays dark */
.results input[type="text"]::placeholder {
  color: #fff;
}

/* Top right buttons fixed position */
.top-right-buttons {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 12px;
  z-index: 9999;
}

.top-right-buttons button {
  background: transparent;
  border: none;
  color: #e8eaed;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.top-right-buttons button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

ana