/* ==========================================
   RESET
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================
   ROOT VARIABLES
========================================== */

:root {

    /* Primary Colors */
    --primary: #8A2BE2;
    --primary-hover: #a64dff;
    --primary-dark: #5B12B8;

    /* Backgrounds */
    --bg: #090909;
    --bg-dark: #111;
    --card: #181818;
    --card-light: #222;

    /* Text */
    --white: #ffffff;
    --text: #d5d5d5;
    --text-light: #bbbbbb;

    /* Borders */
    --border: #333;
}

/* ==========================================
   GLOBAL
========================================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--white);
}

/* ==========================================
   NAVBAR
========================================== */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    height: 90px;
    padding: 0 50px;

    background: var(--bg-dark);
    border-bottom: 2px solid var(--primary);
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 400px;
    height: auto;
    object-fit: contain;
    transition: .3s ease;
}

.logo-img:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 0 12px var(--primary));
}

.logo-text {
    color: var(--white);
    font-size: 36px;
}

.logo-text span {
    color: var(--primary);
}

/* ==========================================
   NAVIGATION MENU
========================================== */

nav ul {
    display: flex;
    gap: 35px;
    list-style: none;
}

nav a {
    color: var(--white);
    font-size: 18px;
    text-decoration: none;
    transition: color .3s ease;
}

nav a:hover {
    color: var(--primary);
}

/* ==========================================
   SEARCH BAR
========================================== */

.search {
    position: relative;
    display: flex;
}

.search input {
    width: 260px;
    height: 42px;
    padding: 0 15px;

    color: var(--white);
    background: #1a1a1a;

    border: 2px solid var(--primary);
    border-radius: 8px 0 0 8px;
    outline: none;
}

.search button {
    width: 110px;

    color: var(--white);
    background: var(--primary);

    border: none;
    border-radius: 0 8px 8px 0;

    font-weight: bold;
    cursor: pointer;
    transition: background .3s ease;
}

.search button:hover {
    background: var(--primary-hover);
}

/* ==========================================
   HERO SECTION
========================================== */

.hero {
    display: flex;
    align-items: center;

    height: 500px;

    background:
        linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, .8)),
        url("hero.png");

    background-position: center;
    background-size: cover;
}

.hero-overlay {
    margin-left: 80px;
    max-width: 600px;
}

.hero h2 {
    margin-bottom: 20px;
    font-size: 55px;
}

.hero p {
    color: var(--text);
    font-size: 20px;
    line-height: 1.6;
}

.watch-btn {
    margin-top: 30px;
    padding: 15px 35px;

    background: var(--primary);
    color: var(--white);

    border: none;
    border-radius: 8px;

    font-size: 18px;
    cursor: pointer;
    transition: all .3s ease;
}

.watch-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* ==========================================
   CONTENT
========================================== */

.content-section {
    width: 95%;
    margin: 60px auto;
}

.content-section h2 {
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 32px;
}

.poster-grid {
    display: flex;
    gap: 20px;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 10px 0 20px;
    scroll-behavior: smooth;
}

.poster-grid::-webkit-scrollbar {
    display: none;
}

/* ==========================================
   FOOTER
========================================== */

footer {
    padding: 40px;

    text-align: center;

    color: var(--text-light);
    background: var(--bg-dark);

    border-top: 2px solid var(--primary);
}

/* ==========================================
   MOVIE CARDS
========================================== */

.movie-card {
    position: relative;

    min-width: 220px;

    background: #141414;
    border-radius: 15px;
    overflow: hidden;

    cursor: pointer;
    transition: all .35s ease;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px var(--primary);
}

.movie-card img {
    display: block;
    width: 100%;
}

.movie-card h3 {
    padding: 12px 12px 5px;
    font-size: 18px;
}

.movie-card p {
    padding: 0 12px 12px;
    color: var(--text);
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px var(--primary);
}

.poster-container {
    position: relative;
    overflow: hidden;
}

.poster-container img {
    display: block;
    width: 100%;
    transition: transform .4s ease;
}

.movie-card:hover img {
    transform: scale(1.08);
}

.rating-badge {
    position: absolute;
    top: 12px;
    right: 12px;

    padding: 6px 10px;

    background: var(--primary);
    color: var(--white);

    border-radius: 30px;

    font-size: 14px;
    font-weight: bold;
}

.movie-info {
    padding: 15px;
}

.movie-info h3 {
    margin-bottom: 8px;
    color: var(--white);
    font-size: 20px;
}

.movie-info p {
    color: var(--text);
    font-size: 15px;
}

