/* ==========================
   Root Colors & Variables
========================== */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-card: #3a3a3a;
    --accent: #c4ff00;
    --text-light: #fff;
    --text-muted: #b3b3b3;
  }
  
  /* ==========================
     Global Styles
  ========================== */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-light);
    line-height: 1.5;
  }
  a {
    text-decoration: none;
    color: inherit;
  }
  button {
    font-family: inherit;
  }
  img {
    max-width: 100%;
    display: block;
  }
  
  /* ==========================
     Header / Navigation
  ========================== */
  .main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .logo {
    font-size: 22px;
    font-weight: bold;
    color: var(--accent);
  }
  .logo span {
    color: var(--text-light);
  }
  .nav-links a {
    color: var(--text-light);
    margin: 0 10px;
    transition: color 0.2s;
  }
  .nav-links a:hover,
  .nav-links a.active {
    color: var(--accent);
  }
  .search-login {
    display: flex;
    align-items: center;
  }
  .search-login input {
    padding: 6px;
    border: none;
    border-radius: 4px;
    outline: none;
    background: var(--bg-card);
    color: var(--text-light);
  }
  .search-login button {
    margin-left: 6px;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-card);
    color: var(--accent);
  }
  .search-login button:hover {
    background: var(--accent);
    color: #000;
  }
  .login-btn {
    background: var(--accent) !important;
    color: #000 !important;
    font-weight: bold;
  }
  .hamburger {
    display: none;
    background: none;
    font-size: 22px;
    border: none;
    color: var(--accent);
  }
  
  /* ==========================
     Landing Section
  ========================== */
  .landing {
    text-align: center;
    padding: 60px 20px;
  }
  .landing-logo {
    width: 120px;
    margin: 0 auto 20px;
  }
  .landing h1 {
    font-size: 32px;
    margin-bottom: 20px;
  }
  .landing-search {
    display: flex;
    justify-content: center;
    margin: 20px 0;
  }
  .landing-search input {
    padding: 10px;
    width: 60%;
    max-width: 400px;
    border: none;
    border-radius: 8px 0 0 8px;
    outline: none;
  }
  .landing-search .btn-accent {
    border-radius: 0 8px 8px 0;
  }
  .btn-accent {
    background: var(--accent);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .btn-accent:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--accent);
  }
  .view-full {
    margin-top: 15px;
  }
  
  /* ==========================
     About Section
  ========================== */
  .about {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
  }
  .about h2 {
    color: var(--accent);
    margin: 20px 0 10px;
  }
  .about p {
    color: var(--text-muted);
  }
  
  /* ==========================
     Movies Page
  ========================== */
  .movies-page {
    padding: 20px;
  }
  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 20px;
  }
  .page-header h2 {
    color: var(--accent);
  }
  .filter-btn {
    background: var(--bg-card);
    color: var(--text-light);
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
  }
  .filter-btn:hover {
    background: var(--accent);
    color: #000;
  }
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .movie-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
  }
  .movie-card:hover {
    transform: scale(1.05);
  }
  .movie-card .poster {
    position: relative;
  }
  .movie-card img {
    width: 100%;
    display: block;
  }
  .movie-card .badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: #000;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
  }
  .movie-card h3 {
    font-size: 14px;
    margin: 8px;
    color: var(--text-light);
  }
  .movie-card p {
    font-size: 12px;
    margin: 0 8px 10px;
    color: var(--text-muted);
  }

  /* Movie runtime badge on poster */
.movie-card .duration {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.65);
    color: var(--accent);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
  }
  
  /* Meta row below title (year • duration • type) */
  .movie-card .meta {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 0 8px 10px;
  }
  
  /* small fallback when runtime not available */
  .movie-card .duration.na,
  .movie-card .meta .duration-text.na {
    color: var(--text-muted);
    font-weight: 400;
  }
  
  
  /* ==========================
     Pagination
  ========================== */
  /* .pagination {
    text-align: center;
    margin: 20px 0;
  }
  .pagination button {
    background: var(--bg-secondary);
    border: none;
    color: var(--text-light);
    margin: 0 4px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
  }
  .pagination button.active {
    background: var(--accent);
    color: #000;
    font-weight: bold;
  }
  .pagination button:hover {
    background: var(--accent);
    color: #000;
  }
 */





  /* Pagination Container */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
  }
  
  .pagination button {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
  }
  
  .pagination button:hover {
    background: #c4ff00;
    color: #000;
  }
  
  .pagination button.active {
    background: #c4ff00;
    color: #000;
    font-weight: bold;
  }
  
  .pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  
  /* ==========================
     Footer
  ========================== */
  .main-footer {
    background: var(--bg-secondary);
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
  }
  .footer-links {
    margin-bottom: 12px;
  }
  .footer-links a {
    margin: 0 10px;
    color: var(--text-light);
    transition: color 0.2s;
  }
  .footer-links a:hover {
    color: var(--accent);
  }
  
  /* ==========================
     Responsive
  ========================== */
  @media (max-width: 768px) {
    .nav-links {
      display: none;
      flex-direction: column;
      background: var(--bg-secondary);
      position: absolute;
      top: 60px;
      right: 0;
      width: 200px;
      padding: 20px;
    }
    .nav-links.active {
      display: flex;
    }
    .hamburger {
      display: block;
    }
    .landing-search input {
      width: 100%;
    }
  }
  


  /* ----------------------------
  Responsive Media Queries
  Add this block to the end of css/style.css
-----------------------------*/

