:root{
    --bg:#0b0f1a;
    --card:#111827;
    --accent:#fbbf24;
    --text:#e5e7eb;
    --muted:#9ca3af;
}

*{box-sizing: border-box;
margin: 0; padding: 0;}
body{
    background: var(--bg); color: var(--text);
    font-family:  Arial, Helvetica, sans-serif;
}
header{
    text-align: center;padding: 18px 16px;
}
header h1{
    color: var(--accent); font-size: 28px;
    font-weight: 800;
}
.wrap{
    max-width: 1200px; margin: 0 auto; 
    padding: 0 15px 65px;
}
.tabs{
    display: flex;gap: 10px;flex-wrap: wrap;
    justify-content: center; margin-bottom: 22px;
}
h2{
    font-size: 28px; font-weight: 800;
    color: var(--accent);  text-align: center;
}
.tab{
    padding: 10px 18px; border: 2px solid #1f2937;
    border-radius: 999px; background: transparent;
    color: var(--muted); cursor: pointer;font-weight: 600;
}
.tab.active{
    background: var(--accent);color: #111;
    border-color: var(--accent);
}
.search{ background: #111827; padding: 15px;
    display: flex; gap: 10px; justify-content: center;
    margin-bottom: 24px; border-radius: 12px;
}
.search input{
    flex: 1;max-width: 400px; padding: 12px 16px;
    border-radius: 10px;border: 1px solid #1f2937;
    background: #0f172a; color: var(--text);
}
.search button{
    padding: 12px 20px; border: 0; border-radius: 10px;
    background: var(--accent); color: #111;
    font-weight: 700; cursor: pointer;
}
.grid{
    display: grid; grid-template-columns:
     repeat(auto-fit,minmax(190px,1fr)); gap: 18px;
}
.card{
    background: var(--card); border-radius: 12px;
    overflow: hidden; position: relative; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease; 
}
.poster{
    position: relative; overflow: hidden;
}
.card img{
    width: 100%; height: 255px; object-fit: cover;
    display: block;
}
.info-bar{
    position: absolute;bottom: 0; left: 0; right: 0;
    padding: 8px 10px; background: 
    linear-gradient(180deg,transparent,rgba(0,0,0,.8));
}
.info-bar h4{
    font-size: 13px; white-space: nowrap;
     overflow: hidden; text-overflow: ellipsis;
}
.info-bar span{
    font-size: 11px; color: var(--muted);
}
.overlay{
    position: absolute; inset: 0; background:
     rgba(0,0,0,.85); opacity: 0; display: flex;
     flex-direction: column; justify-content: center;
     transition: .3s; padding: 16px; align-items: center;
}
.overlay img{
    width: auto; height: 120px; margin: 0 auto 10px;
    border-radius: 6px;
}
.card:hover .overlay{opacity: 1;}
.overlay h3{
    font-size: 16px; text-align: center;margin-bottom: 6px;
    
}
.meta{
    font-size: 12px; color: var(--muted);
     text-align: center;margin-bottom: 8px;
}
.overview{
    font-size: 16px; color: var(--text); text-align: center;
    display: -webkit-box; -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 12px;
}
.play-btn, .poster-btn{
    padding: 7px 14px; border: 0; border-radius: 8px;
    background: var(--accent); color: #111;font-weight: 700;
    cursor: pointer; transition: transform 0.2s ease;margin: 6px 4px;
    display: inline-block; width: auto;
}
.play-btn{margin-bottom: 5px;}
.poster-btn{margin-top: 0;}
.show-less{
    display: block; margin: 28px auto 0; padding: 12px 26px;
    background: transparent; border: 1px solid #1f2937;
    color: var(--muted); border-radius: 10px;
    cursor: pointer; font-weight: 600;
}
.show-less:hover{
    border-color: var(--accent);color: var(--accent);
}
.admin-box{ display: block;
}
.admin-box.unlocked #adminPanel{
    display: block;
}
#adminPanel{
    display: none;
}
.admin-login-btn{
    position: fixed; top: 20px; right: 20px; z-index: 1000;
    padding: 8px 16px; background: #374151; color: var(--accent);
    border: 1px solid var(--accent); border-radius: 6px;
    cursor: pointer; font-size: 14px; font-weight: 600;
    transition: background 0.2s;
}
.admin-login-btn:hover{
    background: #4b5563;
}
.password-modal{
    display: none; position: fixed; align-items: center;
    background: rgba(0,0,0,.9); justify-content: center;
    z-index: 2000;top: 0;left: 0;right: 0;bottom: 0;
}
.password-modal.open{
    display: flex;
}
.password-card{
    background: var(--accent); padding: 30px; width: 90%;
    max-width: 400px; border-radius: 14px;
    border: 1px solid #1f2937;
}
.password-card h3{
    color: var(--accent); margin-bottom: 15px;
    text-align: center;
}
.password-card input{
    width: 100%; padding: 12px; margin: 15px 0; font-size: 14px;
    color: var(--text); border-radius: 8px;background: var(--bg);
    border: 1px solid #1f2937;
}
.password-card button{
    width: 100%; padding: 12px; background: var(--accent);
    color: #111;border: none;border-radius: 8px;
    font-weight: 700; cursor: pointer;font-size: 14px;
}
.password-error{
    color: #ef4444; font-size: 13px;display: none;
    margin-top: 10px; text-align: center;
}
.admin-box h3{
    margin-bottom: 16px; color: var(--accent);
}
.admin-search{
    display: flex; gap: 10px; margin-bottom: 16px;
    flex-wrap: wrap;
}
.admin-search input{
    flex: 1 1 200px; padding: 10px 14px; border-radius: 8px;
    border: 1px solid #1f2937; background: #0b0f1a;
    color: var(--text); min-width: 200px;
}
.admin-search button{
    padding: 10px 18px; border: 0; border-radius: 8px;
    background: var(--accent); color: #111;
    font-weight: 700; cursor: pointer; flex: 0 0 auto;
}
.tmdb-grid{
    display: grid; grid-template-columns:
     repeat(auto-fit,minmax(120px,1fr)); 
     gap: 12px; margin-bottom: 20px;
}
.tmdb-card{
    text-align: center; cursor: pointer;
    border: 1px solid #1f2937; border-radius: 8px;
    overflow: hidden; transition: transform 0.2s,
    border-color 0.2s;
}
.tmdb-card img{
    width: 100%; border-radius: 8px;
}
.tmdb-card p {
    color: var(--text); padding: 8px 4px;
}
.tmdb-card:hover{
    transform: scale(1.05);
    border: 1px solid var(--accent);
}
#addMovieForm{
    display: grid; gap: 10px;margin-top: 20px;
}
#addMovieForm input,#addMovieForm textarea,
#addMovieForm select{
    padding: 10px; border-radius: 8px;color: var(--text);
    border: 1px solid #1f2937;background: #0b0f1a;
}
#addMovieForm button{
    padding: 12px; border: 0; border-radius: 8px;
    background: var(--accent); color: #111;
    font-weight: 700; cursor: pointer;
}