/* ==========================================
   MOVIE OVERLAY
========================================== */

.movie-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;

    background: rgba(0, 0, 0, .75);

    opacity: 0;
    transition: opacity .35s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.watch-now {
    width: 150px;
    padding: 12px;

    background: var(--primary);
    color: var(--white);

    border: none;
    border-radius: 8px;

    font-size: 16px;
    cursor: pointer;
    transition: all .3s ease;
}

.watch-now:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.details-btn {
    width: 150px;
    padding: 12px;

    background: transparent;
    color: var(--white);

    border: 2px solid var(--white);
    border-radius: 8px;

    cursor: pointer;
    transition: all .3s ease;
}

.details-btn:hover {
    background: var(--white);
    color: #000;
}

/* ==========================================
   MOVIE PAGE
========================================== */

.movie-hero {
    position: relative;

    min-height: 100vh;

    background-position: center;
    background-size: cover;
}

.movie-page-overlay {
    display: flex;
    align-items: center;

    min-height: 100vh;

    background: linear-gradient(
        rgba(0, 0, 0, .4),
        rgba(0, 0, 0, .95)
    );
}

.movie-content {
    display: flex;
    align-items: center;
    gap: 50px;

    width: 90%;
    margin: auto;
}

.movie-poster {
    flex-shrink: 0;

    width: 320px;
    max-width: 100%;
    height: auto;

    border-radius: 15px;
    box-shadow: 0 0 35px var(--primary);
}

.movie-text {
    max-width: 700px;
}

.movie-text h1 {
    margin-bottom: 20px;
    font-size: 60px;
}

.movie-meta {
    display: flex;
    gap: 25px;

    margin-bottom: 25px;

    color: #cfcfcf;
    font-size: 20px;
}

.movie-text p {
    color: var(--text);
    font-size: 19px;
    line-height: 1.8;
}

.movie-buttons {
    display: flex;
    gap: 20px;

    margin-top: 40px;
}

.movie-buttons button {
    padding: 15px 35px;

    border: none;
    border-radius: 8px;

    font-size: 18px;
    cursor: pointer;
    transition: all .3s ease;
}

#trailerBtn {
    background: var(--primary);
    color: var(--white);
}

#downloadBtn {
    background: var(--white);
    color: #000;
}

.movie-buttons button:hover {
    transform: scale(1.05);
}

/* ==========================================
   GENRE TAGS
========================================== */

.movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin: 25px 0;
}

.genre-tag {
    padding: 8px 18px;

    background: var(--primary);
    color: var(--white);

    border-radius: 50px;

    font-size: 15px;
    font-weight: bold;

    box-shadow: 0 0 15px rgba(138, 43, 226, .45);
    transition: all .3s ease;
}

.genre-tag:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 0 25px var(--primary);
}

/* ==========================================
   EXTRA INFORMATION
========================================== */

.movie-extra {
    margin: 30px 0;
    color: #ddd;
}

.movie-extra p {
    margin: 12px 0;
    font-size: 18px;
}

/* ==========================================
   CAST
========================================== */

.cast-title {
    margin: 60px 0 25px;

    color: var(--primary);
    font-size: 32px;
}

.cast-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 25px;
}

.cast-card {
    overflow: hidden;

    background: #171717;
    border-radius: 15px;

    text-align: center;
    transition: all .35s ease;
}

.cast-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px var(--primary);
}

.cast-card img {
    width: 100%;
    height: 250px;

    object-fit: cover;
}

.cast-card h4 {
    padding: 15px 10px 5px;
}

.cast-card p {
    padding-bottom: 15px;

    color: var(--text-light);
}

/* ==========================================
   TRAILER MODAL
========================================== */

.trailer-modal {
    position: fixed;
    inset: 0;

    display: none;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, .92);

    z-index: 9999;
}

.trailer-box {
    position: relative;

    width: 85%;
    max-width: 1000px;
}

.trailer-box iframe {
    width: 100%;
    height: 560px;

    border: none;
    border-radius: 15px;

    box-shadow: 0 0 30px var(--primary);
}

.close-trailer {
    position: absolute;
    top: -18px;
    right: -18px;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 42px;
    height: 42px;

    background: var(--primary);
    color: var(--white);

    border: none;
    border-radius: 50%;

    font-size: 22px;
    font-weight: bold;

    cursor: pointer;
    transition: all .3s ease;

    z-index: 1001;
}

.close-trailer:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* ==========================================
   SEARCH RESULTS
========================================== */

