/* 
  Global Stylesheet for Viral Video Arbitrage Site
  Aesthetics: Netflix-style, Dark Theme, High Engagement
*/

:root {
  --bg-color: #141414;
  --surface-color: #1f1f1f;
  --accent-color: #E50914; /* Premium Red */
  --accent-hover: #f40612;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --border-radius: 8px;
  --transition-speed: 0.3s;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', 'Roboto', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

img, video {
  max-width: 100%;
  display: block;
}

/* Header */
.navbar {
  background-color: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.telegram-btn {
  background-color: #0088cc;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity var(--transition-speed);
}

.telegram-btn:hover {
  opacity: 0.8;
}

/* Main Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* Grid Layout */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Video Card */
.video-card {
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  overflow: hidden;
}

.thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.video-card:hover .thumbnail-wrapper img {
  transform: scale(1.05);
}

.card-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.watch-btn {
  margin-top: auto;
  background-color: var(--accent-color);
  color: white;
  text-align: center;
  padding: 10px;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color var(--transition-speed);
}

.watch-btn:hover {
  background-color: var(--accent-hover);
}

/* Ad Spaces */
.ad-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  padding: 10px;
  background-color: rgba(255,255,255,0.02);
  border-radius: var(--border-radius);
  min-height: 100px; /* Prevent cumulative layout shift */
}

.ad-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.ad-slot {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  background-color: #222; /* Placeholder */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Sticky Bottom Ad */
.sticky-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-color);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 10px 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
}

/* Video Player Page Specifics */
.player-container {
  max-width: 900px;
  margin: 0 auto 30px auto;
  background-color: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
}

.video-details {
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.video-details-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.video-details-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.video-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

.next-video-container {
  max-width: 900px;
  margin: 0 auto 40px auto;
  display: flex;
  justify-content: center;
}

.next-video-btn {
  background-color: var(--accent-color);
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform var(--transition-speed), background-color var(--transition-speed);
}

.next-video-btn:hover {
  background-color: var(--accent-hover);
  transform: scale(1.05);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px 100px 20px; /* Padding bottom accounts for sticky ad */
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 50px;
}

footer a {
  margin: 0 10px;
  transition: color var(--transition-speed);
}

footer a:hover {
  color: var(--text-primary);
}

/* Loading Spinner for Infinite Scroll */
.loader {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.1);
  border-left-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
  }
  
  .video-title {
    font-size: 0.9rem;
  }
  
  .video-details-title {
    font-size: 1.4rem;
  }
}
