/* Root variables */
:root {
  --font-family-inter: 'Inter', sans-serif;
  --text-black: #101010;
  --sidebar-width: 220px;
  --suggested-width: 420px;
  --main-bg: #fff;
  --accent-bg: #f5f5f5;
}

.text-black {
  color: var(--text-black);
}

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-family-inter);
  background: var(--main-bg);
  color: var(--text-black);
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid #fff;
}

.topbar .logo {
  height: 25px;
  margin-left: -50px; /* Move logo further right */
}

.topbar .search {
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
  display: flex;
}

.topbar .search input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 20px 0 0 20px;
  outline: none;
}

.topbar .search button {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 20px 20px 0;
  background: #eee;
  cursor: pointer;
}

.topbar .actions {
  display: flex;
  gap: 40px; /* Increased gap between notification and profile */
  align-items: center;
  margin-right: 60px;
}

.topbar .actions img[alt="Profile"] {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar .actions button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.mic-btn {
  background: none;
  border: none;
  margin-left: 12px;
  margin-right: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.page-content {
  display: flex;
  flex-direction: row;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}

.sidebar {
  position: fixed;
  top: 56px;
  left: -220px; /* Hide by default */
  width: var(--sidebar-width);
  height: calc(100vh - 56px);
  background: var(--accent-bg);
  border-right: 1px solid #e0e0e0;
  padding: 32px 0;
  box-shadow: 2px 0 8px rgba(0,0,0,0.08);
  transition: left 0.3s cubic-bezier(.4,0,.2,1);
  z-index: 200;
}

.sidebar.sidebar-open {
  left: 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  display: flex;
  align-items: center;
  padding: 16px 32px;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar li:hover {
  background: #eaeaea;
}

.sidebar img {
  margin-right: 12px;
  height: 24px;
}

.main-content {
  flex: 1;
  padding: 40px 0 40px 10px; /* Reduce left padding even more */
  display: flex;
  flex-direction: column;
  max-width: 1100px;         /* Increase max-width for more space */
}

.video-player-section {
  margin-bottom: 32px;
}

.video-player {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 25px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.video-player-img-container {
  position: relative;
  width: 98%;
  max-width: 900px;
  height: 400px;
}

.video-player-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.2s;
}

.play-btn img {
  width: 32px;
  height: 32px;
}

.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s;
}

.arrow-btn img {
  width: 22px;
  height: 22px;
  display: block;
}

.share-btn:hover {
  background: rgba(0,0,0,0.01);
}

.prev-btn {
  left: 16px;
}

.next-btn {
  right: 16px;
 }

.video-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 4px 0 0 0;
  text-align: left;     /* Ensure left alignment */
}

.video-info {
  margin-top: 6px;      /* Reduce space above info */
  margin-bottom: 6px;   /* Reduce space below info */
  padding-left: 30px;    /* Move info slightly left */
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  position: relative;
}

.video-author {
  font-size: 0.95rem;
  font-weight: 400;
  margin-right: 10px;
  padding: 0;
}

.subscribe-btn {
  background: #101010;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-family-inter);
  margin: 0;
}

.comments-section {
  margin-top: 16px;        /* Was 32px, now reduced */
  background: #fafafa;
  border-radius: 8px;
  padding: 16px;           /* Was 24px, now reduced */
}

.comments-section h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.comment {
  background: #fff;
  border-radius: 6px;
  padding: 12px;
  color: #888;
}

.suggested-videos {
  width: var(--suggested-width);
  background: var(--accent-bg);
  border-left: 1px solid #e0e0e0;
  padding: 18px 16px;
  position: sticky;
  top: 56px;
  height: 100vh;
  overflow-y: auto;
  margin-right: 32px;
  display: flex;
  flex-direction: column;
}

.suggestion-titles {
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.suggestion-titles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.suggestion-titles li {
  font-size: 1rem;
  padding: 4px 0;
  cursor: pointer;
  transition: background 0.2s;
}

.suggestion-titles li:hover {
  background: #eaeaea;
}

.shorts-slider-container {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
}

.shorts-slider {
  display: flex;
  overflow: hidden;
  width: 260px; /* Show 3 shorts at a time, each 80px wide + margin */
  scroll-behavior: smooth;
}

.short {
  min-width: 120px;         /* Increased width */
  margin-right: 16px;       /* Increased margin for spacing */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
  flex-shrink: 0;
}

.short img {
  width: 118px;             /* Increased width */
  height: 170px;             /* Increased height */
  object-fit: cover;
  border-radius: 6px;
}

.short-title {
  font-size: 0.85rem;
  margin-top: 4px;
}

.shorts-scroll-btn {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.shorts-scroll-btn.left {
  margin-right: 4px;
}

.shorts-scroll-btn.right {
  margin-left: 4px;
}

.video-suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.video-suggestions li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.video-suggestions img {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  background: #ddd;
}

.suggested-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.suggested-author {
  font-size: 0.9rem;
  color: #666;
}

.video-actions {
  display: flex;
  gap: 16px;
  margin-left: 120px; /* Push like/dislike/share much further right */
}

.video-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: #333;
  border-radius: 4px;
  transition: background 0.2s;
}

.video-actions button:hover {
  background: #f0f0f0;
}

.video-actions button.active {
  color: #000;
  background: #eaeaea;
}

.video-actions button.active img {
  filter: brightness(0) saturate(100%);
}

.video-actions img {
  width: 20px;
  height: 20px;
}

.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: #333;
  border-radius: 4px;
  transition: background 0.2s;
}

.share-btn:hover {
  background: #f0f0f0;
}

.share-btn.active {
  color: #000;
  background: #eaeaea;
}

.share-btn img {
  width: 20px;
  height: 20px;
}

.menu-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Media Queries */
.opened-video-player-1 {
  background-color: #fff;
  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 1440px) {
  .opened-video-player-1 {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  .opened-video-player-1 {
    padding-left: 16px;
    padding-right: 16px;
  }
}