/* --- Merged Enhanced CSS with Reimagined Styles --- */
:root {
    --primary: #e50914;
    --primary-dark: #b2070f;
    --primary-light: #ff1e2d;
    --silver: #e5e7eb;
    --dark: #0f172a;
    --dark-accent: #1e293b;
    --light: #f8fafc;
    --cyan: #22d3ee;
    --cyan-dark: #0ea5e9;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --success: #22c55e;
    --error: #ef4444;
    --info: #3b82f6;
    --warning: #f59e0b;
    --gold: #ffd700;
    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 6px 16px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 15px rgba(34, 211, 238, 0.5);
    --shadow-inset: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    --transition-fast: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

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

body {
    font-family: 'Poppins', 'Noto Sans Ethiopic', 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-accent) 100%);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

.hidden {
    display: none !important;
}

/* --- Header --- */
.header-nav-container{ display: flex;
    
    justify-content: space-between;
  
   gap: 100px;
   
    
    }

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 900;
    border-radius:0px 0px 12px 12px ;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--silver);
    text-shadow: 0 0 6px rgba(229, 231, 235, 0.3);
}

.logo::before {
    content: '🎥';
    margin-right: 8px;
    font-size: 24px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px;
    background: var(--dark-accent);
    padding: 4px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
}

.nav-item .nav-link {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    background: var(--dark-accent);
    color: var(--cyan);
    border-color: var(--cyan-dark);
    box-shadow: var(--shadow-soft);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- Search --- */
.search-container {
    display: flex;
    align-items: center;
    background: var(--dark-accent);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.search-container:hover {
    border-color: var(--cyan-dark);
}

#search-input {
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--light);
    font-size: 14px;
    width: 200px;
    transition: var(--transition-fast);
}

#search-input::placeholder {
    color: var(--gray);
}

#search-input:focus {
    outline: none;
    
}

#search-button {
    padding: 12px;
    background: var(--dark-accent);
    color: var(--cyan);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

#search-button:hover {
    background: var(--cyan-dark);
    color: var(--light);
}

/* --- Auth & Profile --- */
.auth-btn {
    padding: 5px 10px;
    background: var(--dark-accent);
    color: var(--cyan);
    border: 1px solid var(--cyan-dark);
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.auth-btn:hover {
    background: var(--cyan-dark);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.user-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--dark-accent);
    color: var(--cyan);
    border: 1px solid var(--cyan-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.user-avatar:hover {
    background: var(--cyan-dark);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* --- Controls --- */
.controls-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 20px 0;
}

.filter-area {
    position: relative;
}

.filter-toggle-btn {
    padding: 12px 16px;
    background: var(--dark-accent);
    color: var(--cyan);
    border: 1px solid var(--cyan-dark);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.filter-toggle-btn:hover {
    background: var(--cyan-dark);
    color: var(--light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    padding: 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--glass-border);
    z-index: 1000;
    min-width: 240px;
    display: none;
    flex-direction: column;
    gap: 12px;
}

.filter-menu.active {
    display: flex;
    animation: filterSlideIn 0.3s ease;
}

@keyframes filterSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-dropdown {
    width: 100%;
    padding: 12px;
    background: var(--dark-accent);
    border: 1px solid var(--glass-border);
    color: var(--light);
    border-radius: var(--border-radius);
    font-size: 13px;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" stroke="%23e5e7eb" stroke-width="2"><path d="M2 4l4 4 4-4"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
}

/* --- Movie Cards --- */
.movie-rows-container {gap: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(213px, 1fr));
    
}

.movie-card {
    height: 320px;width:  213px;
    background: var(--dark-accent);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    transition: var(--transition-fast);
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--cyan-dark);
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-fast);
}

.movie-card:hover .movie-poster {
    transform: scale(1.03);
}

.movie-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    transition: var(--transition-fast);
    z-index: 5;
}

.movie-card:hover .movie-info {
    opacity: 1;
}

