/* src/frontend/static/css/card.css */

.card .meta {
    display: none;
}

.card {
    background: #1A1A1A;
    border-radius: 22px;
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    display: block;
    position: relative;
    aspect-ratio: 9 / 16;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.video-wrap {
    width: 100%;
    height: 100%;
    background: #0f0f10;
    overflow: hidden;
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
}

/* Gradient overlay so bottom text is readable */
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 40%);
    z-index: 2;
    pointer-events: none;
}

.card iframe,
.card a.embed-link,
.card video,
.card img {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #0f0f10;
    object-fit: cover;
}

/* ------------- NEW OVERLAYS ------------- */
.card-overlay {
    position: absolute;
    z-index: 10;
}

/* Top Left Badge */
.card-badge {
    position: absolute;
    z-index: 10;
    top: 16px;
    left: 16px;
    background: rgba(26, 26, 26, 0.88);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Top Right Favorite */
.card-favorite {
    position: absolute;
    z-index: 10;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.card-favorite:hover {
    transform: scale(1.1);
}

.card-favorite svg {
    width: 22px;
    height: 22px;
    fill: var(--accent);
    stroke: none;
}

/* Bottom Left Container (Author + Stats) */
.card-bottom-left {
    position: absolute;
    z-index: 10;
    bottom: 4px;
    left: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

/* Author Label */
.card-author-new {
    color: #9F9F9F;
    font-size: 14px;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: color 0.2s;
    padding-left: 5px;
}

.card-author-new:hover {
    color: var(--accent);
}

/* Stats Pill */
.card-stats-new {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(19, 19, 19, 0.92);
    border-radius: 20px;
    padding: 5px 10px;
    border: 1px solid #313131;
    font-size: 13px;
    color: #9F9F9F;
    font-weight: 400;
}

.card-stats-new .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-stats-new svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* Bottom Right Action Button */
.card-action-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    z-index: 10;
}

.card-action-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.card-action-btn svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    stroke-width: 1;
    fill: none;
}

/* ------------- OLD CLASSES ------------- */

.card.placeholder {
    pointer-events: none;
    opacity: 0.98;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.02));
}

/* grid 6 columns */
.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: start;
    padding: 0px 20px;
}

/* responsiveness */
@media (max-width:1400px) {
    .grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width:900px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .search-wrap {
        flex-direction: column;
        align-items: stretch
    }
}

@media (max-width:480px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header .brand {
        font-size: 16px
    }
}

/* Play/Pause overlay icon */
.card-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-play-icon.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-play-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0;
}

/* ══════════════════════════════════════════════════════
   SKELETON / SHIMMER LOADING
══════════════════════════════════════════════════════ */

@keyframes shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.10) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 600px 100%;
    animation: shimmer 1.6s infinite linear;
}

/* ── Skeleton Card (matches .card layout) ─────────── */
.skeleton-card {
    background: #1a1a1a;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    aspect-ratio: 9 / 16;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.skeleton-thumb {
    width: 100%;
    flex: 1;
    border-radius: 22px 22px 0 0;
}

.skeleton-meta {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    bottom: 10px;
    left: 10px;
}

/* ── Generic skeleton line ───────────────────────── */
.skeleton-line {
    height: 13px;
    border-radius: 8px;
    display: block;
}

/* ── Portfolio Hero Skeleton ─────────────────────── */
.skeleton-hero {
    pointer-events: none;
}

.skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-hero-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

/* ── Requests/Orders Skeleton ────────────────────── */
.skeleton-requests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
    margin-top: 16px;
}

.skeleton-request-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 14px 16px;
}

.skeleton-avatar-sm {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-request-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}