/* Small adjustments for medium-large screens (<=1200px) */
@media (max-width: 1200px) {
  .landing { padding: 48px 20px; }
  .landing-logo { width: 110px; }
  .landing h1 { font-size: 28px; }
  .landing-search input { width: 70%; max-width: 380px; }
}

/* Tablets / small laptops */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .movie-card h3 { font-size: 13px; }
  .movie-card .meta { font-size: 11.5px; }
  .landing-logo { width: 100px; }
}

/* Mobile landscape & larger phones / tablets portrait */
@media (max-width: 768px) {

  /* Header */
  .main-header { padding: 10px 14px; align-items: center; }
  .nav-links { display: none; }               /* hidden by default on mobile */
  .nav-links.active { display: flex; }        /* toggled by JS */
  .hamburger { display: block; }              /* show burger on mobile */

  /* Move search into compact layout */
  /* .search-login { display: none; }  */           /* hide the full search in header */
  /* Make landing stack and compress */
  .landing { padding: 36px 16px; }
  .landing-logo { width: 92px; margin-bottom: 12px; }
  .landing h1 { font-size: 22px; margin-bottom: 12px; }

  /* Make search stacked and full-width */
  .landing-search { flex-direction: column; gap: 10px; align-items: center; }
  .landing-search input {
    width: 92%;
    max-width: 420px;
    border-radius: 8px;
    padding: 10px;
  }
  .landing-search .btn-accent {
    width: 92%;
    max-width: 200px;
    padding: 10px;
    border-radius: 8px;
  }
  .view-full { margin-top: 12px; }

  /* Grid */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Movie card - slightly smaller text */
  .movie-card h3 { font-size: 13px; }
  .movie-card .meta { font-size: 11px; gap: 6px; }

  /* Poster badges safe spacing */
  .movie-card .poster .badge,
  .movie-card .poster .duration { top: 6px; right: 6px; left: auto; bottom: auto; font-size: 11px; padding: 3px 6px; }

  /* Footer layout - 2 columns */
  .footer-top { padding: 28px 16px; grid-template-columns: 1fr 1fr; gap: 18px; }
  .footer-description .desc { font-size: 13px; }
  .footer-bottom { padding: 12px 16px; font-size: 12px; }
  
}

/* Small phones */
@media (max-width: 480px) {
  /* Header */
  .main-header { padding: 10px 12px; }
  .logo { font-size: 20px; }

  /* Landing */
  .landing { padding: 28px 12px; }
  .landing-logo { width: 80px; }
  .landing h1 { font-size: 20px; }

  /* landing search full-width and button stacked */
  .landing-search { gap: 8px; }
  .landing-search input { width: 94%; padding: 10px; }
  .landing-search .btn-accent { width: 94%; max-width: none; }

  /* Grid -> single column */
  .grid { grid-template-columns: 1fr; gap: 12px; }

  /* Card text scaling */
  .movie-card h3 { font-size: 14px; }
  .movie-card .meta { font-size: 12px; }

  /* Footer stacks vertically */
  .footer-top { grid-template-columns: 1fr; text-align: center; }
  .footer-cta .telegram-btn { width: 100%; max-width: none; display: inline-block; }

  /* Make hamburger target easier to tap */
  .hamburger { font-size: 22px; padding: 6px; }
}

/* Large screens: give landing a wider max width */
@media (min-width: 1400px) {
  .landing { padding: 80px 20px; }
  .landing h1 { font-size: 40px; }
  .grid { gap: 20px; }
  .movie-card { transition: transform 0.18s ease; }
}

/* Accessibility improvements: larger hit targets on touch */
@media (pointer: coarse) {
  .hamburger, .btn-accent, .telegram-btn, .search-login button {
    padding: 10px 12px;
  }
}


/* ==========================
   Responsive Fixes
========================== */

/* Large screens (desktops) */
@media (min-width: 1200px) {
  .landing h1 {
    font-size: 42px;
  }
  .about {
    max-width: 1000px;
  }
}

/* Tablets */
@media (max-width: 991px) {
  .landing h1 {
    font-size: 28px;
  }
  .landing-search input {
    max-width: 300px;
  }
  .about {
    padding: 30px 15px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* Phones */
@media (max-width: 600px) {
  .main-header {
    flex-wrap: wrap;
    padding: 10px;
  }
  .logo {
    font-size: 18px;
  }
  .search-login {
    width: 100%;
    margin-top: 10px;
  }
  .search-login input {
    flex: 1;
  }
  .landing {
    padding: 40px 15px;
  }
  .landing h1 {
    font-size: 22px;
  }
  .landing-search {
    flex-direction: column;
    gap: 10px;
  }
  .landing-search input,
  .landing-search .btn-accent,
  .view-full {
    width: 100%;
  }
  .about h2 {
    font-size: 18px;
  }
  .about p {
    font-size: 14px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .movie-card h3 {
    font-size: 12px;
  }
}

/* Extra small phones */
@media (max-width: 400px) {
  .landing h1 {
    font-size: 18px;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .movie-card h3 {
    font-size: 11px;
  }
  .movie-card p,
  .movie-card .meta {
    font-size: 11px;
  }
}















/* Ensure searchbar is always visible */
header .searchbar {
  display: block !important; /* override any hidden state */
  flex: 1;
  max-width: 300px;
}

@media (max-width: 768px) {

}