.movie-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--light);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    font-size: 12px;
    color: var(--gray-light);
    text-align: center;overflow-wrap: break-word;
    margin-bottom: 12px;
}

.card-button {
    width: 80%;
    padding: 12px;
    background: var(--dark-accent);
    color: var(--cyan);
    border: 1px solid var(--cyan-dark);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    z-index: 20;
    position: relative;
    margin-bottom: 8px;
}

.card-button:hover {
    background: var(--cyan-dark);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.card-button.primary {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: var(--light);
    border: none;
}

.card-button.secondary {
    background: var(--dark-accent);
    border: 1px solid var(--info);
    color: var(--info);
}

.card-button.disabled {
    background: var(--gray);
    border-color: var(--gray);
    color: var(--gray-light);
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- Profile Popup --- */
.profile-popup {
    position: fixed;
    top: 80px;
    right: 16px;
    width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--glass-border);
    z-index: 1001;
    display: none;
    pointer-events: none;
    transition: var(--transition-fast);
}

.profile-popup.active {
    display: block;
    pointer-events: auto;
    animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-content {
    padding: 24px;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}

.popup-user-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--light);
}

.popup-avatar {
    width: 48px;
    height: 48px;
    background: var(--dark-accent);
    color: var(--cyan);
    border: 1px solid var(--cyan-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.user-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--dark-accent);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    border: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.stat-label {
    font-size: 12px;
    color: var(--gray-light);
    font-weight: 500;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--light);
}

#user-sub-end {
    font-size: 12px;
    color: var(--gray-light);
    display: block;
    text-align: right;
}

.download-history {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.download-history h4 {
    font-size: 14px;
    color: var(--gray-light);
    margin-bottom: 8px;
    font-weight: 500;
}

#download-history-list {
    max-height: 150px;
    overflow-y: auto;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: var(--dark);
    border-radius: var(--border-radius);
}

.popup-footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.popup-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    border: 1px solid transparent;
}

.popup-btn.primary {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: var(--light);
}

.popup-btn.secondary {
    background: var(--dark-accent);
    color: var(--info);
    border-color: var(--info);
}

.popup-btn.danger {
    background: var(--dark-accent);
    color: var(--error);
    border-color: var(--error);
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* --- Modals --- */
.auth-modal, .subscribe-modal-overlay, .download-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1200;
    pointer-events: none;
}

.auth-modal.active, .subscribe-modal-overlay.active, .download-modal.active {
    display: flex;
    pointer-events: auto;
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.auth-content, .subscribe-modal, .download-content {
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--glass-border);
    position: relative;
}

.close-auth, .close-subscribe-modal, .close-download-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 20px;
    color: var(--gray-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-auth:hover, .close-subscribe-modal:hover, .close-download-modal:hover {
    color: var(--cyan);
    transform: scale(1.2);
}

.auth-content h2, .subscribe-modal h2, .download-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--silver);
    text-align: center;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label, .subscribe-modal label {
    font-size: 14px;
    color: var(--gray-light);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.form-group input, .subscribe-modal input, .subscribe-modal select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--glass-border);
    background: var(--dark-accent);
    color: var(--light);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition-fast);
}

.form-group input::placeholder, .subscribe-modal input::placeholder {
    color: var(--gray);
}

.form-group input:focus, .subscribe-modal input:focus, .subscribe-modal select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
}

.auth-button {
    width: 100%;
    padding: 12px;
    background: var(--dark-accent);
    color: var(--cyan);
    border: 1px solid var(--cyan-dark);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-button:hover {
    background: var(--cyan-dark);
    color: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.auth-button:disabled {
    background: var(--gray);
    border-color: var(--gray);
    color: var(--gray-light);
    cursor: not-allowed;
    opacity: 0.7;
}

#package-cost-info {
    text-align: center;
    margin: 12px 0;
    font-size: 14px;
    color: var(--gray-light);
    font-weight: 500;
}

/* --- Tab System --- */
.tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--dark-accent);
    padding: 4px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
}

