/* Highly Compact CSS Grid */
.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px; /* Tight gap for more cards */
    padding: 20px 0;
}

.compact-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.compact-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

.card-top { display: flex; gap: 10px; cursor: pointer; }

/* FIX: Now uses var(--primary) instead of hardcoded teal */
.card-icon { width: 45px; height: 45px; border-radius: 6px; background: var(--primary); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; font-size: 20px; flex-shrink: 0; }

.card-info { flex-grow: 1; overflow: hidden; }
.card-info h3 { margin: 0 0 4px 0; font-size: 15px; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-info p { margin: 0; font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11px; color: #94a3b8; }

/* FIX: Now uses var(--primary) instead of hardcoded teal */
.filter-link { color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 600; }
.filter-link:hover { text-decoration: underline; }

.card-actions { display: flex; gap: 5px; margin-top: 10px; }
.btn-action { flex: 1; padding: 6px 0; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; font-weight: 600; transition: background 0.2s; }

/* FIX: Now uses var(--primary) and var(--primary-dark) */
.btn-join { background: var(--primary); color: white; flex: 2; }
.btn-join:hover { background: var(--primary-dark); }

.btn-copy, .btn-share { background: #f1f5f9; color: #334155; }
.btn-copy:hover, .btn-share:hover { background: #e2e8f0; }