.modal{
    position: fixed; inset: 0; display: none; align-items: center;
    justify-content: center; background: rgba(0,0,0,.9);
    z-index: 999; padding: 16px;
}
.modal.open {display: flex;}
.modal-card{
    width: 100%; max-width: 900px;background: var(--card);
    border-radius: 14px; overflow: hidden; 
    max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-head{
    display: flex; justify-content: space-between;
    align-items: start; padding: 16px;
}
.modal-title{
    font-size: 18px; font-weight: 700;
}
.close{
    position: absolute; top: 12px; right: 12px;
    background: #000; border: none; color: #fff;
    font-size: 28px; cursor: pointer; z-index: 1001;
    width: 40px; height: 40px; border-radius: 50%;
    line-height: 40px;
}
#trailerFrame{
    width: 100%; height: 100%; border: none;
display: block; background: #000;
aspect-ratio: 16/9; position: absolute;}
.video-wrapper{
    position: relative; height: 0; overflow: hidden;
    background: #000; padding-bottom: 56.25%;
}
.providers{padding: 16px;}
.provider-grid{
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-top: 8px; justify-content: center;
}
.provider-card{
    display: flex;align-items: center; gap: 6px;
    padding: 10px 8px; background: #1f2937;border-radius: 12px;
    text-decoration: none; color: var(--text);font-size: 12px;
    width: 72px;transition: all 0.2s; border: 1px solid transparent;
}
.provider-card:hover{
    transform: translateY(-4px); background: #2d3748;
    border-color: var(--accent); box-shadow: 0 0 15px
    rgba(251, 191, 36, 0.4);
}
.provider-card img{
    width: 42px; height: 42px; border-radius: 10px;
    background: #1e293b; border: 1px solid transparent;
    object-fit: cover; transition: all 0.2s;
}
.provider-card:hover img {
    transform: scale(1.13); border-color: var(--accent);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}