.tab-buttons button {
    flex: 1;
    padding: 12px;
    background: transparent;
    color: var(--gray-light);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.tab-buttons button.active {
    background: var(--dark-accent);
    color: var(--cyan);
    border-color: var(--cyan-dark);
    box-shadow: var(--shadow-soft);
}
.episode-head{
    font-size: 18px;
}
/* --- Spinner --- */
/* .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--light);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.spinner.hidden {
    display: none;
} */

.btn-text.hidden {
    display: none;
}

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

/* --- Toast --- */
#toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 12px 24px;
    background: var(--glass-bg);
    color: var(--light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    animation: toastSlideIn 0.4s ease;
}

.toast.success { background: var(--success); border-color: transparent; }
.toast.error { background: var(--error); border-color: transparent; }
.toast.info { background: var(--info); border-color: transparent; }

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Status Messages --- */
.initial-message, .no-results {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--gray-light);
    font-size: 18px;
    text-align: center;
    padding: 80px 0;
}

/* Checkbox container - always on top
.select-checkbox {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 999; 
  display: flex;
  align-items: center;
  cursor: pointer;
}


.select-checkbox input {
  opacity: 0;
  width: 0;
  height: 0;
}


.checkmark {
  width: 20px;
  height: 20px;
  background-color: rgba(0,0,0,0.3);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
}


.select-checkbox input:checked + .checkmark {
  background-color:var(--cyan-dark);
}

.select-checkbox input:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}


.select-checkbox:hover .checkmark {
  opacity: 1;
  transform: scale(1.1);
}

#download-float-btn {
  position: fixed;
  bottom: 50px;
  right: 20px;
  z-index: 10000;
  background: #142d54;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

#download-float-btn:hover {
  background: #19396d;
  transform: scale(1.05);
}

#download-count {
  background: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  padding: 4px 8px;
  min-width: 20px;
  text-align: center;
  line-height: 1;
} */

.skeleton-card .skeleton-poster,
.skeleton-card .skeleton-title,
.skeleton-card .skeleton-meta,
.skeleton-card .skeleton-button {
  border-radius: 6px;
  
  position: relative;
  background: #242f3f;
  background-size: 200% 100%;
  background: linear-gradient(
    90deg,
    #26303e 25%,
    #1b2533 50%,
    #242f3f 75%
  );
  background-size: 200% 100%;
  animation: shimmermove 2s linear infinite; 
}

