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

:root {
  --gap: 16px;
  --radius: 14px;
  --bg: #0e0e0e;
  --card: #111;
  --text: #fff;
  --muted: #bbb;
  --border: #333;
  --hover: #444;
}

.yt-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.yt-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: #222;
  color: var(--text);
  cursor: pointer;
}

.yt-empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 0;
  position: relative;
  top: 50px;
  justify-items: center;
}

.yt-grid > * {
  min-width: 0;
}

.yt-card {
  position: relative;
  display: block;
  text-decoration: none;
  overflow: hidden;
  background: var(--card);
  width: 100%;
}

.yt-card.yt-video {
    height: 285px;
}

.yt-card.yt-short {
    border-radius: 12px;
    width: 92%;
    margin-top: 10px;
    margin-bottom: 10px;
}

.yt-video {
  grid-column: 1 / -1;
}

.yt-short {
  grid-column: auto;
}

.yt-thumb {
  width: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.yt-thumb.is-video {
  aspect-ratio: 16/9;
}

.yt-thumb.is-short {
  aspect-ratio: 9/16;
}

.yt-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.65);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 1;
}

.yt-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px 12px;
}

.yt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex: 0 0 auto;
}

.yt-texts {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.yt-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-sub {
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yt-card:focus,
.yt-card:hover {
  outline: none;
  box-shadow: 0 0 0 2px var(--hover);
}

.search-form {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background: transparent;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 15px;
  font-size: 16px;
  background: transparent;
  color: #fff;
}

.search-input::placeholder {
  color: #fff;
}

.search-button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  padding: 8px 15px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  height: 40px;
  width: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
}

.search-button i {
  font-size: 18px;
  color: #fff;
}

.bi-check {
  background-color: #00b8ff;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: white;
}