.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    aspect-ratio: 2 / 3;
    transition: 0.3s;
}
.card:hover {
    transform: translateY(-8px);
    z-index: 10;
}
.card img {
    width: 100%; height: 100%; object-fit: cover;
}

/* No results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    color: var(--text-muted);
}
.no-results h2 {
    color: #fff;
    margin-bottom: 15px;
}
.no-results span {
    color: #ef4444;
}
.btn-main {
    background: var(--accent);
    color: #0b0f19;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
}

/* No poster */
.card-static-title {
    position: absolute;
    top: 180px;
    left: 0;
    right: 0;
    padding: 40px 15px 15px;
    z-index: 2;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
}
.static-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.static-year {
    font-size: 12px;
    color: var(--accent);
    font-weight: bold;
}
.card:hover .card-static-title {
    opacity: 0;
}

/* Badge */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 5;
    opacity: 0;
    transition: 0.3s;
}
.card.is-watched {
    filter: brightness(0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.card.is-watched:hover {
    filter: brightness(1);
}
.card.is-watched .status-badge {
    opacity: 1;
    background: #94a3b8;
}
.card.is-planned {
    border: 1px solid rgba(245, 158, 11, 0.5);
}
.card.is-planned .status-badge {
    opacity: 1;
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
}
.card.is-liked {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}
.card.is-liked .status-badge {
    opacity: 1;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}
.is-winned {
    border: 3px solid #fbbf24 !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4), inset 0 0 10px rgba(251, 191, 36, 0.1);
}

/* Overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 25, 0.97);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: 0.3s;
    padding: 16px;
    min-height: 370px;
    background: linear-gradient(to bottom, rgba(11, 15, 25, 0.95) 80%, rgba(11, 15, 25, 0.7));
}
.card:hover .overlay {
    opacity: 1;
}

/* Title */
.card-header {
    margin-bottom: 8px;
}
.title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent);
    max-height: 46px;
    overflow: hidden;
}
.en-title {
    font-size: 16px;
    color: #94a3b8;
    margin-top: 2px;
    font-style: italic;
    max-height: 30px;
    overflow: hidden;
}

/* Year & Country */
.meta-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 12px;
}
.year {
    font-weight: 600;
    color: #fff;
}
.separator {
    color: #64748b;
}
.countries-list {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #94a3b8;
}

/* Type */
.md-type-tag-list {
    padding: 4px 6px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    color: #000;
    display: inline-block;
    line-height: 20px;
}

/* Ratings */
.ratings-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.rating-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.rating-badge.kp {
    background: rgba(255, 102, 0, 0.15);
    color: #FF6600;
    border: 1px solid rgba(255, 102, 0, 0.2);
}
.rating-badge.imdb {
    background: rgba(245, 197, 24, 0.1);
    color: #F5C518;
    border: 1px solid rgba(245, 197, 24, 0.25);
    font-weight: 700;
}

/* Genres */
.genres-line {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #38bdf8;
    margin-bottom: 16px;
}

/* Bottom buttons */
.card-footer {
    margin-top: auto;
}
.main-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.btn-primary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 40px;
    transition: all 0.2s ease;
    font-size: 14px;
}
.btn-primary {
    background: #38bdf8;
    color: #000;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 40px;
    background: #22c55e;
    color: #000;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-outline:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.btn-outline:active {
    transform: translateY(0);
}

/* Action buttons */
.status-bar {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.status-btn {
    font-size: 18px;
    opacity: 0.6;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
}
.status-btn svg {
    width: 22px;
    height: 22px;
}
.status-btn:hover {
    opacity: 1;
    color: #fff;
    transform: scale(1.1);
}
.status-btn.active-watched svg {
    stroke: #38bdf8;
    fill: rgba(56, 189, 248, 0.2);
}
.status-btn.active-planned svg {
    stroke: #fbbf24;
    fill: #fbbf24;
}
.status-btn.active-liked svg {
    stroke: #ef4444;
    fill: #ef4444;
}

/* Mobile */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
}
@media (max-width: 1024px) {
    .overlay{
        min-height: 360px;
    }
}