/* ========================================
   FLOAT CARD SYSTEM — Premium Cinema Cards
   Clean. Layered. Alive.
   ======================================== */

/* ---- Grid ---- */
.fc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 480px) {
    .fc-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (min-width: 768px) {
    .fc-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .fc-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    .fc-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ---- Card Container ---- */
.fc-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    animation: fcReveal 0.5s ease both;
    cursor: pointer;
}

@keyframes fcReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Poster Frame ---- */
.fc-frame {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease,
        border-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    will-change: transform, box-shadow;
}

/* Floating lift on hover */
.fc-card:hover .fc-frame {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ---- Poster Image ---- */
.fc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fc-card:hover .fc-img {
    transform: scale(1.06);
}

/* No poster fallback */
.fc-no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #141420, #0d0d18);
    color: rgba(255, 255, 255, 0.06);
    font-size: 40px;
}

/* ---- Top Accent Line (appears on hover) ---- */
.fc-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #dc2626;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    border-radius: 12px 12px 0 0;
}

.fc-card:hover .fc-accent {
    transform: scaleX(1);
}

.fc-card--series .fc-accent {
    background: #0d9488;
}

/* ===========================================
   BADGES — Modern gradient pill system
   =========================================== */

/* ---- Trending (top-left, slim ribbon flush at top) ---- */
.fc-badge-wrap {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 6;
}

.fc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    border-radius: 0 0 8px 0;
}

/* Trending — warm gradient, slim ribbon */
.fc-badge--trend {
    background: linear-gradient(135deg, #fb923c 0%, #ef4444 60%, #e879a0 100%);
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.4);
}

/* New — green ribbon */
.fc-badge--new {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* ---- Custom Badge (top-right) — dark→color gradient ribbon ---- */
.fc-custom {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 0 0 0 8px;
    background: linear-gradient(to right, #0f172a 0%, #1e3a5f 50%, #10b981 100%);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 0 4px rgba(255, 255, 255, 0.1);
}

/* ---- Play Icon (center, on hover) ---- */
.fc-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fc-card:hover .fc-play {
    opacity: 1;
}

.fc-play-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.fc-card:hover .fc-play-icon {
    transform: scale(1);
}

.fc-play-icon i {
    color: #fff;
    font-size: 15px;
    margin-left: 3px;
}

.fc-card--series .fc-play-icon {
    background: rgba(13, 148, 136, 0.9);
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.4);
}

/* ===========================================
   BOTTOM INFO — Title + Meta badges row
   =========================================== */
.fc-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 10px 10px;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.65) 50%,
            transparent 100%);
    z-index: 4;
}

/* ---- Title ---- */
.fc-title {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(45deg, #0aff00, #FFFFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

/* ---- Meta Row (MOVIE | 2025 | ★ 7.6) ---- */
.fc-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* Type pill — MOVIE / SERIES */
.fc-type {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(220, 38, 38, 0.08));
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #fca5a5;
}

.fc-type--series {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.25), rgba(13, 148, 136, 0.08));
    border-color: rgba(13, 148, 136, 0.25);
    color: #5eead4;
}

/* Year pill — high contrast, readable from distance */
.fc-year {
    font-size: 12px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-left: 2px solid #f59e0b;
    color: #fff;
    letter-spacing: 0.03em;
}

.fc-year--series {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: #14b8a6;
    color: #fff;
}

/* Rating pill (★ 7.6) */
.fc-rate {
    font-size: 8px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(234, 179, 8, 0.08));
    border: 1px solid rgba(250, 204, 21, 0.25);
    color: #fde047;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.fc-rate i {
    font-size: 7px;
    color: #facc15;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 480px) {
    .fc-title {
        font-size: 14px;
    }

    .fc-play-icon {
        width: 36px;
        height: 36px;
    }

    .fc-play-icon i {
        font-size: 12px;
    }

    .fc-info {
        padding: 28px 8px 8px;
    }

    .fc-badge {
        font-size: 9px;
        padding: 3px 10px;
    }

    .fc-custom {
        font-size: 9px;
        padding: 3px 10px;
    }

    .fc-type,
    .fc-rate {
        font-size: 7px;
        padding: 2px 6px;
    }

    .fc-year {
        font-size: 12px;
        padding: 2px 6px;
    }

    .fc-meta {
        gap: 4px;
    }
}

/* ===========================================
   LIGHT MODE
   =========================================== */
html.light-mode .fc-frame {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html.light-mode .fc-card:hover .fc-frame {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

html.light-mode .fc-title {
    color: #fff;
}

html.light-mode .fc-no-poster {
    background: linear-gradient(160deg, #e5e7eb, #d1d5db);
    color: rgba(0, 0, 0, 0.08);
}

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {

    .fc-card,
    .fc-frame,
    .fc-img,
    .fc-accent,
    .fc-play-icon {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}