.search-results {
    position: absolute;
    top: 50px;
    left: 0;

    display: none;

    width: 100%;
    max-height: 500px;

    overflow-y: auto;

    background: var(--card);
    border: 2px solid var(--primary);
    border-radius: 12px;

    z-index: 1000;
}

.search-item {
    display: flex;
    gap: 15px;

    padding: 12px;

    cursor: pointer;
    transition: background .25s ease;
}

.search-item:hover {
    background: #252525;
}

.search-item img {
    width: 60px;
    border-radius: 8px;
}

.search-item h4 {
    margin-bottom: 6px;

    color: var(--white);
}

.search-item p {
    color: var(--text-light);
    font-size: 14px;
}

.selected-search {
    background: var(--primary) !important;
}

.selected-search h4 {
    color: var(--white);
}

.selected-search p {
    color: #f5f5f5;
}

/* ==========================================
   SECTION HEADER
========================================== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

.scroll-buttons {
    display: flex;
    gap: 10px;
}

.scroll-buttons button {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 45px;
    height: 45px;

    background: var(--primary);
    color: var(--white);

    border: none;
    border-radius: 50%;

    font-size: 22px;
    cursor: pointer;
    transition: all .3s ease;
}

.scroll-buttons button:hover {
    background: var(--primary-hover);
    transform: scale(1.08);
}

/* ==========================================
   DOWNLOAD LIST
========================================== */

.download-list {
    display: flex;
    flex-direction: column;
    gap: 15px;

    margin-top: 20px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px;

    background: rgba(255, 255, 255, .08);
    border-radius: 12px;
}

.download-item button {
    padding: 10px 18px;

    background: var(--primary);
    color: var(--white);

    border: none;
    border-radius: 8px;

    cursor: pointer;
    transition: all .3s ease;
}

.download-item button:hover {
    background: var(--primary-hover);
}

/* ==========================================
   ADMIN PANEL
========================================== */

.admin-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
}

.admin-card {
    padding: 25px;

    background: var(--card);
    border-radius: 15px;
}

.admin-card h2 {
    margin-bottom: 20px;

    color: var(--primary-hover);
}

.admin-card label {
    display: block;

    margin: 18px 0 6px;

    font-weight: bold;
}

.admin-card input,
.admin-card select {
    width: 100%;
    padding: 12px;

    background: var(--card-light);
    color: var(--white);

    border: none;
    border-radius: 10px;
}

.admin-card button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;

    background: var(--primary-hover);
    color: var(--white);

    border: none;
    border-radius: 12px;

    font-size: 17px;
    cursor: pointer;
    transition: background .3s ease;
}

.admin-card button:hover {
    background: #9333ea;
}

#previewPoster {
    display: block;
    width: 220px;
    margin: 25px auto;

    border-radius: 14px;
}

#previewTitle {
    margin: 15px 0 20px;

    color: var(--white);
    text-align: center;
}

#previewOverview {
    margin-bottom: 25px;

    color: #cfcfcf;
    text-align: center;
    line-height: 1.6;
}

#fetchBtn {
    width: 100%;
    margin: 20px 0;
}

/* ==========================================
   ADMIN PANEL V2
========================================== */

#downloadForm,
#episodeForm {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;

    background: #1b1b2f;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;

    box-shadow: 0 15px 40px rgba(0,0,0,.45);
}

#downloadForm label,
#episodeForm label {
    display: block;

    margin: 15px 0 8px;

    color: #ddd;
    font-weight: 600;
}

#downloadForm input,
#downloadForm select,
#episodeForm input,
#episodeForm select,
#episodeForm textarea {
    width: 100%;
    padding: 12px;

    background: #2a2a45;
    color: var(--white);

    border: none;
    border-radius: 10px;
    outline: none;

    font-size: 15px;
}

#downloadForm input:focus,
#downloadForm select:focus,
#episodeForm input:focus,
#episodeForm select:focus,
#episodeForm textarea:focus {
    border: 2px solid #9b59ff;
}

#downloadForm button,
#episodeForm button {
    margin-top: 20px;
}

#episodeForm textarea {
    min-height: 130px;
    resize: vertical;
}

#seriesPoster,
#episodeStill {
    display: block;
    width: 220px;
    margin: 25px auto;

    border-radius: 14px;
    box-shadow: 0 0 25px rgba(138,43,226,.45);
}

#seriesTitle {
    margin-bottom: 20px;

    color: var(--white);
    text-align: center;
}

#episodeForm h3 {
    margin-top: 30px;

    color: var(--primary-hover);
    text-align: center;
}

