/* MGP Site Styles - Mobile First */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* YouTube-inspired dark palette */
  --bg-primary: #0f0f0f;        /* main app background */
  --bg-secondary: #181818;      /* cards / header */
  --bg-tertiary: #202020;       /* nav / sections */
  --accent: #ff0033;            /* yt red accent */
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --border: rgba(255,255,255,0.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 16px;
}

/* Header */
.header {
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(16px);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  width: 95%;
  margin: 0 auto;
  gap: 1rem;
}

.logo {
  text-decoration: none;
  flex-shrink: 0;
}

.logo_image {
  width: 116px;
  height: 37px;
  background-size: 100%;
  background-repeat: no-repeat;
  background-image: url('/static/GMILF.png');
  filter: drop-shadow(0 0 12px rgba(255,0,51,0.35));
}

.search-form {
  display: flex;
  flex: 1;
  max-width: none;
  margin: 0 2rem;
}

.search-input {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255,255,255,0.05);
  background: #121212;
  color: var(--text-primary);
  border-radius: 999px 0 0 999px;
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: rgba(255,0,51,0.7);
  box-shadow: 0 0 0 2px rgba(255,0,51,0.1);
}

.search-btn {
  padding: 0.5rem;
  background: rgba(255,0,51,0.95);
  color: #fff;
  border: none;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: #ff214c;
}

.lang-selector {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  background: rgba(24,24,24,0.6);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  min-width: 80px;
}

.lang-btn:hover {
  background: rgba(255,0,51,0.12);
  color: #fff;
  border-color: rgba(255,0,51,0.55);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #181818;
  border: 1px solid rgba(255,255,255,0.02);
  border-radius: 10px;
  min-width: 150px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.35);
  z-index: 1000;
}

.lang-dropdown.show {
  display: block;
}

.lang-option {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: rgba(255,0,51,0.1);
  color: #fff;
}

/* Navigation */
.nav {
  background: #0f0f0f;
  padding: 0.5rem 1rem 0.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.nav-list {
  display: flex;
  list-style: none;
  width: 95%;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-start;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  font-weight: 500;
  font-size: 0.85rem;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  border-bottom-color: #ff0033;
}

/* Main Container */
.container {
  width: 95%;
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
  min-height: calc(100vh - 200px);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.video-card {
  background: #181818;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  border: 1px solid rgba(255,255,255,0.015);
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 30px rgba(0,0,0,0.28);
  border-color: rgba(255,0,51,0.12);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: radial-gradient(circle at top, rgba(255,0,51,0.2), #101010 65%);
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-count {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 0.25rem 0.45rem;
  border-radius: 5px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.7rem;
  z-index: 3;
  font-weight: 600;
}

.video-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 70%);
  color: white;
  padding: 2rem 0.75rem 0.5rem;
  font-size: 0.9rem;
  line-height: 1.3;
  z-index: 2;
}

.video-info {
  padding: 0.85rem 0.9rem 1rem;
}

.video-title {
  font-size: 0.95rem;
  color: #fff;
  text-decoration: none;
  display: block;
  line-height: 1.3;
}

/* Footer */
.footer {
  background: #0f0f0f;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 2rem 1rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-section h3 {
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.footer-section a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-size: 0.7rem;
}

/* Categories */
.all_categories_columns {
  line-height: 28px;
  font-size: 11px;
  -webkit-column-width: 132px;
  -moz-column-width: 132px;
  column-width: 132px;
}

.all_categories_link {
  color: #fff;
  text-decoration: none;
}

.all_categories_link:hover {
  color: #ff0033;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.45rem 0.7rem;
  background: #181818;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 999px;
  transition: all 0.2s;
  min-width: 40px;
  text-align: center;
  font-size: 0.78rem;
}

.pagination a:hover {
  background: rgba(255,0,51,0.1);
  border-color: rgba(255,0,51,0.35);
  color: #fff;
}

.pagination span.active {
  background: #ff0033;
  border-color: #ff0033;
  color: #fff;
  font-weight: 600;
}

.pagination span.disabled {
  background: rgba(255,255,255,0.01);
  color: rgba(255,255,255,0.2);
  opacity: 0.5;
  cursor: not-allowed;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.page-title {
  font-size: 1.5rem;
  color: #fff;
  margin: 1.25rem 0 1rem;
}

/* Friends Section */
.fp_footer {
  margin: 1rem 0;
}

.fp_footer a {
  margin: 0 10px;
  color: var(--text-secondary);
  text-decoration: none;
}

.fp_footer a:hover {
  color: #fff;
}

/* More Button */
.more_button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #181818;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.03);
  font-weight: 600;
  transition: background-color 0.2s;
}

.more_button:hover {
  background: rgba(255,0,51,0.12);
  color: #fff;
}

/* Subheader */
.subheader {
  font-size: 1.5rem;
  color: #fff;
  margin: 2rem 0 1rem;
}

.margin_maker {
  margin: 1rem 0;
}

.centered {
  text-align: center;
}

/* Single Video Page Layout */
.single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.video-main {
  background: #181818;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.015);
}

.video-player {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.video-title-main {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #fff;
}

.video-meta-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}

.video-description {
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag-link {
  background: rgba(255,0,51,0.06);
  color: rgba(255,255,255,0.7);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.75rem;
  border: 1px solid rgba(255,0,51,0.08);
  transition: all 0.2s;
}

.tag-link:hover {
  background: rgba(255,0,51,0.25);
  color: #fff;
  border-color: rgba(255,0,51,0.85);
}

.sidebar {
  display: none;
}

.related-section {
  margin-top: 2rem;
}

.section-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.related-item {
  display: flex;
  flex-direction: column;
  background: #181818;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
  border: 1px solid rgba(255,255,255,0.01);
}

.related-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255,0,51,0.25);
}

.related-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #101010;
  overflow: hidden;
  display: block;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration-badge {
  position: absolute;
  bottom: 0.3rem;
  right: 0.3rem;
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.7rem;
}

.related-info {
  padding: 0.75rem;
  flex: 1;
}

.related-title {
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.related-title:hover {
  color: #ff0033;
}

.related-meta {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
}

/* Sidebar */
.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-videos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-item {
  display: flex;
  gap: 0.75rem;
  background: #181818;
  border-radius: 10px;
  overflow: hidden;
  padding: 0.5rem;
  transition: background 0.2s, border 0.2s;
  border: 1px solid rgba(255,255,255,0.01);
}

.sidebar-item:hover {
  background: rgba(255,0,51,0.04);
  border-color: rgba(255,0,51,0.35);
}

.sidebar-thumb {
  position: relative;
  width: 100px;
  height: 60px;
  background: #101010;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  display: block;
}

.sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-duration {
  position: absolute;
  bottom: 0.3rem;
  right: 0.3rem;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.65rem;
}

.sidebar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-title {
  font-size: 0.8rem;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.sidebar-title:hover {
  color: #ff0033;
}

.sidebar-meta {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
}

/* Ad Spaces */
.ad-space {
  background: rgba(24,24,24,0.75);
  border: 1px dashed rgba(255,255,255,0.05);
  padding: 2rem;
  text-align: center;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
  border-radius: 10px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Breakpoints */
@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .related-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (min-width: 1024px) {
  .single-layout {
    grid-template-columns: 2fr 1fr;
  }
  
  .sidebar {
    display: block;
  }
  
  .video-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .header-content {
    gap: 2rem;
  }
  
  .nav-list {
    gap: 2rem;
  }
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