.skeleton-info {
    
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
   background: linear-gradient(
    90deg,
    #26303e 25%,
    #1b2533 50%,
    #242f3f 75%
  );
    opacity: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    transition: var(--transition-fast);background-size: 200% 100%;
  animation: shimmermove 2.3s linear infinite;
  overflow: hidden;
    z-index: 5;
}
/* Poster shape */
.skeleton-poster {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Title placeholder */
.skeleton-title {
  width: 80%;
  height: 18px;
  margin: 10px 0 6px;
}

/* Meta placeholder */
.skeleton-meta {
  width: 60%;
  height: 14px;
  margin-bottom: 10px;
}

/* Button placeholder */
.skeleton-button {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}

/* Shimmer effect */
.skeleton-card { 
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    transition: var(--transition-fast);
    border: 1px solid var(--glass-border);
     width: 213px;
    height: 320px;
   background: linear-gradient(90deg, rgba(26, 27, 68, 0.612) 75%, #3235479c 50%, #171b319c 25%);
  background-size: 200% 100%;
  animation: shimmermove 1.5s infinite;
}

@keyframes shimmermove {
 0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.initial-message i, .no-results i {
    font-size: 48px;
    color: var(--cyan);
    animation: iconPulse 2s ease-in-out infinite alternate;
}

@keyframes iconPulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* --- Download Modal Specific --- */
.download-info {
    margin-bottom: 16px;
    text-align: center;
}

.download-info p {
    font-size: 14px;
    color: var(--gray-light);
    margin-bottom: 8px;
}

.download-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: var(--light);
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-button:hover {
    background: linear-gradient(135deg, var(--cyan-dark), var(--cyan));
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.download-button:disabled {
    background: var(--gray);
    color: var(--gray-light);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .header {
        flex-direction: flex;
        align-items:start;
        gap: 12px;
    }
    .header-nav-container{display: flex;gap: 50px; align-items: stretch;}
    .header-right {
        width: 100%;
        justify-content: end;
    }
   
    #search-input {
        width: 150px;
    }
.log{font-size: 22px;}
   
     .nav-item .nav-link{font-size: 10px;padding: 8px;}
     #search-button,#search-input{font-size: 12px;padding: 8px;}

      .movie-rows-container {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    }
   .skeleton-card, .movie-card{height: 233px;width:  155px;}

   .movie-title {
    font-size: 12px;
    
}
}

@media (max-width: 768px) {
    .nav-list {
        display: flex;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        width: 100%;
    }
    .header-nav-container{ display: flex;
   align-items: stretch;
    }
    
.episode-head{
    font-size: 15px;
}
    .header {
        padding: 12px 16px;flex-direction: column;
    }
    .log{font-size: 22px;}
    .nav-item .nav-link{font-size: 10px;padding: 8px;}
    .movie-rows-container {
        grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    }
   .skeleton-card, .movie-card{height: 203px;width:  135px;}

   .movie-title {
    font-size: 12px;
    
}

#search-button,#search-input{font-size: 12px;padding: 8;}
.movie-meta {
    font-size: 8px;
    
}

.card-button {
    width: 80%;
    padding: 8px;   
    font-size: 8px;
    font-weight: 600;
    
   
}

    .movie-poster {
        height: 100%;
    }
    
    .filter-menu {
        right: 0;
        left: 0;  
    }

    .filter-toggle-btn {
    padding: 10px 14px;
    font-size: 10px;
}


.filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -80px;
    padding: 10px;
    z-index: 1000;
    min-width: 150px;width: 150px;
    
}


@keyframes filterSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-dropdown {
    width: 100%;
    padding: 12px;
    background: var(--dark-accent);
    border: 1px solid var(--glass-border);
    color: var(--light);
    border-radius: var(--border-radius);
    font-size: 10px;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" stroke="%23e5e7eb" stroke-width="2"><path d="M2 4l4 4 4-4"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
}










    .profile-popup {
        right: 8px;
        left: 8px;
        width: auto;
    }
}

@media (max-width: 480px) {
    
    
    #search-input {
        width: 100%;
    }
    
.episode-head{
    font-size: 12px;padding:8px;
}
        .header-nav-container{display: flex;gap: 30px; justify-items: space-between;}
        .header-right {
            width: 100%;
            justify-content: end;
        }
   
    #search-input {
        width: 100px;
    }
.log{font-size: 20px;}
   
     .nav-item .nav-link{font-size: 10px;padding: 8px;}
     #search-button,#search-input{font-size: 12px;padding: 8px;}
     
     
     .skeleton-card, .movie-card{height: 165px;width:  110px;}

   .movie-title {
    font-size: 12px;
    
}


.movie-rows-container {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .movie-poster {
        height: 100%;
    }
    
    .auth-content, .subscribe-modal, .download-content {
        margin: 16px;
        max-width: none;
    }
}


@media (max-width: 380px) {
    
    .header{justify-content: center;align-items: center;}
        .header-nav-container{display: block;gap: 300px;align-items: center;}
    .log{font-size: 20px;text-align: center;}
       
         .nav-item .nav-link{font-size: 8px;padding: 8px;}
         #search-button,#search-input{font-size: 10px;padding: 8px;}
    
         
       .skeleton-card, .movie-card{height: 135px;width:  85px;}
    
       
    
    
        .movie-rows-container {
            grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
            gap: 6px;
        }
        
        .movie-poster {
            height: 100%;
        }
    
    }
