/* style.css - Mobile Friendly Fflix */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #141414;
  color: #ffffff;
  line-height: 1.4;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  transition: all 0.3s;
}

.header.scrolled {
  background: #141414;
}

.logo {
  font-size: 1.9rem;
  font-weight: 900;
  color: #e50914;
  letter-spacing: -2px;
  cursor: pointer;
}

.search-container {
  flex: 1;
  max-width: 320px;
  margin: 0 15px;
}

#searchInput {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0,0,0,0.8);
  border: 1px solid #444;
  border-radius: 4px;
  color: white;
  font-size: 1rem;
}

#searchInput:focus {
  border-color: #e50914;
  outline: none;
}

/* Hero */
.hero {
  height: 70vh;
  min-height: 420px;
  background: linear-gradient(rgba(20,20,20,0.6), rgba(20,20,20,0.9)),
              url('https://image.tmdb.org/t/p/original/8cdWjvZQUExUUTzyp4t6EDMUBjM.jpg') center/cover;
  display: flex;
  align-items: center;
}

.hero-content {
  margin-left: 20px;
  max-width: 90%;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.btn-primary {
  background: #e50914;
  color: white;
  border: none;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

/* Content */
.content {
  padding: 20px 15px 80px;
}

.section-title {
  font-size: 1.6rem;
  margin: 30px 0 15px 5px;
  font-weight: 600;
}

.row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0 25px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.row::-webkit-scrollbar { display: none; }

/* Cards */
.card {
  flex: 0 0 160px;           /* Smaller on mobile */
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.08);
}

.poster-container {
  height: 240px;
  background: #1f1f1f;
  overflow: hidden;
}

.poster-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  padding: 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.card h3 {
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  font-size: 1.3rem;
  color: #777;
}

/* Desktop improvements */
@media (min-width: 768px) {
  .card { flex: 0 0 220px; }
  .poster-container { height: 330px; }
  .hero-content h1 { font-size: 4rem; }
  .header { padding: 15px 50px; }
  .search-container { max-width: 420px; }
}
