/* VEO Clone Light Theme */
:root {
  --bg-color: #f6f6f8;
  --header-bg: #ffffff;
  --text-primary: #121212;
  --text-secondary: #888888;
  --card-bg: #ffffff;
  --card-radius: 14px;
  --transition: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -1px;
}

.search-form {
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input {
  background: #f1f1f4;
  border: 1px solid transparent;
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 16px;
  width: 100%;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.03);
}

.search-input::placeholder {
  color: #999;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-top: 8px;
  overflow: hidden;
  z-index: 200;
  border: 1px solid rgba(0,0,0,0.05);
}
.search-dropdown a {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0,0,0,0.03);
  transition: var(--transition);
  gap: 12px;
}
.search-dropdown a:last-child {
  border-bottom: none;
}
.search-dropdown a:hover {
  background: #f9f9f9;
}
.search-dropdown img {
  width: 32px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #e6e6e6;
  flex-shrink: 0;
}
.sd-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.sd-title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-year {
  font-size: 12px;
  color: var(--text-secondary);
}

.filter-btn {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
}

.filter-btn:hover {
  background: #f9f9f9;
}

/* Main Container & Grid */
.container {
  padding: 32px;
  max-width: 1600px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 20px;
}

/* Movie Card */
.card {
  transition: var(--transition);
  background: var(--card-bg);
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
  overflow: hidden; /* Important so poster respects rounded corners */
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.card-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.poster-wrapper {
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 140%; /* slightly taller than 2:3 to match screenshot */
  position: relative;
  background: #e9e9e9;
}

.poster-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 60px;
  margin-bottom: 40px;
}

.pagination a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 28px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  border-radius: 20px;
  transition: var(--transition);
}

.pagination a:hover {
  background: #f0f0f4;
}

/* Responsive */
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .site-header { padding: 12px 20px; gap: 16px; }
}

/* Fullstory / Movie Page additions */
.movie-page {
  padding-top: 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.movie-top {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}
.movie-poster-wrap {
  flex: 0 0 320px;
}
.movie-poster {
  width: 100%;
  border-radius: var(--card-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: block;
}
.movie-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.movie-info h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.5px;
}
.movie-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}
.movie-meta .type {
  background: rgba(0,0,0,0.05);
  padding: 4px 12px;
  border-radius: 6px;
  text-transform: uppercase;
}
.movie-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 10px;
}
.movie-tags {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tag-group {
  font-size: 15px;
  color: #333;
}
.tag-group strong {
  color: var(--text-primary);
  margin-right: 8px;
}
.movie-player {
  margin-top: 40px;
}
.movie-player h3 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 700;
}
.movie-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  border-radius: var(--card-radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  background: #000;
}

@media (max-width: 900px) {
  .movie-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .movie-poster-wrap {
    flex: 0 0 280px;
  }
  .movie-info h1 {
    font-size: 32px;
  }
  .movie-meta {
    justify-content: center;
  }
}
