fannata commited on
Commit
1287df7
·
verified ·
1 Parent(s): 5f945c5

make full Clone Netflx Website With the Name ZeeFlix

Browse files

also add Theme toogle button
fully responsive streams link and add servers
add upcomping movies header animations
8f2b224acadeeebc64ef32b4c04919de
add tmdb api key for all movies poster ,art,details
make search box full responsive

Files changed (8) hide show
  1. README.md +7 -4
  2. components/hero.js +129 -0
  3. components/movie-row.js +114 -0
  4. components/navbar.js +113 -0
  5. components/theme-toggle.js +79 -0
  6. index.html +107 -19
  7. script.js +79 -0
  8. style.css +127 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Zeeflix
3
- emoji: 🏆
4
- colorFrom: indigo
5
  colorTo: purple
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: ZeeFlix 🎬🍿
3
+ colorFrom: yellow
 
4
  colorTo: purple
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/hero.js ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class HeroSection extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .hero {
7
+ height: 80vh;
8
+ background-size: cover;
9
+ background-position: center;
10
+ display: flex;
11
+ flex-direction: column;
12
+ justify-content: center;
13
+ padding: 0 4%;
14
+ position: relative;
15
+ color: white;
16
+ }
17
+ .hero::before {
18
+ content: '';
19
+ position: absolute;
20
+ top: 0;
21
+ left: 0;
22
+ right: 0;
23
+ bottom: 0;
24
+ background: linear-gradient(to right, rgba(0,0,0,0.7), transparent);
25
+ z-index: 1;
26
+ }
27
+ .hero-content {
28
+ max-width: 600px;
29
+ z-index: 2;
30
+ }
31
+ .hero-title {
32
+ font-size: 3rem;
33
+ margin-bottom: 1rem;
34
+ animation: fadeInUp 1s ease;
35
+ }
36
+ .hero-desc {
37
+ font-size: 1.2rem;
38
+ margin-bottom: 1.5rem;
39
+ animation: fadeInUp 1s ease 0.3s forwards;
40
+ opacity: 0;
41
+ }
42
+ .hero-buttons {
43
+ display: flex;
44
+ gap: 1rem;
45
+ animation: fadeInUp 1s ease 0.6s forwards;
46
+ opacity: 0;
47
+ }
48
+ .play-btn, .info-btn {
49
+ padding: 0.8rem 1.8rem;
50
+ border: none;
51
+ border-radius: 4px;
52
+ font-size: 1rem;
53
+ font-weight: bold;
54
+ cursor: pointer;
55
+ display: flex;
56
+ align-items: center;
57
+ gap: 0.5rem;
58
+ transition: all 0.3s;
59
+ }
60
+ .play-btn {
61
+ background-color: white;
62
+ color: black;
63
+ }
64
+ .play-btn:hover {
65
+ background-color: rgba(255,255,255,0.8);
66
+ }
67
+ .info-btn {
68
+ background-color: rgba(109, 109, 110, 0.7);
69
+ color: white;
70
+ }
71
+ .info-btn:hover {
72
+ background-color: rgba(109, 109, 110, 0.4);
73
+ }
74
+ @keyframes fadeInUp {
75
+ from {
76
+ opacity: 0;
77
+ transform: translateY(20px);
78
+ }
79
+ to {
80
+ opacity: 1;
81
+ transform: translateY(0);
82
+ }
83
+ }
84
+ @media (max-width: 768px) {
85
+ .hero {
86
+ height: 60vh;
87
+ }
88
+ .hero-title {
89
+ font-size: 2rem;
90
+ }
91
+ .hero-desc {
92
+ font-size: 1rem;
93
+ }
94
+ .hero-buttons {
95
+ flex-direction: column;
96
+ }
97
+ }
98
+ </style>
99
+ <div class="hero">
100
+ <div class="hero-content">
101
+ <h1 class="hero-title">Unlimited movies, TV shows, and more.</h1>
102
+ <p class="hero-desc">Watch anywhere. Cancel anytime.</p>
103
+ <div class="hero-buttons">
104
+ <button class="play-btn">▶ Play</button>
105
+ <button class="info-btn">ℹ More Info</button>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ `;
110
+
111
+ // Random hero image from TMDB API
112
+ this.fetchHeroImage();
113
+ }
114
+
115
+ async fetchHeroImage() {
116
+ try {
117
+ const response = await fetch(`https://api.themoviedb.org/3/movie/popular?api_key=8f2b224acadeeebc64ef32b4c04919de&language=en-US&page=1`);
118
+ const data = await response.json();
119
+ const randomMovie = data.results[Math.floor(Math.random() * data.results.length)];
120
+ this.shadowRoot.querySelector('.hero').style.backgroundImage = `url(https://image.tmdb.org/t/p/original${randomMovie.backdrop_path})`;
121
+ this.shadowRoot.querySelector('.hero-title').textContent = randomMovie.title;
122
+ this.shadowRoot.querySelector('.hero-desc').textContent = randomMovie.overview;
123
+ } catch (error) {
124
+ console.error('Error fetching hero image:', error);
125
+ this.shadowRoot.querySelector('.hero').style.backgroundImage = `url(http://static.photos/movie/1200x630/1)`;
126
+ }
127
+ }
128
+ }
129
+ customElements.define('hero-section', HeroSection);
components/movie-row.js ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class MovieRow extends HTMLElement {
2
+ constructor() {
3
+ super();
4
+ this.movies = [];
5
+ }
6
+
7
+ connectedCallback() {
8
+ this.attachShadow({ mode: 'open' });
9
+ this.render();
10
+ this.fetchMovies();
11
+ }
12
+
13
+ static get observedAttributes() {
14
+ return ['title', 'category'];
15
+ }
16
+
17
+ attributeChangedCallback(name, oldValue, newValue) {
18
+ if (name === 'title') {
19
+ this.shadowRoot.querySelector('h2').textContent = newValue;
20
+ }
21
+ if (name === 'category') {
22
+ this.fetchMovies();
23
+ }
24
+ }
25
+
26
+ render() {
27
+ this.shadowRoot.innerHTML = `
28
+ <style>
29
+ .row {
30
+ margin: 2rem 4%;
31
+ }
32
+ .row-title {
33
+ color: white;
34
+ font-size: 1.4rem;
35
+ margin-bottom: 1rem;
36
+ }
37
+ .row-container {
38
+ display: flex;
39
+ overflow-x: auto;
40
+ gap: 0.5rem;
41
+ padding: 1rem 0;
42
+ scroll-behavior: smooth;
43
+ }
44
+ .row-container::-webkit-scrollbar {
45
+ display: none;
46
+ }
47
+ .movie-card {
48
+ min-width: 200px;
49
+ transition: transform 0.3s;
50
+ position: relative;
51
+ }
52
+ .movie-card:hover {
53
+ transform: scale(1.05);
54
+ z-index: 10;
55
+ }
56
+ .movie-poster {
57
+ width: 100%;
58
+ border-radius: 4px;
59
+ cursor: pointer;
60
+ }
61
+ @media (max-width: 768px) {
62
+ .row {
63
+ margin: 1rem 2%;
64
+ }
65
+ .movie-card {
66
+ min-width: 150px;
67
+ }
68
+ }
69
+ </style>
70
+ <div class="row">
71
+ <h2 class="row-title">${this.getAttribute('title') || 'Popular'}</h2>
72
+ <div class="row-container" id="row-container"></div>
73
+ </div>
74
+ `;
75
+ }
76
+
77
+ async fetchMovies() {
78
+ const category = this.getAttribute('category') || 'popular';
79
+ try {
80
+ const response = await fetch(`https://api.themoviedb.org/3/movie/${category}?api_key=8f2b224acadeeebc64ef32b4c04919de&language=en-US&page=1`);
81
+ const data = await response.json();
82
+ this.movies = data.results;
83
+ this.renderMovies();
84
+ } catch (error) {
85
+ console.error('Error fetching movies:', error);
86
+ // Fallback to placeholder images
87
+ this.movies = Array(10).fill().map((_, i) => ({
88
+ poster_path: `/placeholder/${i+1}`,
89
+ title: `Movie ${i+1}`
90
+ }));
91
+ this.renderMovies();
92
+ }
93
+ }
94
+
95
+ renderMovies() {
96
+ const container = this.shadowRoot.getElementById('row-container');
97
+ container.innerHTML = '';
98
+
99
+ this.movies.forEach(movie => {
100
+ const card = document.createElement('div');
101
+ card.className = 'movie-card';
102
+ card.innerHTML = `
103
+ <img
104
+ class="movie-poster"
105
+ src="${movie.poster_path ? `https://image.tmdb.org/t/p/w200${movie.poster_path}` : 'http://static.photos/movie/200x200'}"
106
+ alt="${movie.title}"
107
+ loading="lazy"
108
+ >
109
+ `;
110
+ container.appendChild(card);
111
+ });
112
+ }
113
+ }
114
+ customElements.define('movie-row', MovieRow);
components/navbar.js ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ display: flex;
8
+ justify-content: space-between;
9
+ align-items: center;
10
+ padding: 1rem 4%;
11
+ background: linear-gradient(to bottom, rgba(0,0,0,0.7) 10%, transparent);
12
+ position: fixed;
13
+ width: 92%;
14
+ z-index: 1000;
15
+ transition: all 0.5s ease;
16
+ }
17
+ nav.scrolled {
18
+ background-color: #141414;
19
+ }
20
+ .logo {
21
+ color: #e50914;
22
+ font-size: 2rem;
23
+ font-weight: bold;
24
+ cursor: pointer;
25
+ }
26
+ .nav-links {
27
+ display: flex;
28
+ gap: 1.5rem;
29
+ }
30
+ .nav-links a {
31
+ color: white;
32
+ text-decoration: none;
33
+ font-size: 0.9rem;
34
+ transition: color 0.3s;
35
+ }
36
+ .nav-links a:hover {
37
+ color: #e50914;
38
+ }
39
+ .search-container {
40
+ display: flex;
41
+ align-items: center;
42
+ }
43
+ .search-input {
44
+ padding: 0.5rem;
45
+ border: none;
46
+ border-radius: 4px;
47
+ background: rgba(0,0,0,0.5);
48
+ color: white;
49
+ width: 0;
50
+ opacity: 0;
51
+ transition: all 0.3s ease;
52
+ }
53
+ .search-input.active {
54
+ width: 200px;
55
+ opacity: 1;
56
+ padding: 0.5rem 1rem;
57
+ margin-right: 1rem;
58
+ }
59
+ .search-icon {
60
+ color: white;
61
+ cursor: pointer;
62
+ font-size: 1.2rem;
63
+ }
64
+ @media (max-width: 768px) {
65
+ nav {
66
+ padding: 1rem 2%;
67
+ width: 96%;
68
+ }
69
+ .nav-links {
70
+ display: none;
71
+ }
72
+ .search-input.active {
73
+ width: 150px;
74
+ }
75
+ }
76
+ </style>
77
+ <nav id="main-nav">
78
+ <a href="/" class="logo">ZeeFlix</a>
79
+ <div class="nav-links">
80
+ <a href="/">Home</a>
81
+ <a href="#">TV Shows</a>
82
+ <a href="#">Movies</a>
83
+ <a href="#">New & Popular</a>
84
+ <a href="#">My List</a>
85
+ </div>
86
+ <div class="search-container">
87
+ <input type="text" class="search-input" placeholder="Titles, people, genres">
88
+ <i class="search-icon">🔍</i>
89
+ <theme-toggle></theme-toggle>
90
+ </div>
91
+ </nav>
92
+ `;
93
+
94
+ const nav = this.shadowRoot.getElementById('main-nav');
95
+ window.addEventListener('scroll', () => {
96
+ if (window.scrollY > 100) {
97
+ nav.classList.add('scrolled');
98
+ } else {
99
+ nav.classList.remove('scrolled');
100
+ }
101
+ });
102
+
103
+ const searchIcon = this.shadowRoot.querySelector('.search-icon');
104
+ const searchInput = this.shadowRoot.querySelector('.search-input');
105
+ searchIcon.addEventListener('click', () => {
106
+ searchInput.classList.toggle('active');
107
+ if (searchInput.classList.contains('active')) {
108
+ searchInput.focus();
109
+ }
110
+ });
111
+ }
112
+ }
113
+ customElements.define('custom-navbar', CustomNavbar);
components/theme-toggle.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class ThemeToggle extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .toggle-container {
7
+ display: flex;
8
+ align-items: center;
9
+ gap: 8px;
10
+ }
11
+ .toggle-switch {
12
+ position: relative;
13
+ display: inline-block;
14
+ width: 60px;
15
+ height: 30px;
16
+ }
17
+ .toggle-switch input {
18
+ opacity: 0;
19
+ width: 0;
20
+ height: 0;
21
+ }
22
+ .slider {
23
+ position: absolute;
24
+ cursor: pointer;
25
+ top: 0;
26
+ left: 0;
27
+ right: 0;
28
+ bottom: 0;
29
+ background: linear-gradient(to right, #141414, #333);
30
+ transition: .4s;
31
+ border-radius: 34px;
32
+ }
33
+ .slider:before {
34
+ position: absolute;
35
+ content: "";
36
+ height: 22px;
37
+ width: 22px;
38
+ left: 4px;
39
+ bottom: 4px;
40
+ background-color: white;
41
+ transition: .4s;
42
+ border-radius: 50%;
43
+ }
44
+ input:checked + .slider {
45
+ background: linear-gradient(to right, #e50914, #b20710);
46
+ }
47
+ input:checked + .slider:before {
48
+ transform: translateX(30px);
49
+ }
50
+ .icon {
51
+ font-size: 1.2rem;
52
+ color: #e50914;
53
+ }
54
+ .dark .icon {
55
+ color: #fff;
56
+ }
57
+ </style>
58
+ <div class="toggle-container">
59
+ <label class="toggle-switch">
60
+ <input type="checkbox" id="theme-toggle">
61
+ <span class="slider"></span>
62
+ </label>
63
+ <span class="icon">🎬</span>
64
+ </div>
65
+ `;
66
+
67
+ const toggle = this.shadowRoot.getElementById('theme-toggle');
68
+ toggle.addEventListener('change', () => {
69
+ document.body.classList.toggle('dark');
70
+ localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light');
71
+ });
72
+
73
+ if (localStorage.getItem('theme') === 'dark') {
74
+ document.body.classList.add('dark');
75
+ toggle.checked = true;
76
+ }
77
+ }
78
+ }
79
+ customElements.define('theme-toggle', ThemeToggle);
index.html CHANGED
@@ -1,19 +1,107 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ZeeFlix - Watch TV Shows Online, Watch Movies Online</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+ <style>
11
+ body {
12
+ background-color: #141414;
13
+ color: white;
14
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
15
+ margin: 0;
16
+ padding: 0;
17
+ }
18
+ body.dark {
19
+ background-color: #141414;
20
+ }
21
+ body.light {
22
+ background-color: #f3f3f3;
23
+ color: #333;
24
+ }
25
+ main {
26
+ padding-top: 70px;
27
+ }
28
+ footer {
29
+ background-color: #141414;
30
+ color: #757575;
31
+ padding: 2rem 4%;
32
+ text-align: center;
33
+ margin-top: 2rem;
34
+ }
35
+ .social-icons {
36
+ display: flex;
37
+ justify-content: center;
38
+ gap: 1rem;
39
+ margin: 1rem 0;
40
+ }
41
+ .social-icons a {
42
+ color: white;
43
+ font-size: 1.5rem;
44
+ }
45
+ .footer-links {
46
+ display: flex;
47
+ flex-wrap: wrap;
48
+ justify-content: center;
49
+ gap: 1rem;
50
+ margin: 1rem 0;
51
+ }
52
+ .footer-links a {
53
+ color: #757575;
54
+ text-decoration: none;
55
+ font-size: 0.8rem;
56
+ }
57
+ .footer-links a:hover {
58
+ text-decoration: underline;
59
+ }
60
+ .copyright {
61
+ font-size: 0.8rem;
62
+ margin-top: 1rem;
63
+ }
64
+ </style>
65
+ </head>
66
+ <body>
67
+ <custom-navbar></custom-navbar>
68
+ <main>
69
+ <hero-section></hero-section>
70
+ <movie-row title="Popular on ZeeFlix" category="popular"></movie-row>
71
+ <movie-row title="Trending Now" category="now_playing"></movie-row>
72
+ <movie-row title="Top Rated" category="top_rated"></movie-row>
73
+ <movie-row title="Upcoming Movies" category="upcoming"></movie-row>
74
+ </main>
75
+ <footer>
76
+ <div class="social-icons">
77
+ <a href="#"><i class="fab fa-facebook"></i></a>
78
+ <a href="#"><i class="fab fa-instagram"></i></a>
79
+ <a href="#"><i class="fab fa-twitter"></i></a>
80
+ <a href="#"><i class="fab fa-youtube"></i></a>
81
+ </div>
82
+ <div class="footer-links">
83
+ <a href="#">Audio Description</a>
84
+ <a href="#">Help Center</a>
85
+ <a href="#">Gift Cards</a>
86
+ <a href="#">Media Center</a>
87
+ <a href="#">Investor Relations</a>
88
+ <a href="#">Jobs</a>
89
+ <a href="#">Terms of Use</a>
90
+ <a href="#">Privacy</a>
91
+ <a href="#">Legal Notices</a>
92
+ <a href="#">Cookie Preferences</a>
93
+ <a href="#">Corporate Information</a>
94
+ <a href="#">Contact Us</a>
95
+ </div>
96
+ <div class="copyright">
97
+ © 2023 ZeeFlix, Inc.
98
+ </div>
99
+ </footer>
100
+ <script src="components/navbar.js"></script>
101
+ <script src="components/theme-toggle.js"></script>
102
+ <script src="components/hero.js"></script>
103
+ <script src="components/movie-row.js"></script>
104
+ <script src="script.js"></script>
105
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
106
+ </body>
107
+ </html>
script.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ // Initialize stream quality selector
3
+ initStreamQuality();
4
+
5
+ // Add upcoming movies highlight animation
6
+ highlightUpcomingMovies();
7
+
8
+ // Handle search functionality
9
+ setupSearch();
10
+ });
11
+
12
+ function initStreamQuality() {
13
+ const qualityContainer = document.createElement('div');
14
+ qualityContainer.className = 'stream-quality';
15
+ qualityContainer.innerHTML = `
16
+ <h3>Stream Quality</h3>
17
+ <div class="server-options">
18
+ <button class="server-btn active" data-quality="auto">Auto</button>
19
+ <button class="server-btn" data-quality="1080p">1080p</button>
20
+ <button class="server-btn" data-quality="720p">720p</button>
21
+ <button class="server-btn" data-quality="480p">480p</button>
22
+ </div>
23
+ `;
24
+ document.body.appendChild(qualityContainer);
25
+
26
+ // Handle quality selection
27
+ const qualityBtns = document.querySelectorAll('.server-btn');
28
+ qualityBtns.forEach(btn => {
29
+ btn.addEventListener('click', () => {
30
+ qualityBtns.forEach(b => b.classList.remove('active'));
31
+ btn.classList.add('active');
32
+ // Here you would typically update the stream quality
33
+ console.log(`Switched to ${btn.dataset.quality} quality`);
34
+ });
35
+ });
36
+ }
37
+
38
+ function highlightUpcomingMovies() {
39
+ // Find all upcoming movie cards and add pulse animation
40
+ setTimeout(() => {
41
+ const upcomingRows = document.querySelectorAll('movie-row[title="Upcoming Movies"]');
42
+ upcomingRows.forEach(row => {
43
+ const cards = row.shadowRoot.querySelectorAll('.movie-card');
44
+ if (cards.length > 0) {
45
+ // Highlight the first 3 upcoming movies
46
+ for (let i = 0; i < Math.min(3, cards.length); i++) {
47
+ cards[i].classList.add('upcoming-highlight');
48
+ }
49
+ }
50
+ });
51
+ }, 1000); // Wait for movies to load
52
+ }
53
+
54
+ function setupSearch() {
55
+ // This would be connected to the navbar search functionality
56
+ document.addEventListener('keypress', (e) => {
57
+ if (e.target.classList.contains('search-input') && e.key === 'Enter') {
58
+ const query = e.target.value.trim();
59
+ if (query) {
60
+ console.log(`Searching for: ${query}`);
61
+ // Here you would typically redirect to search results or fetch them
62
+ // window.location.href = `/search.html?q=${encodeURIComponent(query)}`;
63
+ }
64
+ }
65
+ });
66
+ }
67
+
68
+ // Handle theme toggle
69
+ document.addEventListener('themeToggle', (e) => {
70
+ document.body.classList.toggle('dark');
71
+ localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light');
72
+ });
73
+
74
+ // Check for saved theme preference
75
+ if (localStorage.getItem('theme') === 'dark') {
76
+ document.body.classList.add('dark');
77
+ } else if (localStorage.getItem('theme') === 'light') {
78
+ document.body.classList.add('light');
79
+ }
style.css CHANGED
@@ -1,28 +1,137 @@
 
 
 
 
 
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
 
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
 
 
 
 
 
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Base Styles */
2
+ * {
3
+ box-sizing: border-box;
4
+ margin: 0;
5
+ padding: 0;
6
+ }
7
+
8
  body {
9
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
10
+ background-color: #141414;
11
+ color: white;
12
+ }
13
+
14
+ /* Dark/Light Theme */
15
+ body.dark {
16
+ background-color: #141414;
17
+ color: white;
18
+ }
19
+
20
+ body.light {
21
+ background-color: #f3f3f3;
22
+ color: #333;
23
+ }
24
+
25
+ /* Main Content */
26
+ main {
27
+ padding-top: 70px;
28
+ }
29
+
30
+ /* Footer Styles */
31
+ footer {
32
+ background-color: #141414;
33
+ color: #757575;
34
+ padding: 2rem 4%;
35
+ text-align: center;
36
+ margin-top: 2rem;
37
+ }
38
+
39
+ .social-icons {
40
+ display: flex;
41
+ justify-content: center;
42
+ gap: 1rem;
43
+ margin: 1rem 0;
44
+ }
45
+
46
+ .social-icons a {
47
+ color: white;
48
+ font-size: 1.5rem;
49
+ }
50
+
51
+ .footer-links {
52
+ display: flex;
53
+ flex-wrap: wrap;
54
+ justify-content: center;
55
+ gap: 1rem;
56
+ margin: 1rem 0;
57
  }
58
 
59
+ .footer-links a {
60
+ color: #757575;
61
+ text-decoration: none;
62
+ font-size: 0.8rem;
63
  }
64
 
65
+ .footer-links a:hover {
66
+ text-decoration: underline;
 
 
 
67
  }
68
 
69
+ .copyright {
70
+ font-size: 0.8rem;
71
+ margin-top: 1rem;
 
 
 
72
  }
73
 
74
+ /* Responsive Adjustments */
75
+ @media (max-width: 768px) {
76
+ main {
77
+ padding-top: 60px;
78
+ }
79
+
80
+ footer {
81
+ padding: 1.5rem 2%;
82
+ }
83
+
84
+ .footer-links {
85
+ gap: 0.8rem;
86
+ }
87
  }
88
+
89
+ /* Stream Quality Selector */
90
+ .stream-quality {
91
+ position: fixed;
92
+ bottom: 20px;
93
+ right: 20px;
94
+ background: rgba(20, 20, 20, 0.9);
95
+ padding: 1rem;
96
+ border-radius: 8px;
97
+ z-index: 1000;
98
+ }
99
+
100
+ .stream-quality h3 {
101
+ margin-bottom: 0.5rem;
102
+ font-size: 1rem;
103
+ }
104
+
105
+ .server-options {
106
+ display: flex;
107
+ gap: 0.5rem;
108
+ }
109
+
110
+ .server-btn {
111
+ background: #333;
112
+ color: white;
113
+ border: none;
114
+ padding: 0.5rem 1rem;
115
+ border-radius: 4px;
116
+ cursor: pointer;
117
+ transition: all 0.3s;
118
+ }
119
+
120
+ .server-btn:hover {
121
+ background: #555;
122
+ }
123
+
124
+ .server-btn.active {
125
+ background: #e50914;
126
+ }
127
+
128
+ /* Animation for upcoming movies */
129
+ @keyframes pulse {
130
+ 0% { transform: scale(1); }
131
+ 50% { transform: scale(1.05); }
132
+ 100% { transform: scale(1); }
133
+ }
134
+
135
+ .upcoming-highlight {
136
+ animation: pulse 2s infinite;
137
+ }