/* ---------------------------------------------------------
   Base layout
--------------------------------------------------------- */
body {
  font-family: Arial, sans-serif;
  margin: 40px;
  background-color: #fafafa;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h2 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
}

/* ---------------------------------------------------------
   Search bar
--------------------------------------------------------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  margin-bottom: 25px;
}

.search-bar input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fdfdfd;
}

.search-bar button {
  padding: 10px 18px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  background-color: #e0e0e0;
  color: #111;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-bar button:hover {
  background-color: #d0d0d0;
}

/* ---------------------------------------------------------
   Result list (YouTube version)
--------------------------------------------------------- */
.result-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease;
  width: 100%;
  max-width: 720px;
  margin: 10px auto;
}

.result-item:hover {
  background-color: #f5f5f5;
}

.result-item img {
  width: 64px;
  height: 64px;
  margin-right: 14px;
  border-radius: 4px;
  object-fit: cover;
}

.result-item .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #111;
}

.result-item p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #666;
}

/* ---------------------------------------------------------
   Suggestions dropdown (optional)
--------------------------------------------------------- */
.suggestions {
  max-width: 600px;
  margin: 0 auto;
  background: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #333;
  color: #ddd;
}

.suggestion-item:hover {
  background: #2a2a2a;
}

/* ---------------------------------------------------------
   Mobile adjustments
--------------------------------------------------------- */
@media (max-width: 480px) {
  body {
    margin: 20px;
  }

  .search-bar {
    flex-direction: row;
    gap: 8px;
  }

  .search-bar input[type="text"] {
    font-size: 15px;
  }

  .search-bar button {
    font-size: 15px;
    padding: 10px 14px;
  }

  .result-item {
    padding: 8px 10px;
  }

  .result-item img {
    width: 48px;
    height: 48px;
    margin-right: 10px;
  }

  .result-item h3 {
    font-size: 14px;
  }

  .result-item p {
    font-size: 12px;
  }
}
