/**
 * GoFrag Classics v1.1
 * Dark theme, green accents (#40ed70)
 * Grid: 5 desktop / 3 tablet / 2 mobile
 */

/* ===== VARIABLES ===== */
.gfc-classics,
.gfc-tags {
    --gfc-green: #40ed70;
    --gfc-green-dim: rgba(64, 237, 112, 0.25);
    --gfc-green-glow: rgba(64, 237, 112, 0.45);
    --gfc-bg-card: #1e2024;
    --gfc-radius: 8px;
    --gfc-gap: 12px;
}

/* ===== GRID ===== */
.gfc-classics__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--gfc-gap);
}

/* ===== CARD ===== */
.gfc-card {
    position: relative;
    display: block;
    border-radius: var(--gfc-radius);
    overflow: hidden;
    background: var(--gfc-bg-card);
    text-decoration: none;
    will-change: transform;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s ease;
    z-index: 1;
}

.gfc-card:hover,
.gfc-card:focus {
    transform: scale(1.12) rotate(2.5deg);
    box-shadow:
        0 0 0 2px var(--gfc-green),
        0 0 20px var(--gfc-green-glow),
        0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 10;
    text-decoration: none;
}

/* ===== CARD IMAGE ===== */
.gfc-card__img {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: #14161a;
}

.gfc-card__img img,
.gfc-card__img picture {
    display: block;
    width: 100%;
    height: 100%;
}

.gfc-card__img img {
    object-fit: cover;
}

/* ===== PLACEHOLDER (no image) ===== */
.gfc-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, #1a1d22 0%, #22252b 100%);
    user-select: none;
}

/* ===== OVERLAY ===== */
.gfc-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 8px 10px;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gfc-card:hover .gfc-card__overlay,
.gfc-card:focus .gfc-card__overlay {
    opacity: 1;
}

.gfc-card__name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== POPULAR TAGS ===== */
.gfc-tags {
    margin-top: 20px;
}

.gfc-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gfc-tag {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gfc-tag:hover,
.gfc-tag:focus {
    color: var(--gfc-green);
    background: var(--gfc-green-dim);
    border-color: var(--gfc-green);
    text-decoration: none;
    box-shadow: 0 0 8px rgba(64, 237, 112, 0.2);
}

/* ===== TABLET: 3 columns ===== */
@media (max-width: 960px) {
    .gfc-classics__grid {
        grid-template-columns: repeat(3, 1fr);
        justify-content: center;
    }
}

/* ===== MOBILE: 2 columns, overlay always visible ===== */
@media (max-width: 639px) {
    .gfc-classics__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gfc-card__overlay {
        opacity: 1;
    }

    .gfc-card:hover,
    .gfc-card:focus {
        transform: none;
        box-shadow:
            0 0 0 2px var(--gfc-green),
            0 0 12px var(--gfc-green-glow);
    }

    .gfc-card__name {
        font-size: 11px;
    }

    .gfc-tag {
        padding: 4px 10px;
        font-size: 11px;
    }
}
