/* Base Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #0f0f0f;
  color: #eee;
}

/* Header */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1c1c1c;
  padding: 1rem 2rem;
  flex-wrap: wrap;
}
.logo a {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ef4444;
  text-decoration: none;
}

/* Search */
.search-bar {
  flex: 1;
  max-width: 500px;
  display: flex;
  margin: 0 1rem;
}
.search-bar input {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: 4px 0 0 4px;
  border: 1px solid #ccc;
}
.search-bar button {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* User actions */
.user-actions {
  display: flex;
  gap: 0.5rem;
}
.user-actions button {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Layout */
.main-content {
  flex: 1;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Sidebars */
.sidebar {
  padding: 1rem;
  border-radius: 10px;
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.sidebar ul li {
  margin-bottom: 0.75rem;
}
.sidebar a {
  color: #ccc;
  text-decoration: none;
}

/* Fix layout for index.php */
.main-layout {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin: auto;
  padding: 1rem;
}



/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}



/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  width: 100%;
}

.video-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.5rem;
  text-align: center;
}
.video-card img {
  width: 100%;
  border-radius: 8px;
}

/* duration-design */
.thumbnail-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.thumbnail-wrapper img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}



/* Carousel */
.carousel-wrapper {
  margin-top: 2rem;
  overflow-x: auto;
  background: rgba(255,255,255,0.03);
  padding: 1rem;
  border-radius: 10px;
}
.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
}
.carousel-item {
  min-width: 240px;
}
.carousel-item img {
  width: 100%;
  border-radius: 10px;
}
.carousel-caption {
  font-size: 0.9rem;
  text-align: center;
  color: #eee;
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  background-color: #1f2937;
  color: #d1d5db;
  padding: 1.5rem 2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: #9ca3af;
  text-decoration: none;
}
.footer-links a:hover {
  color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {

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

  .main-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    margin-bottom: 1rem;
  }
}