.download-admin-card {
    margin-top: 25px;
    padding: 20px;

    background: #24243d;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;

    transition: all .3s ease;
}

.download-admin-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(141,66,255,.25);
}

.download-admin-card h3 {
    margin-bottom: 15px;

    color: #b66dff;
}

#saveBtn {
    width: 100%;
    padding: 16px;

    background: var(--primary);
    color: var(--white);

    border: none;
    border-radius: 14px;

    font-size: 18px;
    font-weight: bold;

    cursor: pointer;
    transition: all .3s ease;
}

#saveBtn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

#fetchBtn {
    padding: 14px;

    background: #6b35d6;
    color: var(--white);

    border: none;
    border-radius: 12px;

    font-weight: bold;
    cursor: pointer;
    transition: background .3s ease;
}

#fetchBtn:hover {
    background: #8248ff;
}

.upload-switch {
    position: relative;

    display: flex;

    margin: 20px 0;

    overflow: hidden;

    background: var(--card);
    border: 2px solid var(--primary);
    border-radius: 14px;
}

.upload-switch input {
    display: none;
}

.switch-btn {
    flex: 1;
    z-index: 2;

    padding: 14px;

    color: #bfbfbf;
    text-align: center;
    font-weight: 700;

    cursor: pointer;
    user-select: none;

    transition: color .35s ease;
}

.switch-btn:hover {
    color: var(--white);
}

.upload-switch::before {
    content: "";

    position: absolute;
    top: 0;
    left: var(--left, 0%);

    width: 50%;
    height: 100%;

    background: linear-gradient(135deg, var(--primary), #b15cff);
    border-radius: 10px;

    transition: left .35s ease;
}

#linkMode480:checked ~ .switch-btn:last-child,
#linkMode720:checked ~ .switch-btn:last-child,
#linkMode1080:checked ~ .switch-btn:last-child,
#linkMode4k:checked ~ .switch-btn:last-child,
#uploadMode480:checked ~ .switch-btn:first-of-type,
#uploadMode720:checked ~ .switch-btn:first-of-type,
#uploadMode1080:checked ~ .switch-btn:first-of-type,
#uploadMode4k:checked ~ .switch-btn:first-of-type {
    color: var(--white);
}

/* ==========================================
   CUSTOM FILE UPLOAD
========================================== */

.custom-upload {
    display: flex;
    align-items: center;
    gap: 15px;

    margin-top: 10px;
}

.upload-btn {
    padding: 12px 18px;

    background: var(--primary);
    color: var(--white);

    border-radius: 10px;

    font-weight: bold;
    cursor: pointer;

    transition: background .3s ease;
}

.upload-btn:hover {
    background: var(--primary-hover);
}

.file-name {
    max-width: 320px;

    color: var(--text-light);
    font-size: 14px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   ACCORDION
========================================== */

.accordion {
    overflow: hidden;

    margin-bottom: 20px;

    background: var(--card);
    border: 2px solid #2b2b2b;
    border-radius: 16px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    padding: 18px 24px;

    background: #202020;
    color: var(--white);

    border: none;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;
    transition: background .3s ease;
}

.accordion-header:hover {
    background: #292929;
}

.accordion-content {
    display: none;
    padding: 25px;
}

/* ==========================================
   MOVIEWORLD LOGIN PAGE
========================================== */

.mw-login-page {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    min-height: 100vh;
    padding: 80px 20px;

    overflow-x: hidden;
    overflow-y: auto;

    font-family: Arial, Helvetica, sans-serif;

    background:
        radial-gradient(circle at top left, var(--primary) 0%, transparent 25%),
        radial-gradient(circle at bottom right, var(--primary-dark) 0%, transparent 30%),
        linear-gradient(135deg, #050505, #10061a, #050505);

    color: var(--white);
}

/* ==========================================
   LOGIN OVERLAY
========================================== */

.mw-login-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, .35);

    z-index: 1;
}

/* ==========================================
   BACKGROUND LOGO
========================================== */

.mw-background-logo {
    position: absolute;
    top: 50%;
    right: 250px;

    width: 900px;

    transform: translateY(-50%);

    opacity: .08;

    pointer-events: none;
    user-select: none;

    z-index: 0;
}

/* ==========================================
   LOGIN CONTAINER
========================================== */

.mw-login-container {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 550px;

    padding: 40px 20px;
}

/* ==========================================
   LOGIN HEADER
========================================== */

.mw-login-header {
    text-align: center;
    margin-bottom: 45px;
}