.provider-label {
    font-size: 10px; color: var(--muted); margin-top: 6px;
    text-align: center; line-height: 1.2; max-width: 56px;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
}
#movieFilters{
    display: flex; gap: 8px; margin: 15px; overflow-x: auto;
    padding-bottom: 5px;
}
#movieFilters button{
    padding: 8px 16px; border: 1px solid #444; background: #1a1a1a;
    color: #ccc; border-radius: 20px; cursor: pointer;font-size: 14px;
    white-space: nowrap;flex-shrink: 0;
}
#movieFilters button.active{
    background: #e50914; color: white; border-color: #e50914;
}
.card:hover{
    transform: translateY(-8px) scale(1.03); 
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6),
    0 0 40px rgba(251, 191, 36, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.4);
}
.play-btn:hover, .poster-btn:hover{
    transform: scale(1.08); box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}
#movieFilters::-webkit-scrollbar{
    height: 6px;
}
#movieFilters::-webkit-scrollbar-thumb{
    background: var(--accent); border-radius: 20px;
}
.watch-badge{
    position: absolute; top: 8px; right: 8px; color: #111;
    background: rgba(245, 158, 11, 0.95); font-size: 10px;
    font-weight: 700; padding: 4px 8px; opacity: 0;
    border-radius: 6px; transform: translateY(-5px);
    transition: all 0.2s; pointer-events: auto;
    z-index: 3; cursor: pointer;
}
.card:hover .watch-badge{
    opacity: 1; transform: translateY(0);
}
.site-footer{
    margin-top: 60px; background: #111827;
    padding: 30px 20px; border-top: 2px solid var(--accent);
}
.footer-content{
    display: grid; gap: 25px; margin: auto; max-width: 1200px;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
}
.footer-section h3{
    color: var(--accent); margin-bottom: 12px;
}
.footer-section p {
    color: var(--muted); line-height: 1.6; margin-bottom: 8px;
}
.footer-section a {
    color: var(--accent); text-decoration: none;
}
.footer-section a:hover{
    text-decoration: underline;
}
.footer-ad{
    margin-top: 25px; text-align: center; padding-top: 20px;
    border-top: 1px solid #374151;
}
.footer-ad h3{
    color: var(--accent); margin-bottom: 10px;
}
.footer-ad p{
    color: var(--muted); max-width: 700px; margin: 8px auto;
}
.footer-bottom{
    text-align: center; margin-top: 20px; font-size: 14px;
    color: var(--muted); padding: 15px;
    border-top: 1px solid #374151;
}
#posterGeneratorModal{
    position: fixed; inset: 0; display: none; z-index: 9999; padding: 20px ;
    background: rgba(0,0,0,.9); justify-content: center;
    align-items: center; overflow-y: auto;
}
#closePoster{
    position: fixed; top: 15px; width: 42px; height: 42px; border: none;
    border-radius: 50%; background: #111; color: white; z-index: 100;
    cursor: pointer; font-size: 22px;
}
#posterGeneratorModal.open{
     display: flex; flex-direction: column;
}
.mmh-poster{
    position: relative;width: 100%;max-width: 600px;
    max-height: 750px;border-radius: 20px; margin:auto;
    background-size: cover;background-position: center;
    background-repeat: no-repeat;box-shadow: 0 20px 60px 
    rgba(0,0,0,.75); height: auto; overflow: visible;
}
.mmh-poster::before{
    content: ""; position: absolute; inset: 0; background-position: center;
    background: inherit; background-size: cover; 
    filter: blur(32px) brightness(.55); opacity: .8;
    transform: scaleX(1.2); z-index: 0;background-repeat: no-repeat;
}
.mmh-poster::after{
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,.82), rgba(0,0,0,.45), rgba(0,0,0,.55),
    rgba(0,0,0,.92)
    );
}
.mmh-poster-info{
    position: relative; padding:15px; align-items: center;
    display: flex;flex-direction: column; z-index: 2; 
}
.mmh-poster > * {
    position: relative; z-index: 2;
}
#mmhPosterLogo{
    width: 90px; margin-bottom: 8px;
}
#mmhPosterTitle{
    font-size: 35px;font-weight: 800;color: #fff;
    line-height: 1.2;margin-bottom: 14px;text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.mmh-poster-meta{
    display: flex;gap: 6px;flex-wrap: wrap;margin:8px 0 12px 0;
    color: var(--accent);justify-content: center;align-items: center; 
    flex-wrap: nowrap;
}
.mmh-poster-meta span {
    background: rgba(251, 191, 36, .15);color: var(--accent);white-space: nowrap;
    border: 1px solid rgba(251, 191, 36, .45);border-radius: 30px;
    padding: 5px 10px;font-size: 13px;font-weight: 700; backdrop-filter: blur(5px);
}
.mmh-poster-buttons{
    display: flex; gap: 15px; flex-wrap: wrap;
    width: 95%;
}
.mmh-poster-buttons button{
    padding: 14px 24px;border: none;cursor: pointer; flex: 1;
    border-radius: 10px;background: var(--accent);
    font-weight: 700;transition: .25s;color: #111; z-index: 4;
}
.mmh-poster-buttons button:hover{
    transform: translateY(-3px);
}
#mmhPosterImage{
    width: 290px;max-width: 90%;display: block; height: 55%;
    border-radius: 18px; margin-bottom: 20px 0px;
    background: rgba(251, 191, 36, .35);
    border: 4px solid rgba(255,215,0,.25);
    box-shadow: 0 12px 35px rgba(0,0,0,.8),
    0 0 25px rgba(255,215,0,.25)
}
#mmhPosterUrl{
    color: var(--accent); font-size: 14px; font-weight: bold; margin-top: 10px;
    text-align: center; overflow-wrap: anywhere; margin-bottom: 6px;
}
.movie-details{
    display: flex; gap: 25px; padding: 40px 20px; align-items: center;
    flex-direction: column;
}
.movie-poster{
    width: 80vw; max-width: 500px; height: auto; border-radius: 18px; object-fit: cover;
    display: block; margin: 0 auto; box-shadow: 0 0 12px  rgba(251, 191, 36, .35),
    0 8px 25px rgba(251, 191, 36, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.movie-poster:hover{
    transform: scale(1.02); box-shadow: 0 0 20px rgba(251, 191, 36, .45),
    0 14px 38px rgba(251, 191, 36, 0.3);
}
.movie-info{max-width: 800px; text-align: center;}
.watch-trailer-btn{
    display: inline-block; margin-top: 20px; padding: 12px 20px; color: #111827;
    background: #fbbf24; text-decoration: none; border-radius: 8px; font-weight: bold;
}
section{margin: 40px auto; max-width: 1200px; padding: 0 15px;}
section h2{ margin-bottom: 20px;}

@media(max-width:768px){
    .grid{grid-template-columns: repeat(2,1fr);
    gap: 12px;}
    .overlay{padding: 8px; opacity: 1;}
    .overlay h3{font-size: 14px;}
    .overview{ display: -webkit-box;
                -webkit-line-clamp: 3;
                -webkit-box-orient: vertical;
          font-size: 14px;
}
    .play-btn, .poster-btn{padding: 5px 10px; font-size: 12px;}

    header h1{font-size: 22px;}
    .wrap{padding: 0 10px 40px;}
    .mmh-poster{width: 95%;}
    #mmhPosterTitle{font-size: 28px;}
    #mmhPosterImage{max-width: 200px;}
    #mmhPosterDesc{font-size: 15px;}
    .mmh-poster-buttons button{width: 100%;}
    .mmh-poster-buttons{flex-direction: column;}
    .movie-details{flex-direction: column; padding: 20px;}
    .movie-poster{width: 220px; margin: auto;}
    .movie-info h1{font-size: 24px;}
}
@media(max-width:480px) {
    .grid{grid-template-columns: repeat(2, 1fr); gap: 10px;
    padding: 3px 6px;}
    }
