body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #e1ddde;
    color: #151c21;
}

a {
    color: #fa1d40;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    width: 100px;
    height: auto;
}

.brand-name {
    display: none;
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-hello {
    font-size: 14px;
    opacity: 0.8;
}

.container {
    max-width: 1100px;
    margin: 24px auto 60px;
    padding: 0 16px;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.alert-error {
    background: #471322;
    color: #ffb3c3;
}

.alert-success {
    background: #44029f;
    color: #e1ddde;
}

.auth-card,
.panel {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px 22px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(148,163,184,0.2);
}

.auth-card h2,
.panel h2 {
    margin-top: 0;
    margin-bottom: 18px;
}

.auth-card form,
.upload-form {
    display: grid;
    gap: 10px;
}

.auth-card input,
.upload-form input,
.upload-form select {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.4);
    color: #151c21;
    padding: 8px 10px;
    font-size: 14px;
}

.btn-primary,
.btn-secondary,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #fa1d40, #6f11da);
    color: #e1ddde;
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-secondary {
    background: #ffffff;
    color: #151c21;
    border: 1px solid #6f11da;
}

.btn-small {
    padding: 4px 10px;
    background: #111827;
    color: #151c21;
    border: 1px solid rgba(148,163,184,0.6);
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: left;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(148,163,184,0.6), transparent);
}

.section-header-movies h3 {
    color: #fa1d40;
}

.section-header-series h3 {
    color: #6f11da;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.card {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(148,163,184,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
    border-color: rgba(96,165,250,0.8);
}

.thumb-wrapper {
    position: relative;
    width: 123px;
    height: 165px;
    border: 2px solid #151c21;
    border-radius: 6px;
    overflow: hidden;
}

.thumb-wrapper img {
    width: 123px;
    height: 165px;
    object-fit: cover;
    display: block;
}

.card-title {
    padding: 8px 10px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #020617;
}
.badge-movie {
    background: #fa1d40;
}
.badge-series {
    background: #6f11da;
}

.file-group {
    background: #f3f0f2;
    border-radius: 12px;
    border: 1px dashed rgba(148,163,184,0.7);
    padding: 10px;
}
.file-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #93c5fd;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: #ffffff;
    border-radius: 18px;
    padding: 10px;
    max-width: 900px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
}
.modal video {
    width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    background: black;
}
.modal-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: transparent;
    color: #151c21;
    font-size: 18px;
    cursor: pointer;
}

/* Centered search bar in top nav */
.search-form {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 20px;
}

.search-form input {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #6f11da;
    width: 260px;
    max-width: 60%;
    background: #ffffff;
    color: #151c21;
    font-size: 14px;
}

.search-form button {
    margin-left: 8px;
    padding: 7px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: #fa1d40;
    color: white;
    font-weight: 600;
}


.search-form {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 20px;
}
.search-form input {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #6f11da;
    width: 260px;
    max-width: 60%;
    background: #ffffff;
    color: #151c21;
    font-size: 14px;
}
.search-form button {
    margin-left: 8px;
    padding: 7px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: #fa1d40;
    color: white;
    font-weight: 600;
}


.card-title { min-height: 40px; display:block; }
.thumb-wrapper img { display:block; }

.homepage-banner { width:800px; height:275px; margin:20px auto; }


.card-title {
    display:block;
    min-height: 22px;
}


.card:hover .card-title:hover:after {
    content: attr(title);
    position: absolute;
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    z-index: 9999;
}
.card-title { position: relative; }


.card-title:hover::after {
    content: attr(title);
    position: absolute;
    background: #000;
    color:#fff;
    padding:4px 8px;
    white-space: nowrap;
    border-radius:6px;
    top:-5px;
    left:0;
    transform: translateY(-100%);
    z-index:1000;
}
.card-title{position:relative;}


.site-footer {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: rgba(15,23,42,0.7);
    border-top: 1px solid rgba(148,163,184,0.4);
    background: rgba(255,255,255,0.9);
    margin-top: 24px;
}

.site-footer p {
    margin: 0;
}

.alert {
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 12px;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #f97373;
    color: #7f1d1d;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #4ade80;
    color: #14532d;
}

.upload-status {
    margin: 12px 0 16px;
    display: none;
    flex-direction: column;
    gap: 6px;
}

.upload-status.active {
    display: flex;
}

.upload-progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(135deg, #fa1d40, #6f11da);
    transition: width 0.15s linear;
}

.upload-progress-text {
    font-size: 12px;
    color: rgba(15,23,42,0.7);
}