.mw-login-logo {
    width: 160px;
    margin-bottom: 15px;
}

.mw-login-brand {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.mw-login-brand span {
    color: var(--primary);
}

.mw-login-subtitle {
    margin-top: 18px;
    color: #b56dff;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: 8px;
    text-transform: uppercase;
}

/* ==========================================
   LOGIN CARD
========================================== */

.mw-login-card {
    position: relative;
    width: 100%;
    padding: 40px;
    background: rgba(20, 10, 35, 0.78);
    border: 1px solid rgba(138, 43, 226, .45);
    border-radius: 22px;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        0 0 25px rgba(138, 43, 226, .18),
        0 0 60px rgba(138, 43, 226, .08);
}

.mw-login-card h2 {
    margin-bottom: 10px;
    font-size: 2rem;
}

.mw-login-text {
    margin-bottom: 35px;
    color: #c7c7c7;
    line-height: 1.6;
}

/* ==========================================
   LOGIN INPUTS
========================================== */

.mw-input-group {
    margin-bottom: 25px;
}

.mw-input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--white);
    font-weight: 600;
}

.mw-input-box {
    display: flex;
    align-items: center;
    gap: 15px;

    height: 60px;
    padding: 0 18px;

    background: rgba(8, 4, 18, .75);
    border: 1px solid rgba(138, 43, 226, .45);
    border-radius: 14px;

    transition: all .3s ease;
}

.mw-input-box:hover {
    background: rgba(12, 6, 24, .9);
    border-color: #a855f7;
}

.mw-input-box:focus-within {
    background: rgba(16, 8, 32, .95);
    border-color: #b56dff;

    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, .45),
        0 0 0 1px rgba(138, 43, 226, .15);
}

.mw-input-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;

    color: var(--white);
    font-size: 16px;
}

.mw-input-box ion-icon {
    color: #a855f7;
    font-size: 22px;
}

/* ==========================================
   INPUT HELPERS
========================================== */

.mw-input-box input::placeholder {
    color: #8d8d8d;
}

.mw-input-box button {
    display: flex;
    align-items: center;

    background: none;
    border: none;
    cursor: pointer;

    color: #a855f7;
}

.mw-input-box button ion-icon {
    font-size: 22px;
}

/* Remove Chrome Autofill Background */

.mw-input-box input:-webkit-autofill,
.mw-input-box input:-webkit-autofill:hover,
.mw-input-box input:-webkit-autofill:focus,
.mw-input-box input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: var(--white) !important;
    transition: background-color 9999s ease-in-out;
}

/* ==========================================
   LOGIN OPTIONS
========================================== */

.mw-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin: 25px 0 30px;
}

.mw-remember {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #d6d6d6;
    font-size: 15px;
    cursor: pointer;
}

.mw-remember input {
    width: 18px;
    height: 18px;

    cursor: pointer;
    accent-color: var(--primary);
}

.mw-login-options a {
    color: #b86dff;
    font-size: 15px;
    text-decoration: none;
    transition: color .3s;
}

.mw-login-options a:hover {
    color: var(--white);
}

/* ==========================================
   SECURE ACCESS
========================================== */

.mw-secure {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    margin-top: 35px;

    color: #a9a9a9;
    font-size: 15px;
}

.mw-secure::before,
.mw-secure::after {
    content: "";

    flex: 1;
    height: 1px;

    background: rgba(255, 255, 255, .12);
}

.mw-secure ion-icon {
    color: var(--primary);
    font-size: 20px;
}

/* ==========================================
   LOGIN BUTTON
========================================== */

.mw-login-btn {
    position: relative;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    width: 100%;
    height: 62px;
    margin-top: 10px;

    background: linear-gradient(135deg, #7B2CFF, #B633FF);
    border: none;
    border-radius: 14px;

    color: var(--white);
    font-size: 20px;
    font-weight: 700;

    cursor: pointer;
    transition: .3s;

    box-shadow: 0 10px 30px rgba(138, 43, 226, .35);
}

.mw-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(138, 43, 226, .55);
}

.mw-login-btn ion-icon {
    font-size: 22px;
}

/* ==========================================
   BUTTON SHINE EFFECT
========================================== */

.mw-login-btn::before {
    content: "";

    position: absolute;
    top: 0;
    left: -120%;

    width: 70%;
    height: 100%;

    background: rgba(255, 255, 255, .2);
    transform: skewX(-25deg);
    transition: left .7s;
}

.mw-login-btn:hover::before {
    left: 130%;
}

