@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

:root {
  --ytd-rich-grid-item-max-width: 500px;
  --ytd-rich-grid-item-min-width: 310px;
  --ytd-rich-grid-gutter-margin: 16px;
  --ytd-rich-grid-row-margin: 40px;
}

.youtube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--ytd-rich-grid-item-min-width), 1fr));
  gap: var(--ytd-rich-grid-row-margin) var(--ytd-rich-grid-gutter-margin);
  padding: 24px var(--ytd-rich-grid-gutter-margin);
  width: 100%;
}

/* Ensure items don't exceed YouTube's max width */
.youtube-grid > * {
  max-width: var(--ytd-rich-grid-item-max-width);
  margin: 0 auto;
  width: 100%;
}

.thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta-container {
  padding-right: 24px;
  position: relative;
  font-family: 'Roboto', sans-serif;
  min-width: 0;
  flex: 1;
}

.video-title {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  margin: 12px 0 4px 0;
  word-break: break-word;
}

.video-metadata {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: rgb(96, 96, 96);
  min-width: 0;
}

.channel-avatar {
  width: 36px;
  height: 36px;
  margin: 12px 12px 0 0;
  flex-shrink: 0;
}

.menu-dots {
  position: absolute;
  right: 0;
  top: 12px;
}

.time-marker {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 2px;
  line-height: 16px;
}

/* Add these new styles */
.input-section {
    background-color: #f9fafb;
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.preview-container {
    position: relative;
    max-width: 2000px;
    min-width: 800px;
    margin: 0 auto;
    resize: horizontal;
    overflow: auto;
    padding: 0 20px;
    background: white;
}

.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 100%;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    background: linear-gradient(to right, transparent, rgba(229, 231, 235, 0.2));
}

.resize-handle-line {
    width: 6px;
    height: 100%;
    background: #e5e7eb;
    border-radius: 3px;
    position: relative;
}

.resize-handle-line::before,
.resize-handle-line::after {
    content: '';
    position: absolute;
    left: -4px;
    width: 2px;
    height: 100%;
    background: #e5e7eb;
}

.resize-handle-line::before {
    left: -6px;
}

.resize-handle-line::after {
    right: -6px;
}

.resize-handle:hover {
    background: linear-gradient(to right, transparent, rgba(229, 231, 235, 0.4));
}

.resize-handle:hover .resize-handle-line,
.resize-handle:hover .resize-handle-line::before,
.resize-handle:hover .resize-handle-line::after {
    background: #d1d5db;
}

/* Update existing styles */
body {
    background-color: #f9fafb;
}

.input-area {
  margin: 24px;
}

/* Add this to ensure the main content doesn't overlap with the resize handle */
main {
    padding-right: 20px;
}

/* Add these new styles */
.youtube-layout {
    position: relative;
    max-width: 2000px;
    min-width: 800px;
    margin: 0 auto;
    background: white;
    resize: horizontal;
    overflow: auto;
}
