diff --git a/index.html b/index.html index f49f75f..5b0dab4 100644 --- a/index.html +++ b/index.html @@ -422,7 +422,7 @@ transition: transform 0.2s; } - .category-item img:hover { + .category-item:hover img { transform: scale(1.05); } @@ -457,6 +457,205 @@ width: 100%; margin-bottom: 10px; } + + /* Movie details modal styles */ + .details-modal { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.8); + z-index: 1100; + display: flex; + justify-content: center; + align-items: center; + overflow-y: auto; + padding: 20px; + } + + .details-content { + background-color: white; + width: 90%; + max-width: 900px; + border-radius: 12px; + overflow: hidden; + max-height: 90vh; + display: flex; + flex-direction: column; + } + + .dark-mode .details-content { + background-color: #333; + color: white; + } + + .night-light .details-content { + background-color: #f5deb3; + color: black; + } + + .details-backdrop { + position: relative; + height: 300px; + background-size: cover; + background-position: center; + } + + .backdrop-overlay { + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 60%; + background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); + padding: 20px; + display: flex; + flex-direction: column; + justify-content: flex-end; + } + + .details-body { + padding: 20px; + overflow-y: auto; + } + + .details-close { + position: absolute; + top: 15px; + right: 15px; + width: 36px; + height: 36px; + background-color: rgba(0,0,0,0.6); + color: white; + border: none; + border-radius: 50%; + font-size: 20px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + } + + .genre-tag { + display: inline-block; + padding: 4px 10px; + margin: 0 5px 5px 0; + background-color: rgba(255,255,255,0.1); + border-radius: 20px; + font-size: 0.8rem; + } + + .dark-mode .genre-tag { + background-color: rgba(255,255,255,0.2); + } + + .night-light .genre-tag { + background-color: rgba(0,0,0,0.1); + } + + .action-buttons { + display: flex; + gap: 10px; + margin-top: 20px; + margin-bottom: 20px; + } + + .action-button { + flex: 1; + padding: 10px; + border: none; + border-radius: 5px; + font-weight: bold; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + } + + .watch-button { + background-color: #32cd32; + color: white; + } + + .trailer-button { + background-color: #ff6347; + color: white; + } + + .cast-section { + margin-top: 20px; + } + + .cast-list { + display: flex; + gap: 15px; + overflow-x: auto; + padding-bottom: 10px; + } + + .cast-item { + flex: 0 0 auto; + width: 100px; + text-align: center; + } + + .cast-image { + width: 80px; + height: 80px; + border-radius: 50%; + object-fit: cover; + margin-bottom: 8px; + } + + /* Picture-in-picture trailer styles */ + .pip-container { + position: fixed; + bottom: 20px; + right: 20px; + width: 300px; + background-color: black; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + z-index: 1200; + } + + .pip-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 12px; + background-color: rgba(0, 0, 0, 0.7); + } + + .pip-title { + color: white; + font-size: 14px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-right: 10px; + } + + .pip-close { + background: none; + border: none; + color: white; + font-size: 20px; + cursor: pointer; + padding: 0; + width: 24px; + height: 24px; + display: flex; + align-items: center; + justify-content: center; + } + + .pip-video { + width: 100%; + height: 169px; /* 16:9 aspect ratio for 300px width */ + }
@@ -672,28 +871,63 @@ const movieTile = document.createElement('div'); movieTile.className = 'movie-tile'; movieTile.innerHTML = ` - +${overview.substring(0, 100)}${overview.length > 100 ? '...' : ''}
- - -${overview.substring(0, 100)}${overview.length > 100 ? '...' : ''}
+${movie.overview}
+ + + + ${movie.credits && movie.credits.cast && movie.credits.cast.length > 0 ? ` +${movie.overview ? movie.overview.substring(0, 100) + (movie.overview.length > 100 ? '...' : '') : 'No description available.'}
- - + ${movie.vote_average ? `` : ''} +${movie.overview ? movie.overview.substring(0, 100) + (movie.overview.length > 100 ? '...' : '') : 'No description available.'}
+