/* ========================================
   ArXiv Daily Papers — Academic Style
   ======================================== */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #2d2d2d;
  --text-light: #5c5c5c;
  --border: #e0e0e0;
  --accent: #1a56db;
  --accent-hover: #1e40af;
  --card-bg: #fafafa;
  --font-serif: 'Georgia', 'Times New Roman', 'Noto Serif CJK SC', 'Source Han Serif SC', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 900px;
  --spacing: 1.5rem;
}

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Header */
.site-header {
  text-align: center;
  padding: 3rem var(--spacing) 2rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
}

.site-subtitle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Video Grid */
.video-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing);
  flex: 1;
}

/* Video Card */
.video-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.video-card:last-child {
  border-bottom: none;
}

/* Thumbnail */
.video-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.video-thumbnail:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.video-thumbnail:hover .play-overlay {
  background: rgba(0, 0, 0, 0.25);
}

.play-icon {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}

.video-thumbnail:hover .play-icon {
  transform: scale(1.1);
}

/* YouTube iframe (after click) */
.youtube-iframe {
  border-radius: 4px;
}

/* Video Info */
.video-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.video-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-light);
}

.video-date {
  font-weight: 500;
}

.video-category {
  background: #f0f4ff;
  color: var(--accent);
  padding: 0.1em 0.5em;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 500;
}

.video-lang {
  background: #f5f5f5;
  padding: 0.1em 0.5em;
  border-radius: 3px;
  font-size: 0.78rem;
}

.video-title {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.video-title a {
  color: var(--text);
}

.video-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.video-arxiv {
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.video-arxiv a {
  font-weight: 500;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem var(--spacing);
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 700px) {
  .video-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .video-thumbnail {
    max-width: 100%;
  }

  .site-title {
    font-size: 1.6rem;
  }

  html {
    font-size: 16px;
  }
}