/* ==========================================
   CARD ANIMATION
========================================== */

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.mw-login-card {
    animation: floatCard 7s ease-in-out infinite;
}

/* ==========================================
   LOGO GLOW
========================================== */

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px var(--primary));
    }

    50% {
        filter: drop-shadow(0 0 25px #B633FF);
    }
}

.mw-login-logo {
    animation: logoGlow 4s ease-in-out infinite;
}

/* ==========================================
   BACKGROUND ANIMATION
========================================== */

@keyframes backgroundShift {
    0%, 100% {
        background-position: left top;
    }

    50% {
        background-position: right bottom;
    }
}

.mw-login-page {
    background-size: 160% 160%;
    animation: backgroundShift 18s ease infinite;
}

/* ==========================================
   INPUT ANIMATION
========================================== */

.mw-input-box {
    transition: transform .35s;
}

.mw-input-box:hover {
    transform: translateY(-2px);
}

/* ==========================================
   PAGE FADE-IN
========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mw-login-container {
    animation: fadeIn .9s ease;
}

/* ==========================================
   PARTICLES
========================================== */

.mw-particles {
    position: absolute;
    inset: 0;

    overflow: hidden;
    pointer-events: none;
}

.mw-particles span {
    position: absolute;

    width: 6px;
    height: 6px;

    background: #B633FF;
    border-radius: 50%;
    box-shadow: 0 0 12px #B633FF;

    animation: particleFloat linear infinite;
}

.mw-particles span:nth-child(1) {
    left: 10%;
    top: 90%;
    animation-duration: 12s;
}

.mw-particles span:nth-child(2) {
    left: 25%;
    top: 80%;
    animation-duration: 18s;
}

.mw-particles span:nth-child(3) {
    left: 40%;
    top: 95%;
    animation-duration: 14s;
}

.mw-particles span:nth-child(4) {
    left: 60%;
    top: 88%;
    animation-duration: 16s;
}

.mw-particles span:nth-child(5) {
    left: 75%;
    top: 93%;
    animation-duration: 11s;
}

.mw-particles span:nth-child(6) {
    left: 85%;
    top: 85%;
    animation-duration: 17s;
}

.mw-particles span:nth-child(7) {
    left: 50%;
    top: 92%;
    animation-duration: 13s;
}

.mw-particles span:nth-child(8) {
    left: 92%;
    top: 96%;
    animation-duration: 19s;
}

@keyframes particleFloat {
    from {
        opacity: 0;
        transform: translateY(0);
    }

    20%,
    80% {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(-110vh);
    }
}

/* ==========================================
   ERROR MESSAGE
========================================== */

#error {
    min-height: 20px;
    margin-top: 18px;

    color: #ff6b81;
    font-size: 15px;
    text-align: center;
}

/* ==========================================
   LOGOUT BUTTON
========================================== */

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 24px;

    background: linear-gradient(135deg, #7B2CFF, #B633FF);
    border: none;
    border-radius: 10px;

    color: var(--white);
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
    transition: .3s;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(123, 44, 255, .4);
}

.logout-btn ion-icon {
    font-size: 20px;
}

/* ==========================================
   EPISODE LIBRARY
========================================== */

.episode-library {
    margin-top: 25px;
    overflow-x: auto;
}

#episodeTable {
    width: 100%;
    border-collapse: collapse;
    color: var(--white);
}

#episodeTable th,
#episodeTable td {
    padding: 10px 14px;
}

#episodeTable th {
    background: var(--primary);
    color: var(--white);
    text-align: left;
    font-size: 15px;
}

#episodeTable td {
    background: var(--card-light);
    border-bottom: 1px solid var(--border);
}

#episodeTable tr:hover td {
    background: #2b2b2b;
}

/* ==========================================
   ACTION BUTTONS
========================================== */

.action-btn {
    padding: 6px 12px;

    border: none;
    border-radius: 8px;

    font-size: 13px;
    cursor: pointer;
}

.edit-btn {
    background: var(--primary);
    color: var(--white);
}

.edit-btn:hover {
    background: #9d4dff;
}

.delete-btn {
    margin-left: 6px;

    background: #d32f2f;
    color: var(--white);
}

.delete-btn:hover {
    background: #ff4d4d;
}

/* ==========================================
   SERIES MANAGER
========================================== */

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.series-card {
    padding: 25px;

    background: #1b1b2f;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;

    transition: .3s;
}

.series-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(138, 43, 226, .25);
}

.series-card h2 {
    color: var(--white);
}

