:root {
  --vine-green: #00bf8f;
  --bg: #f5f5f5;
  --card-bg: #fff;
  --text: #1a1a1a;
  --muted: #888;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--vine-green);
  color: #fff;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.back-link {
  color: #fff;
  opacity: 0.85;
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  opacity: 1;
  text-decoration: underline;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-info h1 {
  margin: 0 0 4px;
  font-size: 20px;
}

.profile-info p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.stats {
  display: flex;
  gap: 20px;
}

.stats div {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--muted);
}

.stats strong {
  font-size: 16px;
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 4px;
}

.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.15s ease;
}

.thumb:hover img {
  transform: scale(1.05);
}

.thumb .play-icon {
  position: absolute;
  bottom: 6px;
  left: 6px;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 4px;
}

.thumb .overlay-stats {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.thumb:hover .overlay-stats {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.hidden {
  display: none;
}

.lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 500px;
  width: 90%;
}

.lightbox-inner video {
  width: 100%;
  max-height: 70vh;
  background: #000;
  border-radius: 4px;
}

.lightbox-meta {
  color: #fff;
  width: 100%;
  padding: 12px 4px;
}

.lightbox-meta p {
  margin: 0 0 8px;
  font-size: 15px;
}

.lb-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #ccc;
}

.lb-date {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
}

.close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
}

.nav-btn {
  position: absolute;
  top: 35vh;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.nav-prev { left: -50px; }
.nav-next { right: -50px; }

@media (max-width: 600px) {
  .nav-prev { left: 4px; }
  .nav-next { right: 4px; }
  .profile { flex-direction: column; text-align: center; }
  .stats { justify-content: center; }
}
