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

body {
  font-family: "Google Sans", arial, sans-serif;
  background: #fff;
  color: #202124;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  padding-top: 25vh;
}

.brand {
  font-family: "Google Sans", "Product Sans", arial, sans-serif;
  font-size: 90px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #4285f4;
  margin-bottom: 24px;
}

.brand span:nth-child(1) { color: #4285f4; }
.brand span:nth-child(2) { color: #ea4335; }
.brand span:nth-child(3) { color: #fbbc05; }
.brand span:nth-child(4) { color: #4285f4; }
.brand span:nth-child(5) { color: #34a853; }
.brand span:nth-child(6) { color: #ea4335; }

.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 584px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: none;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

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

.search-icon {
  width: 20px;
  height: 20px;
  fill: #9aa0a6;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 6px 0;
  background: transparent;
  color: #202124;
}

.home-buttons {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn-grey {
  background-color: #f8f9fa;
  border: 1px solid #f8f9fa;
  border-radius: 4px;
  color: #3c4043;
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
}

.btn-grey:hover {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  border: 1px solid #dadce0;
}

.results-page {
  flex: 1;
}

.results-header {
  display: flex;
  align-items: center;
  padding: 18px 76px 18px 24px;
  border-bottom: 1px solid #ebebeb;
  background: #fff;
}

.brand-small {
  font-size: 26px;
  font-weight: 500;
  color: #4285f4;
  text-decoration: none;
  margin-right: 36px;
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.brand-small .bs-c,
.brand-small .bs-d {
  color: #4285f4;
}

.brand-small .bs-o1 {
  color: #ea4335;
}

.brand-small .bs-o2 {
  color: #fbbc05;
}

.brand-small .bs-l {
  color: #34a853;
}

.brand-small .bs-e {
  color: #ea4335;
}

.search-form-inline {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 692px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 6px 8px 6px 16px;
  box-shadow: none;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

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

.search-icon-inline {
  width: 18px;
  height: 18px;
  fill: #9aa0a6;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input-inline {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 4px 0;
  background: transparent;
  color: #202124;
}

.search-button-inline {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button-inline svg {
  width: 24px;
  height: 24px;
  fill: #4285f4;
}

.results-main {
  max-width: 652px;
  margin: 12px 0 40px 180px;
}

.results-meta {
  color: #70757a;
  font-size: 14px;
  line-height: 43px;
  margin-bottom: 6px;
}

.results-list {
  list-style: none;
}

.result-item {
  margin-bottom: 26px;
}

.result-url {
  color: #202124;
  font-size: 14px;
  line-height: 1.3;
  padding-bottom: 3px;
}

.result-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}

.result-title a {
  color: #1a0dab;
  text-decoration: none;
}

.result-title a:hover {
  text-decoration: underline;
}

.result-title a:visited {
  color: #660099;
}

.result-snippet {
  color: #4d5156;
  font-size: 14px;
  line-height: 1.58;
}

.no-results {
  color: #4d5156;
  font-size: 16px;
}

.search-form,
.search-form-inline {
  position: relative;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(32, 33, 36, 0.15);
  list-style: none;
  z-index: 100;
  padding: 8px 0;
}

.suggestion-item {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 15px;
  color: #202124;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: #f1f3f4;
}

.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 34px 0 10px;
  padding: 8px 0;
  font-family: "Google Sans", arial, sans-serif;
}

.pg-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cword {
  display: inline-flex;
  align-items: baseline;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.cword > span,
.cword > a {
  display: inline-block;
  width: 20px;
  text-align: center;
}

.cl-c,
.cl-d {
  color: #4285f4;
}

.cl-l {
  color: #34a853;
}

.cl-e {
  color: #ea4335;
}

.cword > .cl-d { width: 22px; }
.cword > .cl-l { width: 12px; }
.cword > .cl-e { width: 20px; }

.co {
  color: #fbbc05;
  text-decoration: none;
}

.co:hover {
  text-decoration: underline;
}

.ccur {
  color: #ea4335;
}

.pg-arrow,
.pg-next,
.pg-side-spacer {
  width: 72px;
  flex: 0 0 72px;
}

.pg-arrow {
  color: #4285f4;
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  text-align: right;
  padding-right: 8px;
}

.pg-next {
  color: #4285f4;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  text-align: left;
  padding-left: 8px;
}

.pg-side-spacer {
  visibility: hidden;
}

.pg-arrow:hover,
.pg-next:hover {
  text-decoration: underline;
}

.pg-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 14px;
  line-height: 1;
}

.pgnum,
.pgnum-sp {
  display: inline-block;
  width: 20px;
  text-align: center;
}

.pg-numbers > .pgnum-sp:nth-last-child(3) { width: 22px; }
.pg-numbers > .pgnum-sp:nth-last-child(2) { width: 12px; }
.pg-numbers > .pgnum-sp:nth-last-child(1) { width: 20px; }

.pgnum-sp {
  visibility: hidden;
}

.pgnum {
  color: #1a73e8;
  text-decoration: none;
  padding: 4px 0;
}

.pgnum:hover {
  text-decoration: underline;
}

.pgnum.cur {
  color: #202124;
  font-weight: 400;
  padding: 4px 0;
}

.site-footer {
  background: #f2f2f2;
  border-top: 1px solid #e4e4e4;
  color: #70757a;
  font-size: 13px;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
}

.site-footer a {
  color: #70757a;
  text-decoration: none;
  margin-right: 22px;
}

.site-footer a:last-child {
  margin-right: 0;
}

.site-footer a:hover {
  text-decoration: underline;
}

.topbar {
  position: fixed;
  top: 18px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 300;
}

.topbar-apps {
  position: relative;
}

.apps-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #5f6368;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.apps-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}

.apps-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: 324px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(32, 33, 36, 0.18);
  padding: 14px;
  z-index: 300;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 4px;
  border-radius: 12px;
  color: #3c4043;
  text-decoration: none;
  font-size: 12px;
}

.app:hover {
  background: #f1f3f4;
}

.app-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3c4043;
}

.app-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

@media (max-width: 1019px) {
  .results-main {
    max-width: none;
    margin: 12px 24px 40px;
  }
}

@media (max-width: 600px) {
  .apps-panel {
    top: 44px;
  }
}

@media (max-width: 760px) {
  .brand {
    font-size: 56px;
  }

  .results-header {
    padding: 14px 64px 14px 16px;
    gap: 12px;
  }

  .brand-small {
    font-size: 22px;
    margin-right: 14px;
  }

  .search-form-inline {
    width: auto;
    flex: 1;
    max-width: none;
  }

  .results-main {
    margin: 12px 16px 32px;
  }

  .site-footer-inner {
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
  }

  .site-footer a {
    margin: 0 10px;
  }
}
