/* GGGamer Frontend Styles */

.ggg-grid-wrap {
    font-family: inherit;
}

.ggg-grid-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
}

.ggg-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.ggg-search {
    min-width: 180px;
    max-width: 280px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 14px;
    background: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.ggg-search:focus {
    border-color: #222;
}

.ggg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* Chip */
.ggg-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
    line-height: 1.4;
}

.ggg-chip:hover {
    border-color: #aaa;
    color: #222;
}

.ggg-chip.ggg-active {
    background: #222;
    color: #fff;
    border-color: #222;
    font-weight: 600;
}

/* Card */
.ggg-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.25s;
    animation: gggFadeIn 0.3s ease both;
}

.ggg-card:hover {
    border-color: #aaa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.ggg-card-cover {
    height: 130px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ggg-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ggg-card:hover .ggg-card-cover img {
    transform: scale(1.05);
}

.ggg-card-placeholder {
    font-size: 40px;
    opacity: 0.5;
}

.ggg-card-body {
    padding: 12px 14px 16px;
}

.ggg-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ggg-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.ggg-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ggg-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .ggg-search {
        background: #1a1a1a;
        color: #eee;
        border-color: #444;
    }
    .ggg-search:focus {
        border-color: #888;
    }
    .ggg-chip {
        background: #1a1a1a;
        color: #bbb;
        border-color: #444;
    }
    .ggg-chip:hover {
        border-color: #888;
        color: #eee;
    }
    .ggg-chip.ggg-active {
        background: #eee;
        color: #111;
        border-color: #eee;
    }
    .ggg-card {
        background: #1e1e1e;
        border-color: #333;
    }
    .ggg-card:hover {
        border-color: #666;
    }
    .ggg-card-title {
        color: #eee;
    }
}

@keyframes gggFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ggg-grid-header {
        flex-direction: column;
        align-items: stretch;
    }
    .ggg-search {
        max-width: 100%;
        width: 100%;
    }
    .ggg-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .ggg-card-cover {
        height: 110px;
    }
}