/* ===== Base ===== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #000;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    margin-bottom: 10px;
}

h2 {
    margin-top: 30px;
}

/* ===== Buttons ===== */

button {
    cursor: pointer;
}

.add-btn {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #fff;
    background: #f5c518;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
}

/* ===== Grid / Cards (catalog) ===== */

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

.card {
    background: none;
    border: none;
    padding: 0;
}

.poster {
    width: 100%;
        position: relative;
}


.season-badge {
    position: absolute;
    top: 6px;
    right: 6px;

    background: #e50914;
    color: white;

    font-size: 12px;
    font-weight: 700;

    padding: 4px 7px;
    border-radius: 6px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.5);

    cursor:pointer;
user-select:none;
transition:transform .08s;
}

.season-badge:active{
transform:scale(0.9);
}

.poster img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    animation: fadeIn .25s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.card h3 {
    margin-top: 12px;
    font-size: 15px;
    font-weight: normal;
    line-height: 1.3;
    text-align: center;
}

.card h3 a {
    text-decoration: underline;
    color: #000;
}

.card h3 a:hover {
    color: #f5c518;
}


/* ===== Home page (FINAL FIX) ===== */

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* Р–РЃРЎРўРљРћ 2 РєРѕР»РѕРЅРєРё */
    gap: 60px;
    margin: 80px 0;
    align-items: start;
}

.home-card {
    max-width: 100%;      /* РЅРµ РґР°С‘Рј СЂР°Р·СЂР°СЃС‚Р°С‚СЊСЃСЏ */
    text-align: left;
    text-decoration: none;
    color: #000;
}

.home-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.home-card span {
    display: inline-block;
    margin-top: 14px;
    font-size: 22px;
    letter-spacing: 2px;
    text-decoration: underline;
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: 1fr; /* РЅР° РјРѕР±РёР»Рµ вЂ” РѕРґРЅР° РєРѕР»РѕРЅРєР° */
    }
}



/* ===== ADMIN ISOLATION ===== */

.admin table {
    table-layout: fixed;
}

.admin td {
    vertical-align: middle;
}

/* ===== Admin poster preview (FINAL FIX) ===== */

.admin .admin-poster {
    width: 60px;
}

.admin .admin-poster img {
    width: 60px !important;
    height: 90px !important; /* 2:3 */
    max-width: 60px !important;
    max-height: 90px !important;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
/* ===== SIMPLE BLACK HEADER (TUNED) ===== */

.site-header {
    background: #000;
    height: 52px;
}

.header-inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 0.6px;
}

/* NAV */

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

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 3px;
}

/* ACTIVE ITEM */

.main-nav a.active {
    background: #2a2a2a;
}

/* HOVER */

.main-nav a:hover {
    background: #1f1f1f;
}


/* ===== Pagination ===== */

.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination a {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 10px;
    text-decoration: none;
    color: #000;
    border-radius: 4px;
}

.pagination a.active {
    font-weight: bold;
    background: #f5c518;
}

.pagination a:hover {
    background: #e0e0e0;
}

.ajax-edit-form input {
    width: 100%;
    margin-top: 6px;
}

.save-status {
    margin-left: 8px;
    font-size: 13px;
}
.add-card {
    border: 2px dashed #ccc;
    padding: 10px;
}

.add-card input {
    width: 100%;
    margin-top: 6px;
}
.admin-form {
    max-width: 400px;
}

.admin-form input {
    width: 100%;
    margin: 8px 0;
    padding: 8px;
}

.admin-form button {
    margin-top: 10px;
    padding: 8px 14px;
}

.poster-wrap {
    position: relative;
}

.poster-full {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 4px 6px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
}
/* === Poster overlay (original icon) === */

.poster {
    position: relative;
}

.poster-full {
    position: absolute;
    right: 8px;
    bottom: 8px;

    width: 34px;
    height: 34px;

    background: rgba(0,0,0,0.65);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    text-decoration: none;

    color: #fff;
    opacity: 1;

    transition: opacity .2s ease, transform .2s ease;
}

.poster:hover .poster-full {
    opacity: 1;
    transform: scale(1.05);
}

.poster-full:hover {
    background: rgba(0,0,0,0.85);
}
/* =========================
   SKELETON LOADING
========================= */

.skeleton {
    pointer-events: none;
}

.skeleton .poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.skeleton .line {
    height: 14px;
    background: #e5e5e5;
    border-radius: 6px;
    margin-bottom: 8px;
}

.skeleton .line.short {
    width: 60%;
}

.skeleton .line.long {
    width: 90%;
}

/* shimmer animation */
.skeleton .poster::after,
.skeleton .line::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.6),
        transparent
    );
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}
.admin-bar{
display:flex;
justify-content:flex-end;
align-items:center;

background:#111;
color:#ccc;

padding:8px 20px;

font-size:13px;
border-bottom:1px solid #222;
}

.admin-bar strong{
color:#fff;
margin:0 4px;
}

.admin-bar a{
color:#ff5555;
text-decoration:none;
margin-left:6px;
}

.admin-bar a:hover{
text-decoration:underline;
}


.catalog-header{
display:flex;
align-items:center;
gap:10px;
}

#catalog-title{
margin:0;
}

.search-box{
display:flex;
align-items:center;
position:relative;
}

#search-toggle{
background:none;
border:none;
font-size:18px;
cursor:pointer;
color:#ccc;
margin-left:6px;
}

#search-form{
display:flex;
align-items:center;
}

#search-input{

width:0;
opacity:0;

padding:6px 0;
border:none;

transition:all .2s ease;

background:#111;
color:#fff;

border-radius:6px;

}

#search-input.active{

width:200px;
opacity:1;

padding:6px 10px;
border:1px solid #333;

}

.site-version{
text-align:center;
margin-top:40px;
padding:15px 0;

font-size:12px;
color:#888;
}


/* =========================
   SEARCH FIX (SAFE)
========================= */

.search-box {
    position: relative;
}

/* autocomplete dropdown */
#search-suggestions {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;

    background: #111;
    border: 1px solid #333;
    border-radius: 8px;

    z-index: 9999;
    display: none;

    color: #fff; /* 🔥 фикс текста */
}

/* items */
#search-suggestions div {
    padding: 10px;
    cursor: pointer;
    transition: background .15s ease;
}

/* hover */
#search-suggestions div:hover {
    background: #222;
}


