/* ===== Global ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0f0f0f;
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

h2, h4, p {
  margin: 0;
}

/* ===== Header ===== */
header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: #181818;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo {
  font-weight: bold;
  font-size: 20px;
  color: red;
}

header input {
  flex: 1;
  padding: 8px 12px;
  background: #121212;
  border: 1px solid #333;
  border-radius: 4px;
  color: white;
}

/* ===== Video Grid ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.video-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 8px;
  overflow: hidden;
  background: #181818;
}

.video-card:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.thumbnail img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.video-card h4 {
  font-size: 16px;
  margin: 8px 12px 4px;
}

.video-card p {
  font-size: 14px;
  color: #aaa;
  margin: 0 12px 12px;
}

/* ===== Watch Page ===== */
.watch-page {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-player {
  width: 100%;
  max-width: 900px;
  margin-bottom: 20px;
}

.video-player iframe {
  width: 100%;
  height: 500px;
  border-radius: 8px;
}

#videoTitle {
  font-size: 24px;
  margin-bottom: 8px;
  text-align: center;
}

#videoChannel {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 20px;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: stretch;
  }

  header input {
    width: 100%;
    margin-top: 8px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .video-player iframe {
    height: 300px;
  }
}
