/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

/* BODY */
body {
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* when loaded */
body.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* DEFAULT (centered) */
main {
  width: 100%;
  max-width: 900px;
  margin-top: 25vh;
  transition: 0.3s ease;
}

/* AFTER SEARCH */
.mainActive {
  margin-top: 5vh;
   transition: 0.3s ease;
}

/* FLEX COLUMN */
.searchEntry,
.results,
.resultItem {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* LOGO */
.logo {
  letter-spacing: -3px;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* COLORED LETTERS */
.logo span {
  font-size: 2.2rem;
  font-weight: 700;
}

.c1 { color: #eaeaea }
.c2 { color: #ea4335 }
.c3 { color: #ea4335; margin-left: 15px}


/* SEARCH BAR */
.searchBar {
  width: 90vw;
  max-width: 700px;
  display: flex;
  align-items: center;
  background: #1e293b;
  border-radius: 50px;
  padding: 0.3rem 0.5rem 0.3rem 1rem;
  transition: 0.3s;
}

.searchBar:hover,
.searchBar:focus-within {
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* INPUT */
.searchBar input[type="text"] {
  flex-grow: 1;
  font-size: 1rem;
  border: none;
  outline: none;
  background: transparent;
  color: #e2e8f0;
  min-width: 150px;
}

/* BUTTON */
.button {
  cursor: pointer;
  border: none;
  background: #334155;
  border-radius: 50%;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.button i {
  font-size: 1rem;
  color: #e2e8f0;
}

.button:hover {
  background: #475569;
}

/* SEARCH BUTTON */
.searchButton:hover i {
  color: #22c55e;
}

/* CLEAR BUTTON */
.clear {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  border-right: 1px solid #475569;
  margin-right: 0.5rem;
}

/* RESULTS */
.results {
  margin: 0 auto;
  max-width: 600px;
  padding: 1rem;
  width: 90vw;
  max-width: 700px;
}

/* STATS */
.stats {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* RESULT ITEM */
.resultItem {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 1rem;
  background: #1e293b;
  border-radius: 12px;
  transition: 0.2s;
}

.resultItem:hover {
  background: #273449;
  transform: translateY(-2px);
}

/* TITLE */
.resultTitle {
  width: 100%;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.resultTitle a {
  color: #60a5fa;
  text-decoration: none;
}

.resultTitle a:hover {
  text-decoration: underline;
}

.resultTitle a:visited {
  color: #a78bfa;
}

/* CONTENT */
.resultContents {
  display: flex;
  width: 100%;
}

/* IMAGE */
.resultImage {
  margin-right: 0.5rem;
}

.resultImage img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

/* TEXT */
.resultText {
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.4;
  max-height: 60px;
  overflow: hidden;
}

.resultDescription {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .resultDescription {
    font-size: 1rem;
    line-height: 1.6;
  }
};

/* GOOGLE COLORS */
.blue { color: #4285f4; }
.red { color: #ea4335; }
.yellow { color: #fbbc05; }
.green { color: #34a853; }

/* EXCLAIM */
.exclaim {
  display: inline-block;
  font-size: 2.5rem;
  transform: rotate(12deg);
}

/* UTILITIES */
.offscreen {
  position: absolute;
  left: -10000px;
}

.none {
  display: none;
}

.flex {
  display: flex;
}

/* RESPONSIVE */
@media (min-width: 768px) {
  .logo {
    font-size: 3rem;
  }

  .searchBar {
    width: 70vw;
    padding: 1rem 1.5rem;
  }

  .searchBar input {
    font-size: 1.2rem;
  }

  .resultTitle {
    font-size: 1.4rem;
  }

  .resultText {
    font-size: 1rem;
  }
}