/* ==========================================
   SEASON DIVIDERS
========================================== */

.season-divider td {
    padding: 16px 20px;

    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 10px;

    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .5px;

    cursor: pointer;
    user-select: none;
    transition: .3s;
}

.season-divider:hover td {
    background: linear-gradient(90deg, #9d46ff, #6b1fd8);
}

.season-arrow {
    display: inline-block;
    width: 24px;
    margin-right: 8px;

    transition: .3s;
}

.series-divider td {
    padding: 18px 20px;

    background: var(--bg-dark);
    border-left: 5px solid var(--primary);

    color: #b86dff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .5px;
}

/* ==========================================
   EPISODE TABLE
========================================== */

#episodeTable {
    width: 100%;
    margin-top: 20px;

    border-collapse: collapse;
}

#episodeTable th {
    padding: 12px 16px;

    background: var(--primary);

    color: var(--white);
    font-size: 16px;
    text-align: left;
    text-transform: uppercase;
}

#episodeTable td {
    padding: 14px 16px;

    border-bottom: 1px solid var(--card-light);
    vertical-align: middle;
}

#episodeTable tbody td:last-child {
    width: 1%;
    white-space: nowrap !important;
}

/* ==========================================
   ACTION BUTTONS
========================================== */

#episodeTable tbody td button,
#episodeTable tbody .edit-btn,
#episodeTable tbody .delete-btn {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;

    width: 65px !important;
    height: 28px !important;
    padding: 4px 10px !important;
    margin-right: 4px !important;

    border: none;
    border-radius: 4px !important;

    font-size: 12px !important;
    font-weight: 700;

    cursor: pointer;
}

#episodeTable tbody td button:first-of-type {
    background: var(--primary) !important;
    color: var(--white) !important;
}

#episodeTable tbody td button:last-of-type {
    background: #333 !important;
    border: 1px solid #444 !important;

    color: #ff4d4d !important;
}

/* =======================================================
   MOVIE MANAGER
======================================================= */

.admin-container{

    max-width:1400px;
    margin:40px auto;
    padding:25px;

}

.manager-header{

    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;

}

.manager-header h1{

    color:#fff;
    font-size:34px;
    margin-bottom:8px;

}

.manager-header p{

    color:#9ca3af;

}

.refresh-btn{

    background:linear-gradient(135deg,#6d28d9,#9333ea);
    color:#fff;
    border:none;
    padding:14px 26px;
    border-radius:14px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:.3s;

}

.refresh-btn:hover{

    transform:translateY(-3px);
    box-shadow:0 12px 25px rgba(109,40,217,.4);

}

/* ========================= */

.stats-grid{

    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-bottom:30px;

}

.stat-card{

    background:#171717;
    border:1px solid #262626;
    border-radius:18px;
    padding:25px;
    transition:.3s;

}

.stat-card:hover{

    transform:translateY(-5px);

    border-color:#7c3aed;

}

.stat-card span{

    display:block;

    color:#9ca3af;

    margin-bottom:12px;

}

.stat-card h2{

    color:white;

    font-size:34px;

}

/* ========================= */

.toolbar{

    display:flex;

    justify-content:space-between;

    gap:20px;

    margin-bottom:25px;

    flex-wrap:wrap;

}

.search-box{

    flex:1;

    display:flex;

    align-items:center;

    background:#171717;

    border:1px solid #262626;

    border-radius:15px;

    padding:0 18px;

}

.search-box i{

    color:#9ca3af;

    margin-right:12px;

}

.search-box input{

    width:100%;

    background:none;

    border:none;

    color:white;

    padding:16px 0;

    outline:none;

    font-size:15px;

}

#sortMovies{

    width:220px;

    background:#171717;

    color:white;

    border:1px solid #262626;

    border-radius:15px;

    padding:16px;

}

/* ========================= */

.table-wrapper{

    overflow:auto;

    background:#171717;

    border-radius:18px;

    border:1px solid #262626;

}

table{

    width:100%;

    border-collapse:collapse;

}

thead{

    background:#1f1f1f;

}

th{

    padding:18px;

    color:#9ca3af;

    text-align:left;

    position:sticky;

    top:0;

}

td{

    padding:18px;

    color:white;

    border-top:1px solid #262626;

}

tbody tr{

    transition:.3s;

}

tbody tr:hover{

    background:#232323;

}

td img{

    width:60px;

    border-radius:10px;

}

/* ========================= */

.edit-btn,
.delete-btn{

    width:42px;

    height:42px;

    border:none;

    border-radius:12px;

    cursor:pointer;

    color:white;

    margin-right:8px;

    transition:.3s;

}

