*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: arial, sans-serif;
  font-size: 14px;
  color: #202124;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 16px;
  height: 60px;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: #202124;
  text-decoration: none;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 4px;
  transition: background 0.15s;
}

.nav-link:hover {
  background: #f1f3f4;
  text-decoration: underline;
}

.apps-wrapper {
  position: relative;
  display: inline-block;
}

.apps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  padding: 8px;
  transition: background 0.15s;
}

.apps-btn:hover {
  background: #e8eaed;
}

.apps-icon-img {
  width: 18px;
  height: 18px;
  display: block;
}

/* ── Apps Dropdown Menu ── */
.apps-menu {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  width: 288px;
  padding: 8px;
  background: #edf0f6;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  z-index: 100;
}

.apps-menu.open {
  display: block;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #fafcff;
  padding: 8px;
  border-radius: 12px;
}

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.app-item:hover {
  background: #e8eaed;
}

.app-icon {
  width: auto;
  height: 36px;
  display: block;
}

.app-name {
  margin-top: 8px;
  font-size: 12px;
  color: #3c4043;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px 100px;
}

/* ── Logo / Image ── */
.logo-container {
  margin-bottom: 28px;
}

.logo-container a {
  display: block;
}

.logo-img {
  width: 540px;
  max-width: 90vw;
  height: auto;
  display: block;
}

/* ── Search Form ── */
.search-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 640px;
  gap: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  background: #fff;
  padding: 0 4px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.search-box:hover,
.search-box:focus-within {
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
  border-color: rgba(223, 225, 229, 0);
}

.search-box-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  padding: 8px;
  transition: background 0.15s;
}

.search-box-btn:hover {
  background: #f1f3f4;
}

.plus-icon {
  width: 20px;
  height: 20px;
  fill: #5f6368;
}

.search-divider {
  width: 1px;
  height: 24px;
  background: #dfe1e5;
  flex-shrink: 0;
  margin: 0 4px 0 2px;
}

.search-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  color: #202124;
  background: transparent;
  padding: 0 8px;
  min-width: 0;
}

.search-input::placeholder {
  color: #9aa0a6;
}

.mic-icon,
.search-icon {
  width: 20px;
  height: 20px;
  fill: #4285f4;
}

.search-icon {
  fill: #9aa0a6;
}

.mic-btn:hover .mic-icon {
  fill: #202124;
}

.search-icon-btn:hover .search-icon {
  fill: #202124;
}

/* ── Search Button ── */
.search-btn {
  height: 36px;
  padding: 0 20px;
  background: #f8f9fa;
  border: 1px solid #f8f9fa;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  color: #3c4043;
  cursor: pointer;
  font-family: arial, sans-serif;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.search-btn:hover {
  background: #f1f3f4;
  border-color: #dadce0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  color: #202124;
}

.search-btn:focus {
  outline: 1px solid #4d90fe;
}

/* ── Promo Link ── */
.promo-link-container {
  margin-top: 36px;
  text-align: center;
}

.promo-link {
  color: #1a0dab;
  font-size: 16px;
  text-decoration: none;
}

.promo-link:hover {
  text-decoration: underline;
}

.promo-link:visited {
  color: #681da8;
}

/* ── Footer ── */
.footer {
  background: #f2f2f2;
  border-top: 1px solid #e4e4e4;
  flex-shrink: 0;
}

.footer-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  padding: 12px 24px;
}

.footer-link {
  color: #70757a;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  transition: color 0.15s;
}

.footer-link:hover {
  color: #202124;
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .logo-img {
    width: 280px;
  }

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

  .search-btn {
    width: 100%;
    max-width: 200px;
  }

  .header {
    padding: 8px 8px;
  }

  .footer-inner {
    justify-content: center;
  }
}