.edit-btn{

    background:#2563eb;

}

.edit-btn:hover{

    background:#1d4ed8;

    transform:scale(1.05);

}

.delete-btn{

    background:#dc2626;

}

.delete-btn:hover{

    background:#b91c1c;

    transform:scale(1.05);

}

/* ========================= */

.pagination{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:20px;

    margin-top:30px;

}

.pagination button{

    background:#6d28d9;

    color:white;

    border:none;

    padding:12px 22px;

    border-radius:12px;

    cursor:pointer;

    transition:.3s;

}

.pagination button:hover{

    background:#7c3aed;

}

#pageInfo{

    color:white;

    font-weight:600;

}

/* ========================= */

@media(max-width:768px){

.manager-header{

flex-direction:column;

align-items:flex-start;

gap:20px;

}

.toolbar{

flex-direction:column;

}

#sortMovies{

width:100%;

}

.stats-grid{

grid-template-columns:1fr;

}

}

/* =========================
   FOOTER
========================= */

.footer{

    margin-top:80px;

    padding:25px 20px;

    text-align:center;

    border-top:1px solid rgba(255,255,255,.08);

    background:#0b0b0b;

}

.footer p{

    color:#8b8b8b;

    font-size:14px;

    letter-spacing:.5px;

}

.nav-links{

    display:flex;

    align-items:center;

    gap:35px;

    margin-left:80px;

    margin-right:80px;

}

.nav-links a{

    color:white;

    text-decoration:none;

    font-size:15px;

    font-weight:600;

    transition:.3s;

}

.nav-links a:hover{

    color:#9d4edd;

    text-shadow:0 0 8px #9d4edd;

}

.nav-links a{

    position:relative;

}

.nav-links a::after{

    content:"";

    position:absolute;

    left:0;

    bottom:-6px;

    width:0;

    height:2px;

    background:#9d4edd;

    transition:.3s;

}

.nav-links a:hover::after{

    width:100%;

}

.navbar{

    position:sticky;

    top:0;

    z-index:1000;

}

/* ========================= */
/* PAGE CONTENT */
/* ========================= */

.page-content{

    max-width:900px;

    margin:60px auto;

    padding:0 25px;

    color:white;

    line-height:1.8;

}

.page-content h1{

    color:#a855f7;

    margin-bottom:25px;

    font-size:42px;

}

.page-content h2{

    color:#c084fc;

    margin-top:40px;

    margin-bottom:15px;

}

.page-content p{

    margin-bottom:18px;

    font-size:18px;

}

.page-content ul{

    padding-left:25px;

}

.page-content li{

    margin-bottom:12px;

    font-size:18px;

}

/* ================================= */
/* RESPONSIVE DESIGN */
/* ================================= */

/* Phones */

@media (max-width: 768px){

    .navbar{

        display:flex;

        flex-direction:column;

        align-items:center;

        padding:20px;

        gap:20px;

    }

    .logo-img{

        width:220px;

    }

    .nav-links{

        display:flex;

        flex-wrap:wrap;

        justify-content:center;

        gap:15px;

        margin:0;

    }

    .search{

    width:100%;

    display:flex;

    padding:0 10px;

    box-sizing:border-box;

}

    .search input{

        width:100%;

    }

    .search button{

        width:90px;

    }

    .hero{

        height:350px;

        text-align:center;

        justify-content:center;

    }

    .hero-overlay{

        margin:0;

        padding:0 20px;

    }

    .hero-overlay h2{

        font-size:32px;

    }

    .hero-overlay p{

        font-size:16px;

    }

    .section-header{

        flex-direction:column;

        align-items:flex-start;

        gap:15px;

    }

    .content-section{

        width:100%;

        padding:0 15px;

        margin:40px auto;

    }

}

/* Tablets */

@media (min-width:769px) and (max-width:1024px){

    .navbar{
        display:flex;
        flex-direction:column;
        align-items:center;
        gap:20px;
        padding:20px;
    }

    .logo-img{
        width:260px;
    }

    .nav-links{
        margin:0;
        gap:25px;
        flex-wrap:wrap;
        justify-content:center;
    }

    .search{
        width:100%;
        max-width:700px;
    }

    .search input{
        width:100%;
    }

}

#recentlyAdded .movie-card{
    min-width:220px;
    width:220px;
}

#recentlyAdded .poster-container img{
    width:100%;
    height:330px;
    object-fit:cover;
    display:block;
}